summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2014-03-18 13:46:37 +0400
committerUlf Hansson <ulf.hansson@linaro.org>2014-05-12 14:52:37 +0400
commitae94cafe293343c2680c638c7af8499d708e4d71 (patch)
tree29ac23704dd941dab3e49e5cfe156359052e4a01 /drivers/mmc
parentdc03294ac0b71ab110ad503ca18fc50f0eb15576 (diff)
downloadlinux-ae94cafe293343c2680c638c7af8499d708e4d71.tar.xz
mmc: mmci: Add DT bindings for signal direction
Some variants have support for indicating the bus signal directions, which currently are configured through platform data. Add corresponding DT bindings to enable us to move away from using the platform data. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/mmci.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 57cfd5f7cb24..aa26e810b7ad 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -1392,6 +1392,17 @@ static void mmci_dt_populate_generic_pdata(struct device_node *np,
{
int bus_width = 0;
+ if (of_get_property(np, "st,sig-dir-dat0", NULL))
+ pdata->sigdir |= MCI_ST_DATA0DIREN;
+ if (of_get_property(np, "st,sig-dir-dat2", NULL))
+ pdata->sigdir |= MCI_ST_DATA2DIREN;
+ if (of_get_property(np, "st,sig-dir-dat31", NULL))
+ pdata->sigdir |= MCI_ST_DATA31DIREN;
+ if (of_get_property(np, "st,sig-dir-dat74", NULL))
+ pdata->sigdir |= MCI_ST_DATA74DIREN;
+ if (of_get_property(np, "st,sig-dir-cmd", NULL))
+ pdata->sigdir |= MCI_ST_CMDDIREN;
+
pdata->gpio_wp = of_get_named_gpio(np, "wp-gpios", 0);
pdata->gpio_cd = of_get_named_gpio(np, "cd-gpios", 0);