mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Shiyan <shc_work@mail.ru>
To: barebox@lists.infradead.org
Subject: [PATCH] MCI: imx-esdhc: Allow to use 1-bit bus width in board files
Date: Tue, 24 May 2016 19:28:02 +0300	[thread overview]
Message-ID: <1464107282-17942-1-git-send-email-shc_work@mail.ru> (raw)

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/boards/freescale-mx53-smd/board.c | 1 +
 arch/arm/boards/karo-tx53/board.c          | 1 +
 drivers/mci/imx-esdhc.c                    | 9 +++------
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/arch/arm/boards/freescale-mx53-smd/board.c b/arch/arm/boards/freescale-mx53-smd/board.c
index 354702d..12e5e5f 100644
--- a/arch/arm/boards/freescale-mx53-smd/board.c
+++ b/arch/arm/boards/freescale-mx53-smd/board.c
@@ -115,6 +115,7 @@ static struct esdhc_platform_data loco_sd1_data = {
 	.wp_gpio = LOCO_SD1_WP,
 	.cd_type = ESDHC_CD_GPIO,
 	.wp_type = ESDHC_WP_GPIO,
+	.caps    = MMC_BUS_WIDTH_4,
 };
 
 static struct esdhc_platform_data loco_sd3_data = {
diff --git a/arch/arm/boards/karo-tx53/board.c b/arch/arm/boards/karo-tx53/board.c
index 99aa9e7..8ad5d13 100644
--- a/arch/arm/boards/karo-tx53/board.c
+++ b/arch/arm/boards/karo-tx53/board.c
@@ -105,6 +105,7 @@ static struct esdhc_platform_data tx53_sd1_data = {
 	.cd_gpio = TX53_SD1_CD,
 	.cd_type = ESDHC_CD_GPIO,
 	.wp_type = ESDHC_WP_NONE,
+	.caps    = MMC_BUS_WIDTH_4,
 };
 
 struct imx_nand_platform_data nand_info = {
diff --git a/drivers/mci/imx-esdhc.c b/drivers/mci/imx-esdhc.c
index 2e189fe..66786ff 100644
--- a/drivers/mci/imx-esdhc.c
+++ b/drivers/mci/imx-esdhc.c
@@ -596,13 +596,10 @@ static int fsl_esdhc_probe(struct device_d *dev)
 	if (caps & ESDHC_HOSTCAPBLT_VS33)
 		mci->voltages |= MMC_VDD_32_33 | MMC_VDD_33_34;
 
-	if (pdata && pdata->caps)
+	if (pdata) {
 		mci->host_caps = pdata->caps;
-	else
-		mci->host_caps = MMC_CAP_4_BIT_DATA;
-
-	if (pdata && pdata->devname) {
-		mci->devname = pdata->devname;
+		if (pdata->devname)
+			mci->devname = pdata->devname;
 	} else if (dev->device_node) {
 		const char *alias = of_alias_get(dev->device_node);
 		if (alias)
-- 
2.4.9


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

             reply	other threads:[~2016-05-24 16:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-24 16:28 Alexander Shiyan [this message]
2016-05-25  8:40 ` Sascha Hauer
2016-05-25  8:45   ` Alexander Shiyan
2016-05-25  8:48     ` 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=1464107282-17942-1-git-send-email-shc_work@mail.ru \
    --to=shc_work@mail.ru \
    --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