mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] MCI: imx-esdhc: Allow to use 1-bit bus width in board files
@ 2016-05-24 16:28 Alexander Shiyan
  2016-05-25  8:40 ` Sascha Hauer
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Shiyan @ 2016-05-24 16:28 UTC (permalink / raw)
  To: barebox

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] MCI: imx-esdhc: Allow to use 1-bit bus width in board files
  2016-05-24 16:28 [PATCH] MCI: imx-esdhc: Allow to use 1-bit bus width in board files Alexander Shiyan
@ 2016-05-25  8:40 ` Sascha Hauer
  2016-05-25  8:45   ` Alexander Shiyan
  0 siblings, 1 reply; 4+ messages in thread
From: Sascha Hauer @ 2016-05-25  8:40 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: barebox

On Tue, May 24, 2016 at 07:28:02PM +0300, Alexander Shiyan wrote:
> 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(-)

Applied, thanks.

If you need this patch I assume your board still has no device tree
support. You should fix that ;)

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] MCI: imx-esdhc: Allow to use 1-bit bus width in board files
  2016-05-25  8:40 ` Sascha Hauer
@ 2016-05-25  8:45   ` Alexander Shiyan
  2016-05-25  8:48     ` Sascha Hauer
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Shiyan @ 2016-05-25  8:45 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

> Среда, 25 мая 2016, 11:40 +03:00 от Sascha Hauer <s.hauer@pengutronix.de>:
> 
> On Tue, May 24, 2016 at 07:28:02PM +0300, Alexander Shiyan wrote:
> > 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(-)
> 
> Applied, thanks.
> 
> If you need this patch I assume your board still has no device tree
> support. You should fix that ;)

Yes :)

Please fix MMC_BUS_WIDTH_4 in patch with MMC_CAP_4_BIT_DATA, this is my bug. Sorry.

Thanks.
---

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] MCI: imx-esdhc: Allow to use 1-bit bus width in board files
  2016-05-25  8:45   ` Alexander Shiyan
@ 2016-05-25  8:48     ` Sascha Hauer
  0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2016-05-25  8:48 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: barebox

On Wed, May 25, 2016 at 11:45:07AM +0300, Alexander Shiyan wrote:
> > Среда, 25 мая 2016, 11:40 +03:00 от Sascha Hauer <s.hauer@pengutronix.de>:
> > 
> > On Tue, May 24, 2016 at 07:28:02PM +0300, Alexander Shiyan wrote:
> > > 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(-)
> > 
> > Applied, thanks.
> > 
> > If you need this patch I assume your board still has no device tree
> > support. You should fix that ;)
> 
> Yes :)
> 
> Please fix MMC_BUS_WIDTH_4 in patch with MMC_CAP_4_BIT_DATA, this is my bug. Sorry.

Just did that.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-25  8:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-24 16:28 [PATCH] MCI: imx-esdhc: Allow to use 1-bit bus width in board files Alexander Shiyan
2016-05-25  8:40 ` Sascha Hauer
2016-05-25  8:45   ` Alexander Shiyan
2016-05-25  8:48     ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox