imx: a few fixes for v3.2-rc
Subsystems (7)
cover imx: a few fixes for v3.2-rc
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
The commit 'd880db0 arm: mx3: update defconfig' removes FEC support which is not good, since FEC is useful for both developers and users.
--- arch/arm/configs/mx3_defconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/configs/mx3_defconfig +1 -0
@@ -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
Signature · 1 line
1.7.4.1
PATCH 1/4 arm/imx: fix mx3_defconfig to add FEC back
Is it supposed to be generated, like by make menuconfig?
Richard
Quoted 30 lines · Shawn Guo
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 <[email protected]>Cc Sascha Hauer <[email protected]>--- arch/arm/configs/mx3_defconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)arch/arm/configs/mx3_defconfig +1
-0@@ -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 setSignature · 7 lines
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
In reply to Shawn GuoQuoted 2 lines · Shawn Guo
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
Signature · 2 lines
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
Quoted 13 lines · Uwe Kleine-K?nig
Quoted 2 lines · Shawn Guo
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 ARMSo when d880db0 was created
Quoted 8 lines
make savedefconfig
dropped
CONFIG_FEC=yjustifiably. The culprit is commit230dec6 (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.
Signature · 2 lines
Regards, Shawn
PATCH 1/4 arm/imx: fix mx3_defconfig to add FEC back
Quoted 16 lines · Shawn Guo
Quoted 15 lines · Uwe Kleine-K?nig
Quoted 2 lines · Shawn Guo
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 ARMSo when d880db0 was created
make savedefconfig
Quoted 7 lines
Quoted 6 lines
dropped
CONFIG_FEC=yjustifiably. The culprit is commit230dec6 (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
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
Sascha Hauer
maintainerPATCH 1/4 arm/imx: fix mx3_defconfig to add FEC back
In reply to Shawn GuoQuoted 5 lines · Shawn Guo
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 <[email protected]>Cc Sascha Hauer <[email protected]>
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 20 lines
--- arch/arm/configs/mx3_defconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)arch/arm/configs/mx3_defconfig +1
-0@@ -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 setSignature · 1 line
1.7.4.1
Signature · 4 lines
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
Quoted 10 lines · Sascha Hauer
Quoted 5 lines · Shawn Guo
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 <[email protected]>Cc Sascha Hauer <[email protected]>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.
Signature · 2 lines
Regards, Shawn
PATCH 2/4 arm/imx: fix the references to ARCH_MX3
In reply to Shawn GuoThe 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.
--- arch/arm/mach-imx/Makefile.boot | 10 +++++++--- drivers/dma/Kconfig | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-)
arch/arm/mach-imx/Makefile.boot +7 -3
@@ -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
drivers/dma/Kconfig +2 -2
@@ -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
Signature · 1 line
1.7.4.1
Sascha Hauer
maintainerPATCH 2/4 arm/imx: fix the references to ARCH_MX3
Quoted 23 lines · Shawn Guo
The config symbol
ARCH_MX3has 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 <[email protected]>Cc Vinod Koul <[email protected]>Cc Sascha Hauer <[email protected]>--- arch/arm/mach-imx/Makefile.boot | 10 +++++++--- drivers/dma/Kconfig | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-)arch/arm/mach-imx/Makefile.boot +0
-3@@ -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
arch/arm/mach-imx/Makefile.boot zreladdr-$(CONFIG_MACH_MX27) += 0xA0008000 · line 26
Quoted 10 lines
arch/arm/mach-imx/Makefile.boot +7
-0+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 14 lines
drivers/dma/Kconfig +1
-1@@ -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
drivers/dma/Kconfig config PCH_DMA · line 219
Quoted 5 lines
drivers/dma/Kconfig +1
-1@@ -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
Signature · 4 lines
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 1/1 arm/imx: fix the references to ARCH_MX3
In reply to Shawn GuoThe 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.
---
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(-)
arch/arm/mach-imx/Makefile.boot +19 -15
@@ -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
Signature · 1 line
1.7.4.1
PATCH v2 1/1 arm/imx: fix the references to ARCH_MX3
Quoted 4 lines · Shawn Guo
The config symbol
ARCH_MX3has been removed by commit 'a89cf59 arm/imx: merge i.MX3 and i.MX6', and it should not be referenced any more.
Quoted 8 lines
The patch also change ARCH_MX* to SOC_IMX* for other platforms.
Signed-off-by Shawn Guo <[email protected]>Cc Sascha Hauer <[email protected]>---
Changes since v1:
* Drop changes ondrivers/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
Sascha Hauer
maintainerPATCH v2 1/1 arm/imx: fix the references to ARCH_MX3
Quoted 14 lines · Paul Bolle
Quoted 4 lines · Shawn Guo
The config symbol
ARCH_MX3has been removed by commit 'a89cf59 arm/imx: merge i.MX3 and i.MX6', and it should not be referenced any more.Quoted 8 lines
The patch also change ARCH_MX* to SOC_IMX* for other platforms.
Signed-off-by Shawn Guo <[email protected]>Cc Sascha Hauer <[email protected]>---
Changes since v1:
* Drop changes ondrivers/dma/Kconfig, as Sascha alreay has a patch to fix it.
Quoted 4 lines
This appears to be to the patch that ended up as commit
59198b6cb2in the mainline tree. But in mainline there are still those two references toARCH_MX3indrivers/dma/Kconfig. Can I ask what happened to this patch of Sascha that Shawn mentions?
I just resent this.
Sascha
Signature · 4 lines
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 1/1 arm/imx: fix the references to ARCH_MX3
(Canned message follows.)
Quoted 5 lines · Sascha Hauer
On Mon, Nov 21, 2011 at 02:47:49PM +0100, Paul Bolle wrote:
Can I ask what happened to thisQuoted 1 line
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
In reply to Shawn GuoThe 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.
--- arch/arm/plat-mxc/Kconfig | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-mxc/Kconfig +2 -2
@@ -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
Signature · 1 line
1.7.4.1
PATCH 4/4 arm/imx: fix imx6q mmc error when mounting rootfs
In reply to Shawn GuoThe 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.
--- arch/arm/mach-imx/clock-imx6q.c | 17 ++++++++++++++++- drivers/mmc/host/sdhci-esdhc-imx.c | 8 ++++++++ 2 files changed, 24 insertions(+), 1 deletions(-)
arch/arm/mach-imx/clock-imx6q.c +16 -1
@@ -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);
drivers/mmc/host/sdhci-esdhc-imx.c +8 -0
@@ -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) {
Signature · 1 line
1.7.4.1
PATCH 4/4 arm/imx: fix imx6q mmc error when mounting rootfs
Quoted 14 lines · Shawn Guo
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 response0x900, card status0xc00
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
Quoted 6 lines
This patch fixes the problem by lowering the usdhc clock and correcting watermark configuration.
Signed-off-by Shawn Guo <[email protected]>Cc Chris Ball <[email protected]>Cc Sascha Hauer <[email protected]>
The above errors are gone with this patch.
Thanks
Dirk
Quoted 66 lines
--- arch/arm/mach-imx/clock-imx6q.c | 17 ++++++++++++++++- drivers/mmc/host/sdhci-esdhc-imx.c | 8 ++++++++ 2 files changed, 24 insertions(+), 1 deletions(-)arch/arm/mach-imx/clock-imx6q.c +16
-1@@ -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);drivers/mmc/host/sdhci-esdhc-imx.c +8
-0@@ -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
In reply to Shawn Guo2011/11/10 Shawn Guo <[email protected]>:
Quoted 39 lines
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 response0x900, card status0xc00?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 mmcblk0p1This patch fixes the problem by lowering the usdhc clock and correcting watermark configuration.
Signed-off-by Shawn Guo <[email protected]>Cc Chris Ball <[email protected]>Cc Sascha Hauer <[email protected]>---
?arch/arm/mach-imx/clock-imx6q.c ? ?| ? 17 ++++++++++++++++- ?drivers/mmc/host/sdhci-esdhc-imx.c | ? ?8 ++++++++ ?2 files changed, 24 insertions(+), 1 deletions(-)arch/arm/mach-imx/clock-imx6q.c +0
-0@@ -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)
arch/arm/mach-imx/clock-imx6q.c int __init mx6q_clocks_init(void) · line 2009
Quoted 8 lines
arch/arm/mach-imx/clock-imx6q.c +5
-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?
arch/arm/mach-imx/clock-imx6q.c int __init mx6q_clocks_init(void) · line 2019
Quoted 10 lines
arch/arm/mach-imx/clock-imx6q.c +10
-0+? ? ? ?* +? ? ? ?* 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
Quoted 9 lines
arch/arm/mach-imx/clock-imx6q.c +0
-1--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
Quoted 43 lines · Jason Liu
2011/11/10 Shawn Guo <[email protected]>:
Quoted 42 lines
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 response0x900, card status0xc00?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 mmcblk0p1This patch fixes the problem by lowering the usdhc clock and correcting watermark configuration.
Signed-off-by Shawn Guo <[email protected]>Cc Chris Ball <[email protected]>Cc Sascha Hauer <[email protected]>---
?arch/arm/mach-imx/clock-imx6q.c ? ?| ? 17 ++++++++++++++++- ?drivers/mmc/host/sdhci-esdhc-imx.c | ? ?8 ++++++++ ?2 files changed, 24 insertions(+), 1 deletions(-)arch/arm/mach-imx/clock-imx6q.c +0
-0@@ -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)arch/arm/mach-imx/clock-imx6q.c +0
-0@@ -2002,6 +2002,21 @@ int __init mx6q_clocks_init(void) ? ? ? ?clk_set_rate(&asrc_serial_clk, 1500000); ? ? ? ?clk_set_rate(&enfc_clk, 11000000);
Quoted 11 lines
arch/arm/mach-imx/clock-imx6q.c int __init mx6q_clocks_init(void) · line 2009
Quoted 5 lines
arch/arm/mach-imx/clock-imx6q.c +5
-0+ ? ? ? /* +? ? ? ?* 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 10 lines
Quoted 10 lines
arch/arm/mach-imx/clock-imx6q.c +10
-0+? ? ? ?* +? ? ? ?* 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); +