linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] babbage: support mmc device
@ 2010-10-20  8:53 Shawn Guo
  2010-10-20  9:22 ` [PATCH 1/2] mmc: quirk fix for timeout problem Shawn Guo
  2010-10-20  9:24 ` [PATCH 2/2] babbage: esdhc device registration Shawn Guo
  0 siblings, 2 replies; 24+ messages in thread
From: Shawn Guo @ 2010-10-20  8:53 UTC (permalink / raw)
  To: linux-arm-kernel

The patches are to support mmc device on imx51 babbage board,
based on Wolfram Sang's esdhc driver and Eric B?nard's device
registration bits.

The patches were tested on babbage with Sascha's tree

 git://git.pengutronix.de/git/imx/linux-2.6.git imx-for-2.6.37

merging mmc-next branch of cjb's tree below.

 git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc.git

Shawn Guo (2):
 [PATCH 1/2] mmc: quirk fix for timeout problem
 [PATCH 2/2] babbage: esdhc device registration

 arch/arm/mach-mx5/Kconfig              |    1 +
 arch/arm/mach-mx5/board-mx51_babbage.c |   19 +++++++++++++++++++
 drivers/mmc/host/sdhci-esdhc-imx.c     |    3 ++-
 3 files changed, 22 insertions(+), 1 deletions(-)

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

* [PATCH 1/2] mmc: quirk fix for timeout problem
  2010-10-20  8:53 [PATCH 0/2] babbage: support mmc device Shawn Guo
@ 2010-10-20  9:22 ` Shawn Guo
  2010-10-20 11:27   ` Wolfram Sang
  2010-10-20  9:24 ` [PATCH 2/2] babbage: esdhc device registration Shawn Guo
  1 sibling, 1 reply; 24+ messages in thread
From: Shawn Guo @ 2010-10-20  9:22 UTC (permalink / raw)
  To: linux-arm-kernel

This patch is to fix timeout problem which was seen on babbage.
Thanks Richard Zhu <r65037@freescale.com> for catching this.

Signed-off-by: Shawn Guo <shawn.gsc@gmail.com>
---
 drivers/mmc/host/sdhci-esdhc-imx.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 2e9cca1..e8f7048 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -134,7 +134,8 @@ static struct sdhci_ops sdhci_esdhc_ops = {
 
 struct sdhci_pltfm_data sdhci_esdhc_imx_pdata = {
 	.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_NO_MULTIBLOCK
-			| SDHCI_QUIRK_BROKEN_ADMA,
+			| SDHCI_QUIRK_BROKEN_ADMA
+			| SDHCI_QUIRK_BROKEN_TIMEOUT_VAL,
 	/* ADMA has issues. Might be fixable */
 	/* NO_MULTIBLOCK might be MX35 only (Errata: ENGcm07207) */
 	.ops = &sdhci_esdhc_ops,
-- 
1.7.1

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

* [PATCH 2/2] babbage: esdhc device registration
  2010-10-20  8:53 [PATCH 0/2] babbage: support mmc device Shawn Guo
  2010-10-20  9:22 ` [PATCH 1/2] mmc: quirk fix for timeout problem Shawn Guo
@ 2010-10-20  9:24 ` Shawn Guo
  2010-10-20 11:30   ` Wolfram Sang
  2010-10-20 11:52   ` Amit Kucheria
  1 sibling, 2 replies; 24+ messages in thread
From: Shawn Guo @ 2010-10-20  9:24 UTC (permalink / raw)
  To: linux-arm-kernel

This patch is based on Eric B?nard's bits below to add esdhc
device registration for babbage board.

 - cpuimx51: update board support
 - clock-mx51: factorize clk_set_parent and clk_get_rate
 - imx-esdhc: update devices registration

Signed-off-by: Shawn Guo <shawn.gsc@gmail.com>
---
 arch/arm/mach-mx5/Kconfig              |    1 +
 arch/arm/mach-mx5/board-mx51_babbage.c |   19 +++++++++++++++++++
 2 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig
index a2df9ac..fe96cd2 100644
--- a/arch/arm/mach-mx5/Kconfig
+++ b/arch/arm/mach-mx5/Kconfig
@@ -13,6 +13,7 @@ config MACH_MX51_BABBAGE
 	bool "Support MX51 BABBAGE platforms"
 	select IMX_HAVE_PLATFORM_IMX_I2C
 	select IMX_HAVE_PLATFORM_IMX_UART
+	select IMX_HAVE_PLATFORM_ESDHC
 	help
 	  Include support for MX51 Babbage platform, also known as MX51EVK in
 	  u-boot. This includes specific configurations for the board and its
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c
index 23ee4a4..39304b4 100644
--- a/arch/arm/mach-mx5/board-mx51_babbage.c
+++ b/arch/arm/mach-mx5/board-mx51_babbage.c
@@ -112,6 +112,22 @@ static struct pad_desc mx51babbage_pads[] = {
 
 	/* FEC PHY reset line */
 	MX51_PAD_EIM_A20__GPIO_2_14,
+
+	/* SD 1 */
+	MX51_PAD_SD1_CMD__SD1_CMD,
+	MX51_PAD_SD1_CLK__SD1_CLK,
+	MX51_PAD_SD1_DATA0__SD1_DATA0,
+	MX51_PAD_SD1_DATA1__SD1_DATA1,
+	MX51_PAD_SD1_DATA2__SD1_DATA2,
+	MX51_PAD_SD1_DATA3__SD1_DATA3,
+
+	/* SD 2 */
+	MX51_PAD_SD2_CMD__SD2_CMD,
+	MX51_PAD_SD2_CLK__SD2_CLK,
+	MX51_PAD_SD2_DATA0__SD2_DATA0,
+	MX51_PAD_SD2_DATA1__SD2_DATA1,
+	MX51_PAD_SD2_DATA2__SD2_DATA2,
+	MX51_PAD_SD2_DATA3__SD2_DATA3,
 };
 
 /* Serial ports */
@@ -304,6 +320,9 @@ static void __init mxc_board_init(void)
 	/* setback USBH1_STP to be function */
 	mxc_iomux_v3_setup_pad(&usbh1stp);
 	babbage_usbhub_reset();
+
+	imx51_add_esdhc(0, NULL);
+	imx51_add_esdhc(1, NULL);
 }
 
 static void __init mx51_babbage_timer_init(void)
-- 
1.7.1

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

* [PATCH 1/2] mmc: quirk fix for timeout problem
  2010-10-20  9:22 ` [PATCH 1/2] mmc: quirk fix for timeout problem Shawn Guo
