mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 23:24:50 +00:00
mmc: omap_hsmmc: add DT property for max bus frequency
Maximum bus frequency can be limited by external circuitry like level shifters etc. Allow passing this value from DT. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
This commit is contained in:
parent
46b76035c1
commit
d8714e87b6
1 changed files with 4 additions and 1 deletions
|
@ -1679,7 +1679,7 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
|
||||||
{
|
{
|
||||||
struct omap_mmc_platform_data *pdata;
|
struct omap_mmc_platform_data *pdata;
|
||||||
struct device_node *np = dev->of_node;
|
struct device_node *np = dev->of_node;
|
||||||
u32 bus_width;
|
u32 bus_width, max_freq;
|
||||||
|
|
||||||
pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
|
pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
|
||||||
if (!pdata)
|
if (!pdata)
|
||||||
|
@ -1706,6 +1706,9 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
|
||||||
if (of_find_property(np, "ti,needs-special-reset", NULL))
|
if (of_find_property(np, "ti,needs-special-reset", NULL))
|
||||||
pdata->slots[0].features |= HSMMC_HAS_UPDATED_RESET;
|
pdata->slots[0].features |= HSMMC_HAS_UPDATED_RESET;
|
||||||
|
|
||||||
|
if (!of_property_read_u32(np, "max-frequency", &max_freq))
|
||||||
|
pdata->max_freq = max_freq;
|
||||||
|
|
||||||
return pdata;
|
return pdata;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue