]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mmc: omap_hsmmc: add DT property for max bus frequency
authorDaniel Mack <zonque@gmail.com>
Mon, 15 Oct 2012 16:05:06 +0000 (21:35 +0530)
committerChris Ball <cjb@laptop.org>
Mon, 29 Oct 2012 16:54:09 +0000 (12:54 -0400)
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>
drivers/mmc/host/omap_hsmmc.c

index 01eeeaefa6bcde3ee15fcfa8c96131fc7d5732d9..a33ab749bb0847c5d911169fc0d664476b8bcf36 100644 (file)
@@ -1674,7 +1674,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)
@@ -1701,6 +1701,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