[PATCH 0/4] imx: a few fixes for v3.2-rc

STALE5366d

19 messages, 8 authors, 2011-11-22 · open the first message on its own page

[PATCH 0/4] imx: a few fixes for v3.2-rc

From: Shawn Guo <hidden>
Date: 2011-11-10 08:39:28

Hi Sascha,

Here are a few imx fixes targetting v3.2-rc.  Please have a review.
If it looks all good to you, I can send you a pull request if you want.

Shawn Guo (4):
      arm/imx: fix mx3_defconfig to add FEC back
      arm/imx: fix the references to ARCH_MX3
      arm/imx: fix AUTO_ZRELADDR selection
      arm/imx: fix imx6q mmc error when mounting rootfs

 arch/arm/configs/mx3_defconfig     |    1 +
 arch/arm/mach-imx/Makefile.boot    |   10 +++++++---
 arch/arm/mach-imx/clock-imx6q.c    |   17 ++++++++++++++++-
 arch/arm/plat-mxc/Kconfig          |    4 ++--
 drivers/dma/Kconfig                |    4 ++--
 drivers/mmc/host/sdhci-esdhc-imx.c |    8 ++++++++
 6 files changed, 36 insertions(+), 8 deletions(-)

[PATCH 1/4] arm/imx: fix mx3_defconfig to add FEC back

From: Shawn Guo <hidden>
Date: 2011-11-10 08:39:29

The commit 'd880db0 arm: mx3: update defconfig' removes FEC support
which is not good, since FEC is useful for both developers and users.

Signed-off-by: Shawn Guo <redacted>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/configs/mx3_defconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/arm/configs/mx3_defconfig b/arch/arm/configs/mx3_defconfig
index cb0717f..ee50a9e 100644
--- a/arch/arm/configs/mx3_defconfig
+++ b/arch/arm/configs/mx3_defconfig
@@ -67,6 +67,7 @@ CONFIG_SMSC_PHY=y
 CONFIG_NET_ETHERNET=y
 CONFIG_SMSC911X=y
 CONFIG_DNET=y
+CONFIG_FEC=y
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
 # CONFIG_INPUT_MOUSEDEV is not set
-- 
1.7.4.1

[PATCH 1/4] arm/imx: fix mx3_defconfig to add FEC back

From: Richard Zhao <hidden>
Date: 2011-11-10 08:49:18

Is it supposed to be generated, like by make menuconfig?

Richard
On Thu, Nov 10, 2011 at 04:39:29PM +0800, Shawn Guo wrote:
quoted hunk
The commit 'd880db0 arm: mx3: update defconfig' removes FEC support
which is not good, since FEC is useful for both developers and users.

Signed-off-by: Shawn Guo <redacted>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/configs/mx3_defconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/arm/configs/mx3_defconfig b/arch/arm/configs/mx3_defconfig
index cb0717f..ee50a9e 100644
--- a/arch/arm/configs/mx3_defconfig
+++ b/arch/arm/configs/mx3_defconfig
@@ -67,6 +67,7 @@ CONFIG_SMSC_PHY=y
 CONFIG_NET_ETHERNET=y
 CONFIG_SMSC911X=y
 CONFIG_DNET=y
+CONFIG_FEC=y
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
 # CONFIG_INPUT_MOUSEDEV is not set
-- 
1.7.4.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

[PATCH 1/4] arm/imx: fix mx3_defconfig to add FEC back

From: Uwe Kleine-König <hidden>
Date: 2011-11-10 08:57:48

On Thu, Nov 10, 2011 at 04:39:29PM +0800, Shawn Guo wrote:
The commit 'd880db0 arm: mx3: update defconfig' removes FEC support
which is not good, since FEC is useful for both developers and users.
$ git show d880db0^:drivers/net/Kconfig | grep -A4 'config FEC$'
config FEC
	bool "FEC ethernet controller (of ColdFire and some i.MX CPUs)"
	depends on M523x || M527x || M5272 || M528x || M520x || M532x || \
		IMX_HAVE_PLATFORM_FEC || MXS_HAVE_PLATFORM_FEC
	default IMX_HAVE_PLATFORM_FEC || MXS_HAVE_PLATFORM_FEC if ARM

So when d880db0 was created

	make savedefconfig

dropped CONFIG_FEC=y justifiably. The culprit is commit

	230dec6 (net/fec: add imx6q enet support)

which dropped the default line.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[PATCH 1/4] arm/imx: fix mx3_defconfig to add FEC back

From: Shawn Guo <hidden>
Date: 2011-11-11 07:16:25

