mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Markus Niebel <list-09_barebox@tqsc.de>
To: barebox@lists.infradead.org
Cc: Markus Niebel <Markus.Niebel@tqs.de>
Subject: [PATCH 2/4] mci: add device tree support for DSR
Date: Tue, 14 Jan 2014 09:23:35 +0100	[thread overview]
Message-ID: <1389687817-30882-3-git-send-email-list-09_barebox@tqsc.de> (raw)
In-Reply-To: <1389687817-30882-1-git-send-email-list-09_barebox@tqsc.de>

From: Markus Niebel <Markus.Niebel@tqs.de>

add optional DSR support. This should go into the kernel, too

Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de>
---
 drivers/mci/mci-core.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 2c91ff2..b6d7d73 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -1746,6 +1746,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;
@@ -1778,4 +1779,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;
+		}
+	}
 }
-- 
1.7.9.5


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2014-01-14  8:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-14  8:23 [PATCH v2 0/4] mmc: add setdsr support Markus Niebel
2014-01-14  8:23 ` [PATCH 1/4] mci: add DSR support Markus Niebel
2014-01-14  8:23 ` Markus Niebel [this message]
2014-01-14  8:23 ` [PATCH 3/4] mci: imx-esdhc: " Markus Niebel
2014-01-14  8:49   ` Alexander Aring
2014-01-14 14:26     ` AW: " Markus Niebel
2014-01-14  8:23 ` [PATCH 4/4] boards: tqma53: add DSR support for eMMC Markus Niebel
2014-01-15 14:23 ` [PATCH v2 0/4] mmc: add setdsr support Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1389687817-30882-3-git-send-email-list-09_barebox@tqsc.de \
    --to=list-09_barebox@tqsc.de \
    --cc=Markus.Niebel@tqs.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox