Commit 1b673ef breaks riotboard boot
Subsystems (4)
Hi Fabio,
Commit 1b673ef (linux-fslc, branch "patch-4.0") breaks booting of riotboard. Reverting the patch allows the board to boot properly. It looks like the patch causes some issue with the sdcard detection, as shown below in the logs (only the emmc is detected):
[ 1.447707] sdhci: Secure Digital Host Controller Interface driver [ 1.453974] sdhci: Copyright(c) Pierre Ossman [ 1.458488] sdhci-pltfm: SDHCI platform and OF driver helper [ 1.465423] sdhci-esdhc-imx 2194000.usdhc: could not get ultra high speed state, work on normal mode [ 1.474725] sdhci-esdhc-imx 2194000.usdhc: Got CD GPIO [ 1.479985] sdhci-esdhc-imx 2194000.usdhc: Got WP GPIO [ 1.485574] sdhci-esdhc-imx 2194000.usdhc: No vqmmc regulator found [ 1.539993] mmc0: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA [ 1.551185] sdhci-esdhc-imx 2198000.usdhc: could not get ultra high speed state, work on normal mode [ 1.574222] sdhci-esdhc-imx 2198000.usdhc: Got CD GPIO [ 1.589766] sdhci-esdhc-imx 2198000.usdhc: Got WP GPIO [ 1.606144] sdhci-esdhc-imx 2198000.usdhc: No vqmmc regulator found ... [ 2.408926] VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,2): error -6 [ 2.416860] Please append a correct "root=" boot option; here are the available partitions: ... [ 2.500580] b300 3751936 mmcblk0 driver: mmcblk [ 2.505927] b318 128 mmcblk0rpmb (driver?) [ 2.511211] b310 2048 mmcblk0boot1 (driver?) [ 2.516554] b308 2048 mmcblk0boot0 (driver?) [ 2.522003] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2) [ 2.530452] drm_kms_helper: panic occurred, switching back to text console [ 2.537649] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)
Thanks in advance for looking into this. Regards,
Nikolay
Fabio Estevam
reviewerHi Nikolay,
Quoted 6 lines · Nikolay Dimitrov
Hi Fabio,
Commit 1b673ef (linux-fslc, branch "patch-4.0") breaks booting of riotboard. Reverting the patch allows the board to boot properly. It looks like the patch causes some issue with the sdcard detection, as shown below in the logs (only the emmc is detected):
Thanks for reporting it. I don't have access to a riotboard, so will need some help to debugging this problem.
The commit you pointed out has reached 4.1-rc1 now as 8d86e4fcccf61bafe.
This commit has been in linux-next for sometime and I haven't seen such behaviour in the boards I have access to. Also, Olof's boot farm contains hummingboard and wandboard and they are booting fine in linux-next and 4.1-rc1. Please check:
http://arm-soc.lixom.net/bootlogs/mainline/v4.1-rc1/wandboard-arm-imx_v6_v7_defconfig.html
Could you please try booting 4.1-rc1 on riotboard? I would like to understand if this issue only happens on linux-fslc branch or not.
Quoted 8 lines
[ 1.447707] sdhci: Secure Digital Host Controller Interface driver [ 1.453974] sdhci: Copyright(c) Pierre Ossman [ 1.458488] sdhci-pltfm: SDHCI platform and OF driver helper [ 1.465423] sdhci-esdhc-imx 2194000.usdhc: could not get ultra high speed state, work on normal mode [ 1.474725] sdhci-esdhc-imx 2194000.usdhc: Got CD GPIO [ 1.479985] sdhci-esdhc-imx 2194000.usdhc: Got WP GPIO
CD and WP GPIO were retrieved here.
Quoted 7 lines
[ 1.485574] sdhci-esdhc-imx 2194000.usdhc: No vqmmc regulator found [ 1.539993] mmc0: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA [ 1.551185] sdhci-esdhc-imx 2198000.usdhc: could not get ultra high speed state, work on normal mode [ 1.574222] sdhci-esdhc-imx 2198000.usdhc: Got CD GPIO [ 1.589766] sdhci-esdhc-imx 2198000.usdhc: Got WP GPIO
Same here.
Quoted 4 lines
[ 1.606144] sdhci-esdhc-imx 2198000.usdhc: No vqmmc regulator found ... [ 2.408926] VFS: Cannot open root device "mmcblk0p2" orunknown-block(179,2): error -6
Could this be related to the old mmc probe order issue? What is the mmc port you want to mount the rootfs? Has it changed to mmcblk1?
Also, could you please remove 'wp-gpios' from the dts to see if this makes any difference?
Thanks,
Fabio Estevam
Quoted 15 lines · Fabio Estevam
Hi Nikolay,
Quoted 6 lines · Nikolay Dimitrov
Hi Fabio,
Commit 1b673ef (linux-fslc, branch "patch-4.0") breaks booting of riotboard. Reverting the patch allows the board to boot properly. It looks like the patch causes some issue with the sdcard detection, as shown below in the logs (only the emmc is detected):
Thanks for reporting it. I don't have access to a riotboard, so will need some help to debugging this problem.
The commit you pointed out has reached 4.1-rc1 now as
8d86e4fcccf61bafe.
Quoted 8 lines
This commit has been in linux-next for sometime and I haven't seen such behaviour in the boards I have access to. Also, Olof's boot farm contains hummingboard and wandboard and they are booting fine in linux-next and 4.1-rc1. Please check:
http://arm-soc.lixom.net/bootlogs/mainline/v4.1-rc1/wandboard-arm-imx_v6_v7_defconfig.htmlCould you please try booting 4.1-rc1 on riotboard? I would like to understand if this issue only happens on linux-fslc branch or not.
Linux mainline 4.1-rc1 booted fine out of the box on my RIotBoard, using mmc0 (full size SD on bottom of board) as root.
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Fabio Estevam
reviewerHi Gary,
Quoted 7 lines · Gary Thomas
Quoted 2 lines
Could you please try booting 4.1-rc1 on riotboard? I would like to understand if this issue only happens on linux-fslc branch or not.
Linux mainline 4.1-rc1 booted fine out of the box on my RIotBoard, using mmc0 (full size
SD on bottom of board) as root.
Thanks for testing it. I think this is good news as it shows we do not have such regression in mainline.
Would it be possible to send us the full boot logs when booting 4.1-rc1 and 4.0 linux-fslc, so that I can compare them?
Thanks,
Fabio Estevam
Quoted 15 lines · Fabio Estevam
Hi Gary,
Quoted 7 lines · Gary Thomas
Quoted 2 lines
Could you please try booting 4.1-rc1 on riotboard? I would like to understand if this issue only happens on linux-fslc branch or not.
Linux mainline 4.1-rc1 booted fine out of the box on my RIotBoard, using mmc0 (full size
SD on bottom of board) as root.Thanks for testing it. I think this is good news as it shows we do not have such regression in mainline.
Quoted 6 lines
Would it be possible to send us the full boot logs when booting 4.1-rc1 and 4.0 linux-fslc, so that I can compare them?
Thanks,
Fabio Estevam
Logs attached
boot-4.0: linux-fslc
boot-4.1: linux-mainline (4.1-rc1)
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Fabio Estevam
reviewerHi Gary / Nikolay,
Quoted 3 lines · Gary Thomas
Logs attached
boot-4.0: linux-fslc
boot-4.1: linux-mainline (4.1-rc1)
I was able to reproduce the same behaviour on a mx6qsabresd, so I hope I can debug this tomorrow.
Regards,
Fabio Estevam
Fabio Estevam
reviewerHi Gary / Nikolay,
Quoted 2 lines · Fabio Estevam
I was able to reproduce the same behaviour on a mx6qsabresd, so I hope I can debug this tomorrow.
Please try the attached patch and let us know if it works on riotboard.
I will also test it on warp board later today.
Regards,
Fabio Estevam
From 3bda6d618a6bab3c0d7836a8f8d4f7573eec3e36 Mon Sep 17 00:00:00 2001
From: Fabio Estevam <[email protected]>
Date: Tue, 28 Apr 2015 02:07:30 -0300
Subject: [PATCH] mmc: sdhci-esdhc-imx: Avoid calling mmc_of_parse()
This is a partial revert from 1b673ef39236("mmc: sdhci-esdhc-imx: Call mmc_of_parse()"), which calls mmc_pwrseq_alloc() instead of the recommeded mmc_of_parse() to allow powering up Wifi/BT gpios connected via esdhc.
Such commit is causing SD cards to not getting detected.
This is a quick workaround for kernel 4.0, as 4.1-rc1 does not show this problem.
Tested on a imx6q-sabresd.
--- drivers/mmc/host/sdhci-esdhc-imx.c | 39 +++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-)
drivers/mmc/host/sdhci-esdhc-imx.c +36 -3
@@ -31,6 +31,8 @@#include "sdhci-pltfm.h" #include "sdhci-esdhc.h" +#include "../core/pwrseq.h" +#define ESDHC_CTRL_D3CD 0x08/* VENDOR SPEC register */ #define ESDHC_VENDOR_SPEC 0xc0
@@ -1009,9 +1011,40 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev) host->mmc->parent->platform_data); } +/* write_protect */ +if (boarddata->wp_type ==ESDHC_WP_GPIO ) { + err =mmc_gpio_request_ro (host->mmc, boarddata->wp_gpio); +if (err) { +dev_err (mmc_dev (host->mmc), +"failed to request write-protect gpio!\n" ); + goto disable_clk; + } + host->mmc->caps2 |=MMC_CAP2_RO_ACTIVE_HIGH ; + } +/* card_detect */ -if (boarddata->cd_type ==ESDHC_CD_CONTROLLER ) +switch (boarddata->cd_type) { +case ESDHC_CD_GPIO : + err =mmc_gpio_request_cd (host->mmc, boarddata->cd_gpio,0 ); +if (err) { +dev_err (mmc_dev (host->mmc), +"failed to request card-detect gpio!\n" ); + goto disable_clk; + } +/* fall through */ + +case ESDHC_CD_CONTROLLER : +/* we have a working card_detect back */ host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION ; +break ; + +case ESDHC_CD_PERMANENT : + host->mmc->caps |=MMC_CAP_NONREMOVABLE ; +break ; + +case ESDHC_CD_NONE : +break ; + }switch (boarddata->max_bus_width) {case 8 :
@@ -1044,8 +1077,8 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev) host->quirks2 |=SDHCI_QUIRK2_NO_1_8_V ; } -/* call to generic mmc_of_parse to support additional capabilities */ - err =mmc_of_parse (host->mmc); + + err =mmc_pwrseq_alloc (host->mmc);if (err) goto disable_clk;
Signature · 1 line
1.9.1
Quoted 10 lines · Fabio Estevam
Hi Gary / Nikolay,
Quoted 2 lines · Fabio Estevam
I was able to reproduce the same behaviour on a mx6qsabresd, so I hope I can debug this tomorrow.
Please try the attached patch and let us know if it works on riotboard.
I will also test it on warp board later today.
Yes, this patch allows the RIoTboard to boot.
Thanks
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------