On Thu, Nov 10, 2011 at 09:57:48AM +0100, Uwe Kleine-K?nig wrote:
On Thu, Nov 10, 2011 at 04:39:29PM +0800, Shawn Guo wrote:
quoted
The commit 'd880db0 arm: mx3: update defconfig' removes FEC support
which is not good, since FEC is useful for both developers and users.
$ git show d880db0^:drivers/net/Kconfig | grep -A4 'config FEC$'
config FEC
	bool "FEC ethernet controller (of ColdFire and some i.MX CPUs)"
	depends on M523x || M527x || M5272 || M528x || M520x || M532x || \
		IMX_HAVE_PLATFORM_FEC || MXS_HAVE_PLATFORM_FEC
	default IMX_HAVE_PLATFORM_FEC || MXS_HAVE_PLATFORM_FEC if ARM

So when d880db0 was created

	make savedefconfig

dropped CONFIG_FEC=y justifiably. The culprit is commit

	230dec6 (net/fec: add imx6q enet support)

which dropped the default line.
Thanks for letting me know that's me :)

Anyway, I put what I see from 'git log -p arch/arm/configs/mx3_defconfig'
there.

-- 
Regards,
Shawn

[PATCH 1/4] arm/imx: fix mx3_defconfig to add FEC back

From: Uwe Kleine-König <hidden>
Date: 2011-11-11 10:12:51

On Fri, Nov 11, 2011 at 03:16:25PM +0800, Shawn Guo wrote:
On Thu, Nov 10, 2011 at 09:57:48AM +0100, Uwe Kleine-K?nig wrote:
quoted
On Thu, Nov 10, 2011 at 04:39:29PM +0800, Shawn Guo wrote:
quoted
The commit 'd880db0 arm: mx3: update defconfig' removes FEC support
which is not good, since FEC is useful for both developers and users.
$ git show d880db0^:drivers/net/Kconfig | grep -A4 'config FEC$'
config FEC
	bool "FEC ethernet controller (of ColdFire and some i.MX CPUs)"
	depends on M523x || M527x || M5272 || M528x || M520x || M532x || \
		IMX_HAVE_PLATFORM_FEC || MXS_HAVE_PLATFORM_FEC
	default IMX_HAVE_PLATFORM_FEC || MXS_HAVE_PLATFORM_FEC if ARM

So when d880db0 was created

	make savedefconfig

dropped CONFIG_FEC=y justifiably. The culprit is commit

	230dec6 (net/fec: add imx6q enet support)

which dropped the default line.
Thanks for letting me know that's me :)
:-)

I forgot to say that I prefer to add back the default line in Kconfig
instead of adding it to the defconfig again.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[PATCH 1/4] arm/imx: fix mx3_defconfig to add FEC back

From: s.hauer@pengutronix.de (Sascha Hauer)
Date: 2011-11-11 15:58:51

On Thu, Nov 10, 2011 at 04:39:29PM +0800, Shawn Guo wrote:
The commit 'd880db0 arm: mx3: update defconfig' removes FEC support
which is not good, since FEC is useful for both developers and users.

Signed-off-by: Shawn Guo <redacted>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
I skipped this one for now as I have hope to get the i.MX5 merge into
-rc which would remove this file. If not, I'll send this one later.

Sascha
quoted hunk
---
 arch/arm/configs/mx3_defconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/arm/configs/mx3_defconfig b/arch/arm/configs/mx3_defconfig
index cb0717f..ee50a9e 100644
--- a/arch/arm/configs/mx3_defconfig
+++ b/arch/arm/configs/mx3_defconfig
@@ -67,6 +67,7 @@ CONFIG_SMSC_PHY=y
 CONFIG_NET_ETHERNET=y
 CONFIG_SMSC911X=y
 CONFIG_DNET=y
+CONFIG_FEC=y
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
 # CONFIG_INPUT_MOUSEDEV is not set
-- 
1.7.4.1
-- 
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 |

[PATCH 1/4] arm/imx: fix mx3_defconfig to add FEC back

From: Shawn Guo <hidden>
Date: 2011-11-11 23:26:35

On Fri, Nov 11, 2011 at 04:58:51PM +0100, Sascha Hauer wrote:
On Thu, Nov 10, 2011 at 04:39:29PM +0800, Shawn Guo wrote:
quoted
The commit 'd880db0 arm: mx3: update defconfig' removes FEC support
which is not good, since FEC is useful for both developers and users.

Signed-off-by: Shawn Guo <redacted>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
I skipped this one for now as I have hope to get the i.MX5 merge into
-rc which would remove this file. If not, I'll send this one later.
Sound good.

-- 
Regards,
Shawn

[PATCH 2/4] arm/imx: fix the references to ARCH_MX3

From: Shawn Guo <hidden>
Date: 2011-11-10 08:39:30

The config symbol ARCH_MX3 has been removed by commit 'a89cf59
arm/imx: merge i.MX3 and i.MX6', and it should not be referenced
any more.

Signed-off-by: Shawn Guo <redacted>
Cc: Vinod Koul <redacted>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-imx/Makefile.boot |   10 +++++++---
 drivers/dma/Kconfig             |    4 ++--
 2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-imx/Makefile.boot b/arch/arm/mach-imx/Makefile.boot
index 22d8588..c349a96 100644
--- a/arch/arm/mach-imx/Makefile.boot
+++ b/arch/arm/mach-imx/Makefile.boot
@@ -14,9 +14,13 @@ zreladdr-$(CONFIG_MACH_MX27)	+= 0xA0008000
 params_phys-$(CONFIG_MACH_MX27)	:= 0xA0000100
 initrd_phys-$(CONFIG_MACH_MX27)	:= 0xA0800000
 
-zreladdr-$(CONFIG_ARCH_MX3)	+= 0x80008000
-params_phys-$(CONFIG_ARCH_MX3)	:= 0x80000100
-initrd_phys-$(CONFIG_ARCH_MX3)	:= 0x80800000
+zreladdr-$(CONFIG_SOC_IMX31)	+= 0x80008000
+params_phys-$(CONFIG_SOC_IMX31)	:= 0x80000100
+initrd_phys-$(CONFIG_SOC_IMX31)	:= 0x80800000
+
+zreladdr-$(CONFIG_SOC_IMX35)	+= 0x80008000
+params_phys-$(CONFIG_SOC_IMX35)	:= 0x80000100
+initrd_phys-$(CONFIG_SOC_IMX35)	:= 0x80800000
 
 zreladdr-$(CONFIG_SOC_IMX6Q)	+= 0x10008000
 params_phys-$(CONFIG_SOC_IMX6Q)	:= 0x10000100
diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index ab8f469..8f7dce1 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -124,7 +124,7 @@ config MV_XOR
 
 config MX3_IPU
 	bool "MX3x Image Processing Unit support"
-	depends on ARCH_MX3
+	depends on SOC_IMX31 || SOC_IMX35
 	select DMA_ENGINE
 	default y
 	help
@@ -216,7 +216,7 @@ config PCH_DMA
 
 config IMX_SDMA
 	tristate "i.MX SDMA support"
-	depends on ARCH_MX25 || ARCH_MX3 || ARCH_MX5
+	depends on ARCH_MX25 || SOC_IMX31 || SOC_IMX35 || ARCH_MX5
 	select DMA_ENGINE
 	help
 	  Support the i.MX SDMA engine. This engine is integrated into
-- 
1.7.4.1

[PATCH 2/4] arm/imx: fix the references to ARCH_MX3

From: s.hauer@pengutronix.de (Sascha Hauer)
Date: 2011-11-10 08:49:43

On Thu, Nov 10, 2011 at 04:39:30PM +0800, Shawn Guo wrote:
quoted hunk
The config symbol ARCH_MX3 has been removed by commit 'a89cf59
arm/imx: merge i.MX3 and i.MX6', and it should not be referenced
any more.

Signed-off-by: Shawn Guo <redacted>
Cc: Vinod Koul <redacted>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-imx/Makefile.boot |   10 +++++++---
 drivers/dma/Kconfig             |    4 ++--
 2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-imx/Makefile.boot b/arch/arm/mach-imx/Makefile.boot
index 22d8588..c349a96 100644
--- a/arch/arm/mach-imx/Makefile.boot
+++ b/arch/arm/mach-imx/Makefile.boot
@@ -14,9 +14,13 @@ zreladdr-$(CONFIG_MACH_MX27)	+= 0xA0008000
 params_phys-$(CONFIG_MACH_MX27)	:= 0xA0000100
 initrd_phys-$(CONFIG_MACH_MX27)	:= 0xA0800000
 
-zreladdr-$(CONFIG_ARCH_MX3)	+= 0x80008000
-params_phys-$(CONFIG_ARCH_MX3)	:= 0x80000100
-initrd_phys-$(CONFIG_ARCH_MX3)	:= 0x80800000
+zreladdr-$(CONFIG_SOC_IMX31)	+= 0x80008000
+params_phys-$(CONFIG_SOC_IMX31)	:= 0x80000100
+initrd_phys-$(CONFIG_SOC_IMX31)	:= 0x80800000
+
+zreladdr-$(CONFIG_SOC_IMX35)	+= 0x80008000
+params_phys-$(CONFIG_SOC_IMX35)	:= 0x80000100
+initrd_phys-$(CONFIG_SOC_IMX35)	:= 0x80800000
 
 zreladdr-$(CONFIG_SOC_IMX6Q)	+= 0x10008000
 params_phys-$(CONFIG_SOC_IMX6Q)	:= 0x10000100
Can you please replace all CONFIG_ARCH_* in this file instead?
quoted hunk
diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index ab8f469..8f7dce1 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -124,7 +124,7 @@ config MV_XOR
 
 config MX3_IPU
 	bool "MX3x Image Processing Unit support"
-	depends on ARCH_MX3
+	depends on SOC_IMX31 || SOC_IMX35
 	select DMA_ENGINE
 	default y
 	help
@@ -216,7 +216,7 @@ config PCH_DMA
 
 config IMX_SDMA
 	tristate "i.MX SDMA support"
-	depends on ARCH_MX25 || ARCH_MX3 || ARCH_MX5
+	depends on ARCH_MX25 || SOC_IMX31 || SOC_IMX35 || ARCH_MX5
I already sent a patch to Vinod to remove those individual SoC
dependencies and depend on ARCH_MXC instead.

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 |

[PATCH v2] arm/imx: fix the references to ARCH_MX3

From: Shawn Guo <hidden>
Date: 2011-11-11 07:37:14

The config symbol ARCH_MX3 has been removed by commit 'a89cf59
arm/imx: merge i.MX3 and i.MX6', and it should not be referenced
any more.

The patch also change ARCH_MX* to SOC_IMX* for other platforms.

Signed-off-by: Shawn Guo <redacted>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
Changes since v1:
 * Drop changes on drivers/dma/Kconfig, as Sascha alreay has a patch
   to fix it.
 * Change ARCH_MX* to SOC_IMX* for other platforms as well.

 arch/arm/mach-imx/Makefile.boot |   34 +++++++++++++++++++---------------
 1 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/arch/arm/mach-imx/Makefile.boot b/arch/arm/mach-imx/Makefile.boot
index 22d8588..cfede57 100644
--- a/arch/arm/mach-imx/Makefile.boot
+++ b/arch/arm/mach-imx/Makefile.boot
@@ -1,22 +1,26 @@
-zreladdr-$(CONFIG_ARCH_MX1)	+= 0x08008000
-params_phys-$(CONFIG_ARCH_MX1)	:= 0x08000100
-initrd_phys-$(CONFIG_ARCH_MX1)	:= 0x08800000
+zreladdr-$(CONFIG_SOC_IMX1)	+= 0x08008000
+params_phys-$(CONFIG_SOC_IMX1)	:= 0x08000100
+initrd_phys-$(CONFIG_SOC_IMX1)	:= 0x08800000
 
-zreladdr-$(CONFIG_MACH_MX21)	+= 0xC0008000
-params_phys-$(CONFIG_MACH_MX21)	:= 0xC0000100
-initrd_phys-$(CONFIG_MACH_MX21)	:= 0xC0800000
+zreladdr-$(CONFIG_SOC_IMX21)	+= 0xC0008000
+params_phys-$(CONFIG_SOC_IMX21)	:= 0xC0000100
+initrd_phys-$(CONFIG_SOC_IMX21)	:= 0xC0800000
 
-zreladdr-$(CONFIG_ARCH_MX25)	+= 0x80008000
-params_phys-$(CONFIG_ARCH_MX25)	:= 0x80000100
-initrd_phys-$(CONFIG_ARCH_MX25)	:= 0x80800000
+zreladdr-$(CONFIG_SOC_IMX25)	+= 0x80008000
+params_phys-$(CONFIG_SOC_IMX25)	:= 0x80000100
+initrd_phys-$(CONFIG_SOC_IMX25)	:= 0x80800000
 
-zreladdr-$(CONFIG_MACH_MX27)	+= 0xA0008000
-params_phys-$(CONFIG_MACH_MX27)	:= 0xA0000100
-initrd_phys-$(CONFIG_MACH_MX27)	:= 0xA0800000
+zreladdr-$(CONFIG_SOC_IMX27)	+= 0xA0008000
+params_phys-$(CONFIG_SOC_IMX27)	:= 0xA0000100
+initrd_phys-$(CONFIG_SOC_IMX27)	:= 0xA0800000
 
-zreladdr-$(CONFIG_ARCH_MX3)	+= 0x80008000
-params_phys-$(CONFIG_ARCH_MX3)	:= 0x80000100
-initrd_phys-$(CONFIG_ARCH_MX3)	:= 0x80800000
+zreladdr-$(CONFIG_SOC_IMX31)	+= 0x80008000
+params_phys-$(CONFIG_SOC_IMX31)	:= 0x80000100
+initrd_phys-$(CONFIG_SOC_IMX31)	:= 0x80800000
+
+zreladdr-$(CONFIG_SOC_IMX35)	+= 0x80008000
+params_phys-$(CONFIG_SOC_IMX35)	:= 0x80000100
+initrd_phys-$(CONFIG_SOC_IMX35)	:= 0x80800000
 
 zreladdr-$(CONFIG_SOC_IMX6Q)	+= 0x10008000
 params_phys-$(CONFIG_SOC_IMX6Q)	:= 0x10000100
-- 
1.7.4.1

[PATCH v2] arm/imx: fix the references to ARCH_MX3

From: Paul Bolle <hidden>
Date: 2011-11-21 13:47:49

On Fri, 2011-11-11 at 15:37 +0800, Shawn Guo wrote: 
The config symbol ARCH_MX3 has been removed by commit 'a89cf59
arm/imx: merge i.MX3 and i.MX6', and it should not be referenced
any more.

The patch also change ARCH_MX* to SOC_IMX* for other platforms.

Signed-off-by: Shawn Guo <redacted>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
Changes since v1:
 * Drop changes on drivers/dma/Kconfig, as Sascha alreay has a patch
   to fix it.
This appears to be to the patch that ended up as commit 59198b6cb2 in
the mainline tree. But in mainline there are still those two references
to ARCH_MX3 in drivers/dma/Kconfig. Can I ask what happened to this
patch of Sascha that Shawn mentions?


Paul Bolle

[PATCH v2] arm/imx: fix the references to ARCH_MX3

From: s.hauer@pengutronix.de (Sascha Hauer)
Date: 2011-11-22 10:43:42

On Mon, Nov 21, 2011 at 02:47:49PM +0100, Paul Bolle wrote:
On Fri, 2011-11-11 at 15:37 +0800, Shawn Guo wrote: 
quoted
The config symbol ARCH_MX3 has been removed by commit 'a89cf59
arm/imx: merge i.MX3 and i.MX6', and it should not be referenced
any more.

The patch also change ARCH_MX* to SOC_IMX* for other platforms.

Signed-off-by: Shawn Guo <redacted>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
Changes since v1:
 * Drop changes on drivers/dma/Kconfig, as Sascha alreay has a patch
   to fix it.
This appears to be to the patch that ended up as commit 59198b6cb2 in
the mainline tree. But in mainline there are still those two references
to ARCH_MX3 in drivers/dma/Kconfig. Can I ask what happened to this
patch of Sascha that Shawn mentions?
I just resent this.

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 |

[PATCH v2] arm/imx: fix the references to ARCH_MX3

From: Paul Bolle <hidden>
Date: 2011-11-22 10:50:44

(Canned message follows.)

On Tue, 2011-11-22 at 11:43 +0100, Sascha Hauer wrote:
On Mon, Nov 21, 2011 at 02:47:49PM +0100, Paul Bolle wrote:
Can I ask what happened to this
quoted
patch of Sascha that Shawn mentions?
I just resent this.
Thanks. I'll stop worrying about this invalid Kconfig dependency for
now. It might pop up again if I ever decide to scan the mainline tree
for invalid symbols again. We'll see.


Paul Bolle

[PATCH 3/4] arm/imx: fix AUTO_ZRELADDR selection

From: Shawn Guo <hidden>
Date: 2011-11-10 08:39:31

The AUTO_ZRELADDR selection for ARCH_IMX_V4_V5 and ARCH_MX5 should
really be mutually exclusive to ZBOOT_ROM just like what ARCH_IMX_V6_V7
does.

Signed-off-by: Shawn Guo <redacted>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/plat-mxc/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig
index a08a951..b3a1f2b 100644
--- a/arch/arm/plat-mxc/Kconfig
+++ b/arch/arm/plat-mxc/Kconfig
@@ -10,7 +10,7 @@ choice
 
 config ARCH_IMX_V4_V5
 	bool "i.MX1, i.MX21, i.MX25, i.MX27"
-	select AUTO_ZRELADDR
+	select AUTO_ZRELADDR if !ZBOOT_ROM
 	select ARM_PATCH_PHYS_VIRT
 	help
 	  This enables support for systems based on the Freescale i.MX ARMv4
@@ -26,7 +26,7 @@ config ARCH_IMX_V6_V7
 
 config ARCH_MX5
 	bool "i.MX50, i.MX51, i.MX53"
-	select AUTO_ZRELADDR
+	select AUTO_ZRELADDR if !ZBOOT_ROM
 	select ARM_PATCH_PHYS_VIRT
 	help
 	  This enables support for machines using Freescale's i.MX50 and i.MX53
-- 
1.7.4.1

[PATCH 4/4] arm/imx: fix imx6q mmc error when mounting rootfs

From: Shawn Guo <hidden>
Date: 2011-11-10 08:39:32

The following error is seen in some case when mounting rootfs from
SD/MMC cards.

  Waiting for root device /dev/mmcblk0p1...
  mmc1: host does not support reading read-only switch. assuming write-enable.
  mmc1: new high speed SDHC card at address b368
  mmcblk0: mmc1:b368 SDC   3.74 GiB
   mmcblk0: p1
  mmc1: Timeout waiting for hardware interrupt.
  mmcblk0: error -110 transferring data, sector 3678224, nr 40, cmd response 0x900, card status 0xc00
  end_request: I/O error, dev mmcblk0, sector 3678225
  Buffer I/O error on device mmcblk0p1, logical block 458754
  lost page write due to I/O error on mmcblk0p1

This patch fixes the problem by lowering the usdhc clock and correcting
watermark configuration.

Signed-off-by: Shawn Guo <redacted>
Cc: Chris Ball <redacted>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-imx/clock-imx6q.c    |   17 ++++++++++++++++-
 drivers/mmc/host/sdhci-esdhc-imx.c |    8 ++++++++
 2 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-imx/clock-imx6q.c b/arch/arm/mach-imx/clock-imx6q.c
index e0b926d..613a1b9 100644
--- a/arch/arm/mach-imx/clock-imx6q.c
+++ b/arch/arm/mach-imx/clock-imx6q.c
@@ -1139,7 +1139,7 @@ static int _clk_set_rate(struct clk *clk, unsigned long rate)
 		return -EINVAL;
 
 	max_div = ((d->bm_pred >> d->bp_pred) + 1) *
-		  ((d->bm_pred >> d->bp_pred) + 1);
+		  ((d->bm_podf >> d->bp_podf) + 1);
 
 	div = parent_rate / rate;
 	if (div == 0)
@@ -2002,6 +2002,21 @@ int __init mx6q_clocks_init(void)
 	clk_set_rate(&asrc_serial_clk, 1500000);
 	clk_set_rate(&enfc_clk, 11000000);
 
+	/*
+	 * Before pinctrl API is available, we have to rely on the pad
+	 * configuration set up by bootloader.  For usdhc example here,
+	 * u-boot sets up the pads for 49.5 MHz case, and we have to lower
+	 * the usdhc clock from 198 to 49.5 MHz to match the pad configuration.
+	 *
+	 * FIXME: This is should be removed after pinctrl API is available.
+	 * At that time, usdhc driver can call pinctrl API to change pad
+	 * configuration dynamically per different usdhc clock settings.
+	 */
+	clk_set_rate(&usdhc1_clk, 49500000);
+	clk_set_rate(&usdhc2_clk, 49500000);
+	clk_set_rate(&usdhc3_clk, 49500000);
+	clk_set_rate(&usdhc4_clk, 49500000);
+
 	np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt");
 	base = of_iomap(np, 0);
 	WARN_ON(!base);
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index ae57769..4b976f0 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -32,6 +32,7 @@
 /* VENDOR SPEC register */
 #define SDHCI_VENDOR_SPEC		0xC0
 #define  SDHCI_VENDOR_SPEC_SDIO_QUIRK	0x00000002
