Commit db863d89 authored by Tony Lindgren's avatar Tony Lindgren Committed by Ulf Hansson

mmc: omap_hsmmc: Check if MMC slot name is passed in pdata

The legacy user space for n900 relies on the MMC slot names.
Let's check if those are passed in pdata and use them.

As this makes the DT booting compatible with legacy booting,
we should be able to start dropping omap3 legacy booting
support in v4.8.

Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: linux-mmc@vger.kernel.org
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Tested-by: default avatarIvaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent ab22f516
...@@ -1946,13 +1946,17 @@ MODULE_DEVICE_TABLE(of, omap_mmc_of_match); ...@@ -1946,13 +1946,17 @@ MODULE_DEVICE_TABLE(of, omap_mmc_of_match);
static struct omap_hsmmc_platform_data *of_get_hsmmc_pdata(struct device *dev) static struct omap_hsmmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
{ {
struct omap_hsmmc_platform_data *pdata; struct omap_hsmmc_platform_data *pdata, *legacy;
struct device_node *np = dev->of_node; struct device_node *np = dev->of_node;
pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
if (!pdata) if (!pdata)
return ERR_PTR(-ENOMEM); /* out of memory */ return ERR_PTR(-ENOMEM); /* out of memory */
legacy = dev_get_platdata(dev);
if (legacy && legacy->name)
pdata->name = legacy->name;
if (of_find_property(np, "ti,dual-volt", NULL)) if (of_find_property(np, "ti,dual-volt", NULL))
pdata->controller_flags |= OMAP_HSMMC_SUPPORTS_DUAL_VOLT; pdata->controller_flags |= OMAP_HSMMC_SUPPORTS_DUAL_VOLT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment