summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2012-10-15 16:05:06 (GMT)
committerChris Ball <cjb@laptop.org>2012-12-06 18:54:40 (GMT)
commitd8714e87b62b1c39ae8f3cef9a32121ad1c9a7ae (patch)
tree2a4a47cd97189e144ec7ae654f684c108606af69 /drivers
parent46b76035c12140caeda64dfd2557557263a30039 (diff)
downloadlinux-d8714e87b62b1c39ae8f3cef9a32121ad1c9a7ae.tar.xz
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/omap_hsmmc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 813ae0a..0b5e7ab 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1679,7 +1679,7 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
{
struct omap_mmc_platform_data *pdata;
struct device_node *np = dev->of_node;
- u32 bus_width;
+ u32 bus_width, max_freq;
pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
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))
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;
}
#else