+#define SDHCI_WTMK_LVL			0x44
 #define SDHCI_MIX_CTRL			0x48
 
 /*
@@ -476,6 +477,13 @@ static int __devinit sdhci_esdhc_imx_probe(struct platform_device *pdev)
 	if (is_imx53_esdhc(imx_data))
 		imx_data->flags |= ESDHC_FLAG_MULTIBLK_NO_INT;
 
+	/*
+	 * The imx6q ROM code will change the default watermark level setting
+	 * to something insane.  Change it back here.
+	 */
+	if (is_imx6q_usdhc(imx_data))
+		writel(0x08100810, host->ioaddr + SDHCI_WTMK_LVL);
+
 	boarddata = &imx_data->boarddata;
 	if (sdhci_esdhc_imx_probe_dt(pdev, boarddata) < 0) {
 		if (!host->mmc->parent->platform_data) {
-- 
1.7.4.1

[PATCH 4/4] arm/imx: fix imx6q mmc error when mounting rootfs

From: Dirk Behme <hidden>
Date: 2011-11-10 13:44:17

On 10.11.2011 09:39, Shawn Guo wrote:
The following error is seen in some case when mounting rootfs from
SD/MMC cards.

  Waiting for root device /dev/mmcblk0p1...
  mmc1: host does not support reading read-only switch. assuming write-enable.
  mmc1: new high speed SDHC card at address b368
  mmcblk0: mmc1:b368 SDC   3.74 GiB
   mmcblk0: p1
  mmc1: Timeout waiting for hardware interrupt.
  mmcblk0: error -110 transferring data, sector 3678224, nr 40, cmd response 0x900, card status 0xc00
  end_request: I/O error, dev mmcblk0, sector 3678225
  Buffer I/O error on device mmcblk0p1, logical block 458754
  lost page write due to I/O error on mmcblk0p1

This patch fixes the problem by lowering the usdhc clock and correcting
watermark configuration.

Signed-off-by: Shawn Guo <redacted>
Cc: Chris Ball <redacted>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
The above errors are gone with this patch.

Tested-by: Dirk Behme <redacted>

Thanks

Dirk
quoted hunk
---
 arch/arm/mach-imx/clock-imx6q.c    |   17 ++++++++++++++++-
 drivers/mmc/host/sdhci-esdhc-imx.c |    8 ++++++++
 2 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-imx/clock-imx6q.c b/arch/arm/mach-imx/clock-imx6q.c
index e0b926d..613a1b9 100644
--- a/arch/arm/mach-imx/clock-imx6q.c
+++ b/arch/arm/mach-imx/clock-imx6q.c
@@ -1139,7 +1139,7 @@ static int _clk_set_rate(struct clk *clk, unsigned long rate)
 		return -EINVAL;
 
 	max_div = ((d->bm_pred >> d->bp_pred) + 1) *
-		  ((d->bm_pred >> d->bp_pred) + 1);
+		  ((d->bm_podf >> d->bp_podf) + 1);
 
 	div = parent_rate / rate;
 	if (div == 0)
@@ -2002,6 +2002,21 @@ int __init mx6q_clocks_init(void)
 	clk_set_rate(&asrc_serial_clk, 1500000);
 	clk_set_rate(&enfc_clk, 11000000);
 
+	/*
+	 * Before pinctrl API is available, we have to rely on the pad
+	 * configuration set up by bootloader.  For usdhc example here,
+	 * u-boot sets up the pads for 49.5 MHz case, and we have to lower
+	 * the usdhc clock from 198 to 49.5 MHz to match the pad configuration.
+	 *
+	 * FIXME: This is should be removed after pinctrl API is available.
+	 * At that time, usdhc driver can call pinctrl API to change pad
+	 * configuration dynamically per different usdhc clock settings.
+	 */
+	clk_set_rate(&usdhc1_clk, 49500000);
+	clk_set_rate(&usdhc2_clk, 49500000);
+	clk_set_rate(&usdhc3_clk, 49500000);
+	clk_set_rate(&usdhc4_clk, 49500000);
+
 	np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt");
 	base = of_iomap(np, 0);
 	WARN_ON(!base);
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index ae57769..4b976f0 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -32,6 +32,7 @@
 /* VENDOR SPEC register */
 #define SDHCI_VENDOR_SPEC		0xC0
 #define  SDHCI_VENDOR_SPEC_SDIO_QUIRK	0x00000002
+#define SDHCI_WTMK_LVL			0x44
 #define SDHCI_MIX_CTRL			0x48
 
 /*
@@ -476,6 +477,13 @@ static int __devinit sdhci_esdhc_imx_probe(struct platform_device *pdev)
 	if (is_imx53_esdhc(imx_data))
 		imx_data->flags |= ESDHC_FLAG_MULTIBLK_NO_INT;
 
+	/*
+	 * The imx6q ROM code will change the default watermark level setting
+	 * to something insane.  Change it back here.
+	 */
+	if (is_imx6q_usdhc(imx_data))
+		writel(0x08100810, host->ioaddr + SDHCI_WTMK_LVL);
+
 	boarddata = &imx_data->boarddata;
 	if (sdhci_esdhc_imx_probe_dt(pdev, boarddata) < 0) {
 		if (!host->mmc->parent->platform_data) {

[PATCH 4/4] arm/imx: fix imx6q mmc error when mounting rootfs

From: Jason Liu <hidden>
Date: 2011-11-10 15:07:12

2011/11/10 Shawn Guo [off-list ref]:
quoted hunk
The following error is seen in some case when mounting rootfs from
SD/MMC cards.

?Waiting for root device /dev/mmcblk0p1...
?mmc1: host does not support reading read-only switch. assuming write-enable.
?mmc1: new high speed SDHC card at address b368
?mmcblk0: mmc1:b368 SDC ? 3.74 GiB
? mmcblk0: p1
?mmc1: Timeout waiting for hardware interrupt.
?mmcblk0: error -110 transferring data, sector 3678224, nr 40, cmd response 0x900, card status 0xc00
?end_request: I/O error, dev mmcblk0, sector 3678225
?Buffer I/O error on device mmcblk0p1, logical block 458754
?lost page write due to I/O error on mmcblk0p1

This patch fixes the problem by lowering the usdhc clock and correcting
watermark configuration.

Signed-off-by: Shawn Guo <redacted>
Cc: Chris Ball <redacted>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
?arch/arm/mach-imx/clock-imx6q.c ? ?| ? 17 ++++++++++++++++-
?drivers/mmc/host/sdhci-esdhc-imx.c | ? ?8 ++++++++
?2 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-imx/clock-imx6q.c b/arch/arm/mach-imx/clock-imx6q.c
index e0b926d..613a1b9 100644
--- a/arch/arm/mach-imx/clock-imx6q.c
+++ b/arch/arm/mach-imx/clock-imx6q.c
@@ -1139,7 +1139,7 @@ static int _clk_set_rate(struct clk *clk, unsigned long rate)
? ? ? ? ? ? ? ?return -EINVAL;

? ? ? ?max_div = ((d->bm_pred >> d->bp_pred) + 1) *
- ? ? ? ? ? ? ? ? ((d->bm_pred >> d->bp_pred) + 1);
+ ? ? ? ? ? ? ? ? ((d->bm_podf >> d->bp_podf) + 1);

? ? ? ?div = parent_rate / rate;
? ? ? ?if (div == 0)
@@ -2002,6 +2002,21 @@ int __init mx6q_clocks_init(void)
? ? ? ?clk_set_rate(&asrc_serial_clk, 1500000);
? ? ? ?clk_set_rate(&enfc_clk, 11000000);

+ ? ? ? /*
+ ? ? ? ?* Before pinctrl API is available, we have to rely on the pad
+ ? ? ? ?* configuration set up by bootloader. ?For usdhc example here,
+ ? ? ? ?* u-boot sets up the pads for 49.5 MHz case, and we have to lower
+ ? ? ? ?* the usdhc clock from 198 to 49.5 MHz to match the pad configuration.
The comments above is wrong. The pad configuration don't have the relationship
with the clock freq 49.5MHZ. I'm not sure you mean pinctrl API can
resolve the clock
configuration, do you mean common clock API?
+ ? ? ? ?*
+ ? ? ? ?* FIXME: This is should be removed after pinctrl API is available.
+ ? ? ? ?* At that time, usdhc driver can call pinctrl API to change pad
+ ? ? ? ?* configuration dynamically per different usdhc clock settings.
+ ? ? ? ?*/
+ ? ? ? clk_set_rate(&usdhc1_clk, 49500000);
+ ? ? ? clk_set_rate(&usdhc2_clk, 49500000);
+ ? ? ? clk_set_rate(&usdhc3_clk, 49500000);
+ ? ? ? clk_set_rate(&usdhc4_clk, 49500000);
+
[]

Jason Liu
--
1.7.4.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

[PATCH 4/4] arm/imx: fix imx6q mmc error when mounting rootfs

From: Shawn Guo <hidden>
Date: 2011-11-11 07:47:39

On Thu, Nov 10, 2011 at 11:07:12PM +0800, Jason Liu wrote:
2011/11/10 Shawn Guo [off-list ref]:
quoted
The following error is seen in some case when mounting rootfs from
SD/MMC cards.

?Waiting for root device /dev/mmcblk0p1...
?mmc1: host does not support reading read-only switch. assuming write-enable.
?mmc1: new high speed SDHC card at address b368
?mmcblk0: mmc1:b368 SDC ? 3.74 GiB
? mmcblk0: p1
?mmc1: Timeout waiting for hardware interrupt.
?mmcblk0: error -110 transferring data, sector 3678224, nr 40, cmd response 0x900, card status 0xc00
?end_request: I/O error, dev mmcblk0, sector 3678225
?Buffer I/O error on device mmcblk0p1, logical block 458754
?lost page write due to I/O error on mmcblk0p1

This patch fixes the problem by lowering the usdhc clock and correcting
watermark configuration.

Signed-off-by: Shawn Guo <redacted>
Cc: Chris Ball <redacted>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
?arch/arm/mach-imx/clock-imx6q.c ? ?| ? 17 ++++++++++++++++-
?drivers/mmc/host/sdhci-esdhc-imx.c | ? ?8 ++++++++
?2 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-imx/clock-imx6q.c b/arch/arm/mach-imx/clock-imx6q.c
index e0b926d..613a1b9 100644
--- a/arch/arm/mach-imx/clock-imx6q.c
+++ b/arch/arm/mach-imx/clock-imx6q.c
@@ -1139,7 +1139,7 @@ static int _clk_set_rate(struct clk *clk, unsigned long rate)
? ? ? ? ? ? ? ?return -EINVAL;

? ? ? ?max_div = ((d->bm_pred >> d->bp_pred) + 1) *
- ? ? ? ? ? ? ? ? ((d->bm_pred >> d->bp_pred) + 1);
+ ? ? ? ? ? ? ? ? ((d->bm_podf >> d->bp_podf) + 1);

? ? ? ?div = parent_rate / rate;
? ? ? ?if (div == 0)
@@ -2002,6 +2002,21 @@ int __init mx6q_clocks_init(void)
? ? ? ?clk_set_rate(&asrc_serial_clk, 1500000);
? ? ? ?clk_set_rate(&enfc_clk, 11000000);

+ ? ? ? /*
+ ? ? ? ?* Before pinctrl API is available, we have to rely on the pad
+ ? ? ? ?* configuration set up by bootloader. ?For usdhc example here,
+ ? ? ? ?* u-boot sets up the pads for 49.5 MHz case, and we have to lower
+ ? ? ? ?* the usdhc clock from 198 to 49.5 MHz to match the pad configuration.
The comments above is wrong. The pad configuration don't have the relationship
with the clock freq 49.5MHZ. I'm not sure you mean pinctrl API can
resolve the clock
configuration, do you mean common clock API?
The usdhc on imx6 needs different pad configuration to run at different
clock frequencies, 49.5, 99, 198 MHz.

Regards,
Shawn
quoted
+ ? ? ? ?*
+ ? ? ? ?* FIXME: This is should be removed after pinctrl API is available.
+ ? ? ? ?* At that time, usdhc driver can call pinctrl API to change pad
+ ? ? ? ?* configuration dynamically per different usdhc clock settings.
+ ? ? ? ?*/
+ ? ? ? clk_set_rate(&usdhc1_clk, 49500000);
+ ? ? ? clk_set_rate(&usdhc2_clk, 49500000);
+ ? ? ? clk_set_rate(&usdhc3_clk, 49500000);
+ ? ? ? clk_set_rate(&usdhc4_clk, 49500000);
+
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help