@ 2010-10-20 11:27   ` Wolfram Sang
  2010-10-21 16:11     ` Shawn Guo
  0 siblings, 1 reply; 24+ messages in thread
From: Wolfram Sang @ 2010-10-20 11:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 20, 2010 at 05:22:56PM +0800, Shawn Guo wrote:
> This patch is to fix timeout problem which was seen on babbage.
> Thanks Richard Zhu <r65037@freescale.com> for catching this.
> 
> Signed-off-by: Shawn Guo <shawn.gsc@gmail.com>

NACK. It is still untested if we need that quirk on MX25/35.
Eric wanted to send an updated patch next week.

(And this patch has to go via the mmc-tree IMO)

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20101020/94769a16/attachment.sig>

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

* [PATCH 2/2] babbage: esdhc device registration
  2010-10-20  9:24 ` [PATCH 2/2] babbage: esdhc device registration Shawn Guo
@ 2010-10-20 11:30   ` Wolfram Sang
  2010-10-20 11:52   ` Amit Kucheria
  1 sibling, 0 replies; 24+ messages in thread
From: Wolfram Sang @ 2010-10-20 11:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 20, 2010 at 05:24:07PM +0800, Shawn Guo wrote:
> This patch is based on Eric B?nard's bits below to add esdhc
> device registration for babbage board.
> 
>  - cpuimx51: update board support
>  - clock-mx51: factorize clk_set_parent and clk_get_rate
>  - imx-esdhc: update devices registration
> 
> Signed-off-by: Shawn Guo <shawn.gsc@gmail.com>

Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20101020/10db5b55/attachment.sig>

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

* [PATCH 2/2] babbage: esdhc device registration
  2010-10-20  9:24 ` [PATCH 2/2] babbage: esdhc device registration Shawn Guo
  2010-10-20 11:30   ` Wolfram Sang
@ 2010-10-20 11:52   ` Amit Kucheria
  1 sibling, 0 replies; 24+ messages in thread
From: Amit Kucheria @ 2010-10-20 11:52 UTC (permalink / raw)
  To: linux-arm-kernel

On 10 Oct 20, Shawn Guo wrote:
> This patch is based on Eric B?nard's bits below to add esdhc
> device registration for babbage board.
> 
>  - cpuimx51: update board support
>  - clock-mx51: factorize clk_set_parent and clk_get_rate
>  - imx-esdhc: update devices registration

This is a description of Eric's patches, you don't require them in your patch
description. Just noting in your 0/2 that this patchset depends on Eric's is
ok.

Your desciption can be

"Update babbage board support to register esdhc device"

> Signed-off-by: Shawn Guo <shawn.gsc@gmail.com>

Otherwise,
Acked-by: Amit Kucheria <amit.kucheria@linaro.org>


> ---
>  arch/arm/mach-mx5/Kconfig              |    1 +
>  arch/arm/mach-mx5/board-mx51_babbage.c |   19 +++++++++++++++++++
>  2 files changed, 20 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig
> index a2df9ac..fe96cd2 100644
> --- a/arch/arm/mach-mx5/Kconfig
> +++ b/arch/arm/mach-mx5/Kconfig
> @@ -13,6 +13,7 @@ config MACH_MX51_BABBAGE
>  	bool "Support MX51 BABBAGE platforms"
>  	select IMX_HAVE_PLATFORM_IMX_I2C
>  	select IMX_HAVE_PLATFORM_IMX_UART
> +	select IMX_HAVE_PLATFORM_ESDHC
>  	help
>  	  Include support for MX51 Babbage platform, also known as MX51EVK in
>  	  u-boot. This includes specific configurations for the board and its
> diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c
> index 23ee4a4..39304b4 100644
> --- a/arch/arm/mach-mx5/board-mx51_babbage.c
> +++ b/arch/arm/mach-mx5/board-mx51_babbage.c
> @@ -112,6 +112,22 @@ static struct pad_desc mx51babbage_pads[] = {
>  
>  	/* FEC PHY reset line */
>  	MX51_PAD_EIM_A20__GPIO_2_14,
> +
> +	/* SD 1 */
> +	MX51_PAD_SD1_CMD__SD1_CMD,
> +	MX51_PAD_SD1_CLK__SD1_CLK,
> +	MX51_PAD_SD1_DATA0__SD1_DATA0,
> +	MX51_PAD_SD1_DATA1__SD1_DATA1,
> +	MX51_PAD_SD1_DATA2__SD1_DATA2,
> +	MX51_PAD_SD1_DATA3__SD1_DATA3,
> +
> +	/* SD 2 */
> +	MX51_PAD_SD2_CMD__SD2_CMD,
> +	MX51_PAD_SD2_CLK__SD2_CLK,
> +	MX51_PAD_SD2_DATA0__SD2_DATA0,
> +	MX51_PAD_SD2_DATA1__SD2_DATA1,
> +	MX51_PAD_SD2_DATA2__SD2_DATA2,
> +	MX51_PAD_SD2_DATA3__SD2_DATA3,
>  };
>  
>  /* Serial ports */
> @@ -304,6 +320,9 @@ static void __init mxc_board_init(void)
>  	/* setback USBH1_STP to be function */
>  	mxc_iomux_v3_setup_pad(&usbh1stp);
>  	babbage_usbhub_reset();
> +
> +	imx51_add_esdhc(0, NULL);
> +	imx51_add_esdhc(1, NULL);
>  }
>  
>  static void __init mx51_babbage_timer_init(void)
> -- 
> 1.7.1
> 

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

* [PATCH 1/2] mmc: quirk fix for timeout problem
  2010-10-20 11:27   ` Wolfram Sang
@ 2010-10-21 16:11     ` Shawn Guo
  2010-10-21 16:43       ` Wolfram Sang
  2010-10-21 17:10       ` Nicolas Pitre
  0 siblings, 2 replies; 24+ messages in thread
From: Shawn Guo @ 2010-10-21 16:11 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Wolfram,

On Wed, Oct 20, 2010 at 7:27 PM, Wolfram Sang <w.sang@pengutronix.de> wrote:
> On Wed, Oct 20, 2010 at 05:22:56PM +0800, Shawn Guo wrote:
>> This patch is to fix timeout problem which was seen on babbage.
>> Thanks Richard Zhu <r65037@freescale.com> for catching this.
>>
>> Signed-off-by: Shawn Guo <shawn.gsc@gmail.com>
>
> NACK. It is still untested if we need that quirk on MX25/35.
> Eric wanted to send an updated patch next week.
>

I just tested the code change on mx35_3ds and mx25_3ds, and no problem
was seen.  I will send the patch for mmc support on mx35_3ds and
mx25_3ds soon.

-- 
Regards,
Shawn

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

* [PATCH 1/2] mmc: quirk fix for timeout problem
  2010-10-21 16:11     ` Shawn Guo
@ 2010-10-21 16:43       ` Wolfram Sang
  2010-10-21 17:10       ` Nicolas Pitre
  1 sibling, 0 replies; 24+ messages in thread
From: Wolfram Sang @ 2010-10-21 16:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Oct 22, 2010 at 12:11:56AM +0800, Shawn Guo wrote:
> Hi Wolfram,
> 
> On Wed, Oct 20, 2010 at 7:27 PM, Wolfram Sang <w.sang@pengutronix.de> wrote:
> > On Wed, Oct 20, 2010 at 05:22:56PM +0800, Shawn Guo wrote:
> >> This patch is to fix timeout problem which was seen on babbage.
> >> Thanks Richard Zhu <r65037@freescale.com> for catching this.
> >>
> >> Signed-off-by: Shawn Guo <shawn.gsc@gmail.com>
> >
> > NACK. It is still untested if we need that quirk on MX25/35.
> > Eric wanted to send an updated patch next week.
> >
> 
> I just tested the code change on mx35_3ds and mx25_3ds, and no problem
> was seen.  I will send the patch for mmc support on mx35_3ds and
> mx25_3ds soon.

The question is more if they work _without_ the additional quirk.

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20101021/dd3ed0ab/attachment.sig>

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

* [PATCH 1/2] mmc: quirk fix for timeout problem
  2010-10-21 16:11     ` Shawn Guo
  2010-10-21 16:43       ` Wolfram Sang
@ 2010-10-21 17:10       ` Nicolas Pitre
  2010-10-21 18:14         ` Shawn Guo
  1 sibling, 1 reply; 24+ messages in thread
From: Nicolas Pitre @ 2010-10-21 17:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 22 Oct 2010, Shawn Guo wrote:

> Hi Wolfram,
> 
> On Wed, Oct 20, 2010 at 7:27 PM, Wolfram Sang <w.sang@pengutronix.de> wrote:
> > On Wed, Oct 20, 2010 at 05:22:56PM +0800, Shawn Guo wrote:
> >> This patch is to fix timeout problem which was seen on babbage.
> >> Thanks Richard Zhu <r65037@freescale.com> for catching this.
> >>
> >> Signed-off-by: Shawn Guo <shawn.gsc@gmail.com>
> >
> > NACK. It is still untested if we need that quirk on MX25/35.
> > Eric wanted to send an updated patch next week.
> >
> 
> I just tested the code change on mx35_3ds and mx25_3ds, and no problem
> was seen.  I will send the patch for mmc support on mx35_3ds and
> mx25_3ds soon.

The question is... is this quirk actually needed on those?  Did you test 
_without_ it?


Nicolas

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

* [PATCH 1/2] mmc: quirk fix for timeout problem
  2010-10-21 17:10       ` Nicolas Pitre
@ 2010-10-21 18:14         ` Shawn Guo
  2010-10-21 20:28           ` Eric Bénard
  0 siblings, 1 reply; 24+ messages in thread
From: Shawn Guo @ 2010-10-21 18:14 UTC (permalink / raw)
  To: linux-arm-kernel

It also works fine on mx35_3ds without that timeout quirk.

My mx25_3ds gets something wrong.  Will try to fix it and test this tomorrow.


On Fri, Oct 22, 2010 at 1:10 AM, Nicolas Pitre <nicolas.pitre@linaro.org> wrote:
> On Fri, 22 Oct 2010, Shawn Guo wrote:
>
>> Hi Wolfram,
>>
>> On Wed, Oct 20, 2010 at 7:27 PM, Wolfram Sang <w.sang@pengutronix.de> wrote:
>> > On Wed, Oct 20, 2010 at 05:22:56PM +0800, Shawn Guo wrote:
>> >> This patch is to fix timeout problem which was seen on babbage.
>> >> Thanks Richard Zhu <r65037@freescale.com> for catching this.
>> >>
>> >> Signed-off-by: Shawn Guo <shawn.gsc@gmail.com>
>> >
>> > NACK. It is still untested if we need that quirk on MX25/35.
>> > Eric wanted to send an updated patch next week.
>> >
>>
>> I just tested the code change on mx35_3ds and mx25_3ds, and no problem
>> was seen. ?I will send the patch for mmc support on mx35_3ds and
>> mx25_3ds soon.
>
> The question is... is this quirk actually needed on those? ?Did you test
> _without_ it?
>
>
> Nicolas
>



-- 
Regards,
Shawn

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

* [PATCH 1/2] mmc: quirk fix for timeout problem
  2010-10-21 18:14         ` Shawn Guo
@ 2010-10-21 20:28           ` Eric Bénard
  2010-10-21 21:20             ` [PATCH 1/2] sdhci-esdhc-imx: fix timeout on i.MX's sdhci Eric Bénard
                               ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Eric Bénard @ 2010-10-21 20:28 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

test protocol : booting a 2.6.36-rc8 kernel with a rootfs (ext3 formated, 
generated with OpenEmbedded for armv5, loading and launching qtdemo 4.6.3) on 
a 8GB ?SDHC  (uSD reformated after each board tests to trigger lot of 
read/writes on the first init).

* on an i.MX357 (rev 2.1) without this patch leads to :
mmcblk0: error -110 transferring data, sector 7347024, nr 8, card status 0xe00
end_request: I/O error, dev mmcblk0, sector 7347025

Same card, same board, with the timeout quirk patch : boots fine without any 
error.

Reverted the patch: timeout errors came back.

==> quirk timeout patch needed for the i.MX35

* on an i.MX257 (tested twice) :
Same kernel tree, same rootfs, same motherboard, same uSD, only the CPU module 
change : no error without the patch (and no error with the patch also ;-).

==> quirk timeout patch not needed for the i.MX25

* on an i.MX515 :
Same kernel tree, same rootfs, same motherboard, same uSD (re-formated), only 
the CPU module change without this patch leads to :
mmcblk0: error -84 transferring data, sector 1315598, nr 2, card status 0x900
end_request: I/O error, dev mmcblk0, sector 1315598

Same card, same board, with the timeout quirk patch : boots fine without any 
error.

Reverted the patch: timeout errors came back.

==> quirk timeout patch needed for the i.MX51

Updated patch follows.

Eric

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

* [PATCH 1/2] sdhci-esdhc-imx: fix timeout on i.MX's sdhci
  2010-10-21 20:28           ` Eric Bénard
@ 2010-10-21 21:20             ` Eric Bénard
  2010-10-22  6:15               ` Wolfram Sang
  2010-10-22 23:12               ` Chris Ball
  2010-10-21 21:20             ` Eric Bénard
  2010-10-22  4:39             ` [PATCH 1/2] mmc: quirk fix for timeout problem Shawn Guo
  2 siblings, 2 replies; 24+ messages in thread
From: Eric Bénard @ 2010-10-21 21:20 UTC (permalink / raw)
  To: linux-arm-kernel

this patch fix timeout problems on i.MX's sdhci as suggested by
Richard Zhu.

Tested on :
- i.MX257 : not needed
- i.MX357 : needed
- i.MX515 : needed

more details can be found here :
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/029748.html

Signed-off-by: Eric B?nard <eric@eukrea.com>
Tested-by: Shawn Guo <shawn.gsc@gmail.com>
---
 drivers/mmc/host/sdhci-esdhc-imx.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index afbac9a..11e1ae1 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -130,6 +130,12 @@ static int esdhc_pltfm_init(struct sdhci_host *host, struct sdhci_pltfm_data *pd
 		gpio_request(boarddata->wp_gpio, "SD_WP");
 		gpio_direction_input(boarddata->wp_gpio);
 	}
+
+	if (cpu_is_mx35() || cpu_is_mx51()) {
+		dev_info(mmc_dev(host->mmc), "using broken timeout quirk\n");
+		host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
+	}
+
 	return 0;
 }
 
-- 
1.7.0.4

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

* [PATCH 2/2] sdhci-esdhc-imx: enable QUIRK_NO_MULTIBLOCK only for i.MX25 and i.MX35
  2010-10-21 20:28           ` Eric Bénard
  2010-10-21 21:20             ` [PATCH 1/2] sdhci-esdhc-imx: fix timeout on i.MX's sdhci Eric Bénard
@ 2010-10-21 21:20             ` Eric Bénard
  2010-10-22  6:18               ` Wolfram Sang
  2010-10-22  4:39             ` [PATCH 1/2] mmc: quirk fix for timeout problem Shawn Guo
  2 siblings, 1 reply; 24+ messages in thread
From: Eric Bénard @ 2010-10-21 21:20 UTC (permalink / raw)
  To: linux-arm-kernel

only these CPU's errata list this bug.

Signed-off-by: Eric B?nard <eric@eukrea.com>
---
 drivers/mmc/host/sdhci-esdhc-imx.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 11e1ae1..4d67f58 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -136,6 +136,12 @@ static int esdhc_pltfm_init(struct sdhci_host *host, struct sdhci_pltfm_data *pd
 		host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
 	}
 
+	/* fix errata ENGcm07207 which is present on i.MX25 and i.MX35 */
+	if (cpu_is_mx25() || cpu_is_mx35()) {
+		dev_info(mmc_dev(host->mmc), "using ENGcm07207 workaround\n");
+		host->quirks |= SDHCI_QUIRK_NO_MULTIBLOCK;
+	}
+
 	return 0;
 }
 
@@ -162,10 +168,8 @@ static struct sdhci_ops sdhci_esdhc_ops = {
 };
 
 struct sdhci_pltfm_data sdhci_esdhc_imx_pdata = {
-	.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_NO_MULTIBLOCK
-			| SDHCI_QUIRK_BROKEN_ADMA,
+	.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_BROKEN_ADMA,
 	/* ADMA has issues. Might be fixable */
-	/* NO_MULTIBLOCK might be MX35 only (Errata: ENGcm07207) */
 	.ops = &sdhci_esdhc_ops,
 	.init = esdhc_pltfm_init,
 	.exit = esdhc_pltfm_exit,
-- 
1.7.0.4

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

* [PATCH 1/2] mmc: quirk fix for timeout problem
  2010-10-21 20:28           ` Eric Bénard
  2010-10-21 21:20             ` [PATCH 1/2] sdhci-esdhc-imx: fix timeout on i.MX's sdhci Eric Bénard
  2010-10-21 21:20             ` Eric Bénard
@ 2010-10-22  4:39             ` Shawn Guo
  2 siblings, 0 replies; 24+ messages in thread
From: Shawn Guo @ 2010-10-22  4:39 UTC (permalink / raw)
  To: linux-arm-kernel

Last night, I booted the system up with NFS, tested mmc
mount/read/write, and did not see timeout error.  With Eric's result,
I just did the test differently.  Writing an ext2 rootfs image on the
card, booting the system from mmc directly, and timeout error is being
seen on mx35_3ds.  As expected, the timeout quirk can fix it.

Sorry for the confusion.


On Fri, Oct 22, 2010 at 4:28 AM, Eric B?nard <eric@eukrea.com> wrote:
> Hi,
>
> test protocol : booting a 2.6.36-rc8 kernel with a rootfs (ext3 formated,
> generated with OpenEmbedded for armv5, loading and launching qtdemo 4.6.3)
> on a 8GB ?DHC ?(uSD reformated after each board tests to trigger lot of
> read/writes on the first init).
>
> * on an i.MX357 (rev 2.1) without this patch leads to :
> mmcblk0: error -110 transferring data, sector 7347024, nr 8, card status
> 0xe00
> end_request: I/O error, dev mmcblk0, sector 7347025
>
> Same card, same board, with the timeout quirk patch : boots fine without any
> error.
>
> Reverted the patch: timeout errors came back.
>
> ==> quirk timeout patch needed for the i.MX35
>
> * on an i.MX257 (tested twice) :
> Same kernel tree, same rootfs, same motherboard, same uSD, only the CPU
> module change : no error without the patch (and no error with the patch also
> ;-).
>
> ==> quirk timeout patch not needed for the i.MX25
>
> * on an i.MX515 :
> Same kernel tree, same rootfs, same motherboard, same uSD (re-formated),
> only the CPU module change without this patch leads to :
> mmcblk0: error -84 transferring data, sector 1315598, nr 2, card status
> 0x900
> end_request: I/O error, dev mmcblk0, sector 1315598
>
> Same card, same board, with the timeout quirk patch : boots fine without any
> error.
>
> Reverted the patch: timeout errors came back.
>
> ==> quirk timeout patch needed for the i.MX51
>
> Updated patch follows.
>
> Eric
>



-- 
Regards,
Shawn

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

* [PATCH 1/2] sdhci-esdhc-imx: fix timeout on i.MX's sdhci
  2010-10-21 21:20             ` [PATCH 1/2] sdhci-esdhc-imx: fix timeout on i.MX's sdhci Eric Bénard
@ 2010-10-22  6:15               ` Wolfram Sang
  2010-10-22 23:12               ` Chris Ball
  1 sibling, 0 replies; 24+ messages in thread
From: Wolfram Sang @ 2010-10-22  6:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Oct 21, 2010 at 11:20:27PM +0200, Eric B?nard wrote:
> this patch fix timeout problems on i.MX's sdhci as suggested by
> Richard Zhu.
> 
> Tested on :
> - i.MX257 : not needed
> - i.MX357 : needed
> - i.MX515 : needed
> 
> more details can be found here :
> http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/029748.html
> 
> Signed-off-by: Eric B?nard <eric@eukrea.com>
> Tested-by: Shawn Guo <shawn.gsc@gmail.com>
> ---
>  drivers/mmc/host/sdhci-esdhc-imx.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index afbac9a..11e1ae1 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -130,6 +130,12 @@ static int esdhc_pltfm_init(struct sdhci_host *host, struct sdhci_pltfm_data *pd
>  		gpio_request(boarddata->wp_gpio, "SD_WP");
>  		gpio_direction_input(boarddata->wp_gpio);
>  	}
> +
> +	if (cpu_is_mx35() || cpu_is_mx51()) {
> +		dev_info(mmc_dev(host->mmc), "using broken timeout quirk\n");

Please drop this line. The boot log is full enough IMO :)

Other than that:

Acked-by: Wolfram Sang <w.sang@pengutronix.de>

> +		host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
> +	}
> +
>  	return 0;
>  }
>  
> -- 
> 1.7.0.4
> 

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20101022/ed08e96b/attachment.sig>

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

* [PATCH 2/2] sdhci-esdhc-imx: enable QUIRK_NO_MULTIBLOCK only for i.MX25 and i.MX35
  2010-10-21 21:20             ` Eric Bénard
@ 2010-10-22  6:18               ` Wolfram Sang
  2010-10-22  7:07                 ` Eric Bénard
                                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Wolfram Sang @ 2010-10-22  6:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Oct 21, 2010 at 11:20:28PM +0200, Eric B?nard wrote:
> only these CPU's errata list this bug.

So, it was not directly tested?

> 
> Signed-off-by: Eric B?nard <eric@eukrea.com>
> ---
>  drivers/mmc/host/sdhci-esdhc-imx.c |   10 +++++++---
>  1 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 11e1ae1..4d67f58 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -136,6 +136,12 @@ static int esdhc_pltfm_init(struct sdhci_host *host, struct sdhci_pltfm_data *pd
>  		host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
>  	}
>  
> +	/* fix errata ENGcm07207 which is present on i.MX25 and i.MX35 */
> +	if (cpu_is_mx25() || cpu_is_mx35()) {
> +		dev_info(mmc_dev(host->mmc), "using ENGcm07207 workaround\n");

Same here, no printout please (or do you see a reason for it?)

> +		host->quirks |= SDHCI_QUIRK_NO_MULTIBLOCK;
> +	}
> +
>  	return 0;
>  }
>  
> @@ -162,10 +168,8 @@ static struct sdhci_ops sdhci_esdhc_ops = {
>  };
>  
>  struct sdhci_pltfm_data sdhci_esdhc_imx_pdata = {
> -	.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_NO_MULTIBLOCK
> -			| SDHCI_QUIRK_BROKEN_ADMA,
> +	.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_BROKEN_ADMA,
>  	/* ADMA has issues. Might be fixable */
> -	/* NO_MULTIBLOCK might be MX35 only (Errata: ENGcm07207) */
>  	.ops = &sdhci_esdhc_ops,
>  	.init = esdhc_pltfm_init,
>  	.exit = esdhc_pltfm_exit,

Other than that, looks good. Thanks.

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20101022/28acc0da/attachment.sig>

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

* [PATCH 2/2] sdhci-esdhc-imx: enable QUIRK_NO_MULTIBLOCK only for i.MX25 and i.MX35
  2010-10-22  6:18               ` Wolfram Sang
@ 2010-10-22  7:07                 ` Eric Bénard
  2010-10-22  8:46                 ` [PATCH v2 1/2] sdhci-esdhc-imx: fix timeout on i.MX's sdhci Eric Bénard
  2010-10-22  8:46                 ` [PATCH v2 2/2] sdhci-esdhc-imx: enable QUIRK_NO_MULTIBLOCK only for i.MX25 and i.MX35 Eric Bénard
  2 siblings, 0 replies; 24+ messages in thread
From: Eric Bénard @ 2010-10-22  7:07 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Wolfram,

Le 22/10/2010 08:18, Wolfram Sang a ?crit :
> On Thu, Oct 21, 2010 at 11:20:28PM +0200, Eric B?nard wrote:
>> only these CPU's errata list this bug.
>
> So, it was not directly tested?
>
While I was testing the other quirk, I tested this one on 25, 35 & 51, but I 
can't trigger the bug on any of these CPU (without the quirk : the bug suppose 
there is an error reading one block and that the MMC layer then sends CMD12 
which can't stop the AHB transfer and thus the controler stays blocked. As I 
didn't met an error to read a block, I wasn't able to trigger the bug.

Eric

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

* [PATCH v2 1/2] sdhci-esdhc-imx: fix timeout on i.MX's sdhci
  2010-10-22  6:18               ` Wolfram Sang
  2010-10-22  7:07                 ` Eric Bénard
@ 2010-10-22  8:46                 ` Eric Bénard
  2010-10-22  8:46                 ` [PATCH v2 2/2] sdhci-esdhc-imx: enable QUIRK_NO_MULTIBLOCK only for i.MX25 and i.MX35 Eric Bénard
  2 siblings, 0 replies; 24+ messages in thread
From: Eric Bénard @ 2010-10-22  8:46 UTC (permalink / raw)
  To: linux-arm-kernel

this patch fix timeout problems on i.MX's sdhci as suggested by
Richard Zhu.

Tested on :
- i.MX257 : not needed
- i.MX357 : needed
- i.MX515 : needed

more details can be found here :
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/029748.html

Signed-off-by: Eric B?nard <eric@eukrea.com>
Tested-by: Shawn Guo <shawn.gsc@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
---
 drivers/mmc/host/sdhci-esdhc-imx.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index afbac9a..31256ad 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -130,6 +130,10 @@ static int esdhc_pltfm_init(struct sdhci_host *host, struct sdhci_pltfm_data *pd
 		gpio_request(boarddata->wp_gpio, "SD_WP");
 		gpio_direction_input(boarddata->wp_gpio);
 	}
+
+	if (cpu_is_mx35() || cpu_is_mx51())
+		host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
+
 	return 0;
 }
 
-- 
1.7.0.4

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

* [PATCH v2 2/2] sdhci-esdhc-imx: enable QUIRK_NO_MULTIBLOCK only for i.MX25 and i.MX35
  2010-10-22  6:18               ` Wolfram Sang
  2010-10-22  7:07                 ` Eric Bénard
  2010-10-22  8:46                 ` [PATCH v2 1/2] sdhci-esdhc-imx: fix timeout on i.MX's sdhci Eric Bénard
@ 2010-10-22  8:46                 ` Eric Bénard
  2010-10-22 10:54                   ` Wolfram Sang
  2 siblings, 1 reply; 24+ messages in thread
From: Eric Bénard @ 2010-10-22  8:46 UTC (permalink / raw)
  To: linux-arm-kernel

only these CPU's errata list this bug.

Signed-off-by: Eric B?nard <eric@eukrea.com>
---
 drivers/mmc/host/sdhci-esdhc-imx.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 31256ad..14d2836 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -134,6 +134,10 @@ static int esdhc_pltfm_init(struct sdhci_host *host, struct sdhci_pltfm_data *pd
 	if (cpu_is_mx35() || cpu_is_mx51())
 		host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
 
+	/* fix errata ENGcm07207 which is present on i.MX25 and i.MX35 */
+	if (cpu_is_mx25() || cpu_is_mx35())
+		host->quirks |= SDHCI_QUIRK_NO_MULTIBLOCK;
+
 	return 0;
 }
 
@@ -160,10 +164,8 @@ static struct sdhci_ops sdhci_esdhc_ops = {
 };
 
 struct sdhci_pltfm_data sdhci_esdhc_imx_pdata = {
-	.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_NO_MULTIBLOCK
-			| SDHCI_QUIRK_BROKEN_ADMA,
+	.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_BROKEN_ADMA,
 	/* ADMA has issues. Might be fixable */
-	/* NO_MULTIBLOCK might be MX35 only (Errata: ENGcm07207) */
 	.ops = &sdhci_esdhc_ops,
 	.init = esdhc_pltfm_init,
 	.exit = esdhc_pltfm_exit,
-- 
1.7.0.4

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

* [PATCH v2 2/2] sdhci-esdhc-imx: enable QUIRK_NO_MULTIBLOCK only for i.MX25 and i.MX35
  2010-10-22  8:46                 ` [PATCH v2 2/2] sdhci-esdhc-imx: enable QUIRK_NO_MULTIBLOCK only for i.MX25 and i.MX35 Eric Bénard
@ 2010-10-22 10:54                   ` Wolfram Sang
  0 siblings, 0 replies; 24+ messages in thread
From: Wolfram Sang @ 2010-10-22 10:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Oct 22, 2010 at 10:46:19AM +0200, Eric B?nard wrote:
> only these CPU's errata list this bug.
> 
> Signed-off-by: Eric B?nard <eric@eukrea.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20101022/bb1a5808/attachment.sig>

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

* [PATCH 1/2] sdhci-esdhc-imx: fix timeout on i.MX's sdhci
  2010-10-21 21:20             ` [PATCH 1/2] sdhci-esdhc-imx: fix timeout on i.MX's sdhci Eric Bénard
  2010-10-22  6:15               ` Wolfram Sang
@ 2010-10-22 23:12               ` Chris Ball
  2010-10-22 23:57                 ` Eric Bénard
  2010-10-22 23:57                 ` [PATCH 2/2] sdhci-esdhc-imx: enable QUIRK_NO_MULTIBLOCK only for i.MX25 and i.MX35 Eric Bénard
  1 sibling, 2 replies; 24+ messages in thread
From: Chris Ball @ 2010-10-22 23:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Oct 21, 2010 at 11:20:27PM +0200, Eric B?nard wrote:
> this patch fix timeout problems on i.MX's sdhci as suggested by
> Richard Zhu.
> 
> Tested on :
> - i.MX257 : not needed
> - i.MX357 : needed
> - i.MX515 : needed
> 
> more details can be found here :
> http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/029748.html
> 
> Signed-off-by: Eric B?nard <eric@eukrea.com>
> Tested-by: Shawn Guo <shawn.gsc@gmail.com>
> ---
>  drivers/mmc/host/sdhci-esdhc-imx.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index afbac9a..11e1ae1 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -130,6 +130,12 @@ static int esdhc_pltfm_init(struct sdhci_host *host, struct sdhci_pltfm_data *pd
>  		gpio_request(boarddata->wp_gpio, "SD_WP");
>  		gpio_direction_input(boarddata->wp_gpio);
>  	}
> +
> +	if (cpu_is_mx35() || cpu_is_mx51()) {
> +		dev_info(mmc_dev(host->mmc), "using broken timeout quirk\n");
> +		host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
> +	}
> +
>  	return 0;
>  }
>  

This has Wolfram's RFC wp-on-gpio patch applied.  Want to repost these
against mmc-next?

I'll plan on leaving this until after -rc1, so that I can send out a
pull request shortly.  Thanks,

-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

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

* [PATCH 1/2] sdhci-esdhc-imx: fix timeout on i.MX's sdhci
  2010-10-22 23:12               ` Chris Ball
@ 2010-10-22 23:57                 ` Eric Bénard
  2010-11-07 22:51                   ` Chris Ball
  2010-10-22 23:57                 ` [PATCH 2/2] sdhci-esdhc-imx: enable QUIRK_NO_MULTIBLOCK only for i.MX25 and i.MX35 Eric Bénard
  1 sibling, 1 reply; 24+ messages in thread
From: Eric Bénard @ 2010-10-22 23:57 UTC (permalink / raw)
  To: linux-arm-kernel

this patch fix timeout problems on i.MX's sdhci as suggested by
Richard Zhu.

Tested on :
- i.MX257 : not needed
- i.MX357 : needed
- i.MX515 : needed

more details can be found here :
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/029748.html

Signed-off-by: Eric B?nard <eric@eukrea.com>
Tested-by: Shawn Guo <shawn.gsc@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
---
 drivers/mmc/host/sdhci-esdhc-imx.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 2e9cca1..28e63ef 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -17,6 +17,7 @@
 #include <linux/clk.h>
 #include <linux/mmc/host.h>
 #include <linux/mmc/sdhci-pltfm.h>
+#include <mach/hardware.h>
 #include "sdhci.h"
 #include "sdhci-pltfm.h"
 #include "sdhci-esdhc.h"
@@ -112,6 +113,9 @@ static int esdhc_pltfm_init(struct sdhci_host *host, struct sdhci_pltfm_data *pd
 	clk_enable(clk);
 	pltfm_host->clk = clk;
 
+	if (cpu_is_mx35() || cpu_is_mx51())
+		host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
+
 	return 0;
 }
 
-- 
1.7.0.4

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

* [PATCH 2/2] sdhci-esdhc-imx: enable QUIRK_NO_MULTIBLOCK only for i.MX25 and i.MX35
  2010-10-22 23:12               ` Chris Ball
  2010-10-22 23:57                 ` Eric Bénard
@ 2010-10-22 23:57                 ` Eric Bénard
  1 sibling, 0 replies; 24+ messages in thread
From: Eric Bénard @ 2010-10-22 23:57 UTC (permalink / raw)
  To: linux-arm-kernel

only these CPU's errata list this bug.

Signed-off-by: Eric B?nard <eric@eukrea.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
---
 drivers/mmc/host/sdhci-esdhc-imx.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 28e63ef..8308bcd 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -116,6 +116,10 @@ static int esdhc_pltfm_init(struct sdhci_host *host, struct sdhci_pltfm_data *pd
 	if (cpu_is_mx35() || cpu_is_mx51())
 		host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
 
+	/* fix errata ENGcm07207 which is present on i.MX25 and i.MX35 */
+	if (cpu_is_mx25() || cpu_is_mx35())
+		host->quirks |= SDHCI_QUIRK_NO_MULTIBLOCK;
+
 	return 0;
 }
 
@@ -137,10 +141,8 @@ static struct sdhci_ops sdhci_esdhc_ops = {
 };
 
 struct sdhci_pltfm_data sdhci_esdhc_imx_pdata = {
-	.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_NO_MULTIBLOCK
-			| SDHCI_QUIRK_BROKEN_ADMA,
+	.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_BROKEN_ADMA,
 	/* ADMA has issues. Might be fixable */
-	/* NO_MULTIBLOCK might be MX35 only (Errata: ENGcm07207) */
 	.ops = &sdhci_esdhc_ops,
 	.init = esdhc_pltfm_init,
 	.exit = esdhc_pltfm_exit,
-- 
1.7.0.4

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

* [PATCH 1/2] sdhci-esdhc-imx: fix timeout on i.MX's sdhci
  2010-10-22 23:57                 ` Eric Bénard
@ 2010-11-07 22:51                   ` Chris Ball
  0 siblings, 0 replies; 24+ messages in thread
From: Chris Ball @ 2010-11-07 22:51 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Eric,

On Sat, Oct 23, 2010 at 01:57:21AM +0200, Eric B?nard wrote:
> this patch fix timeout problems on i.MX's sdhci as suggested by
> Richard Zhu.
> 
> Tested on :
> - i.MX257 : not needed
> - i.MX357 : needed
> - i.MX515 : needed
> 
> more details can be found here :
> http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/029748.html
> 
> Signed-off-by: Eric B?nard <eric@eukrea.com>
> Tested-by: Shawn Guo <shawn.gsc@gmail.com>
> Acked-by: Wolfram Sang <w.sang@pengutronix.de>

Thanks, I've pushed and queued these two patches for 2.6.37.

-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

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

end of thread, other threads:[~2010-11-07 22:51 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-20  8:53 [PATCH 0/2] babbage: support mmc device Shawn Guo
2010-10-20  9:22 ` [PATCH 1/2] mmc: quirk fix for timeout problem Shawn Guo
2010-10-20 11:27   ` Wolfram Sang
2010-10-21 16:11     ` Shawn Guo
2010-10-21 16:43       ` Wolfram Sang
2010-10-21 17:10       ` Nicolas Pitre
2010-10-21 18:14         ` Shawn Guo
2010-10-21 20:28           ` Eric Bénard
2010-10-21 21:20             ` [PATCH 1/2] sdhci-esdhc-imx: fix timeout on i.MX's sdhci Eric Bénard
2010-10-22  6:15               ` Wolfram Sang
2010-10-22 23:12               ` Chris Ball
2010-10-22 23:57                 ` Eric Bénard
2010-11-07 22:51                   ` Chris Ball
2010-10-22 23:57                 ` [PATCH 2/2] sdhci-esdhc-imx: enable QUIRK_NO_MULTIBLOCK only for i.MX25 and i.MX35 Eric Bénard
2010-10-21 21:20             ` Eric Bénard
2010-10-22  6:18               ` Wolfram Sang
2010-10-22  7:07                 ` Eric Bénard
2010-10-22  8:46                 ` [PATCH v2 1/2] sdhci-esdhc-imx: fix timeout on i.MX's sdhci Eric Bénard
2010-10-22  8:46                 ` [PATCH v2 2/2] sdhci-esdhc-imx: enable QUIRK_NO_MULTIBLOCK only for i.MX25 and i.MX35 Eric Bénard
2010-10-22 10:54                   ` Wolfram Sang
2010-10-22  4:39             ` [PATCH 1/2] mmc: quirk fix for timeout problem Shawn Guo
2010-10-20  9:24 ` [PATCH 2/2] babbage: esdhc device registration Shawn Guo
2010-10-20 11:30   ` Wolfram Sang
2010-10-20 11:52   ` Amit Kucheria

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).