summaryrefslogtreecommitdiffstats
path: root/drivers/mci/mci-core.c
diff options
context:
space:
mode:
authorMarkus Niebel <Markus.Niebel@tqs.de>2014-01-14 09:23:35 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2014-01-15 15:22:43 +0100
commitf11668fee725f59ab13e40f58f46ab7e65205457 (patch)
treeb1a7dd4c3f222412f68ab5845d2abacec480d17e /drivers/mci/mci-core.c
parent78b9e4e041461047ffb27f4a12c8c7346ca34149 (diff)
downloadbarebox-f11668fee725f59ab13e40f58f46ab7e65205457.tar.gz
barebox-f11668fee725f59ab13e40f58f46ab7e65205457.tar.xz
mci: add device tree support for DSR
add optional DSR support. This should go into the kernel, too Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mci/mci-core.c')
-rw-r--r--drivers/mci/mci-core.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 12611090ff..cf38a88a9b 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -1775,6 +1775,7 @@ void mci_of_parse(struct mci_host *host)
{
struct device_node *np;
u32 bus_width;
+ u32 dsr_val;
if (!IS_ENABLED(CONFIG_OFDEVICE))
return;
@@ -1807,4 +1808,11 @@ void mci_of_parse(struct mci_host *host)
/* f_max is obtained from the optional "max-frequency" property */
of_property_read_u32(np, "max-frequency", &host->f_max);
+
+ if (!of_property_read_u32(np, "dsr", &dsr_val)) {
+ if (dsr_val < 0x10000) {
+ host->use_dsr = 1;
+ host->dsr_val = dsr_val;
+ }
+ }
}