Re: [U-Boot] u-boot on Minnowboard max

Hi,
On Tue, Jun 7, 2016 at 2:09 PM, vinoth eswaran evinoth1206@gmail.com wrote:
Hello Mr.Bin,
Please keep the ML in the loop, also avoid top-posting, and always use plain text.
I have attached the start up logs for your reference, I have added some debug messages also and I have disabled the SDIO (0f15) by removing it from u-boot , so please ignore that.
bootcmd=fatload mmc 0:1 01000000 bzImage; zboot 01000000
I am not passing any commnd line from u-boot.
Since I have builded a customised Linux kernel I have the command line added in one of the .scc files.
Kernel command line: root=/dev/mmcblk0p2 rootwait rootfstype=ext4 console=ttyS0,115200 console=tty0
My View:
By UEFI SDHCI is on ACPI
mmc0: SDHCI controller on ACPI [80860F16:00] using ADMA
and by u-boot SDHCI is on PCI
mmc0: SDHCI controller on PCI [0000:00:12.0] using ADMA
and I think that something is missing in U-boot or Linux , so it is unable to initialize SD card. It will be great , if u give me some inputs to fix this issue.
Just some initial investigation based on your log. It looks Linux kernel prints:
[ 1.267312] sdhci-pci 0000:00:12.0: failed to setup card detect gpio
where it calls mmc_gpiod_request_cd() in drivers/mmc/host/sdhci-pci-core.c:
mmc_gpiod_request_cd(host->mmc, slot->cd_con_id, slot->cd_idx, slot->cd_override_level, 0, NULL)) { dev_warn(&pdev->dev, "failed to setup card detect gpio\n"); slot->cd_idx = -1; }
I did not have time to debug this, but based on the API name it looks to me this mmc_gpiod_request_cd() has something to do with GPIO where the Linux SDHC driver requests a card detect signal from a GPIO pin.
On BayTrail, GPIO driver in Linux only works with ACPI as it cannot be discovered via PCI, so U-Boot must ship with an ACPI table, which is already supported in the latest mainline. Please do the same testing with the latest U-Boot to see if the problem still exists.
Regards, Bin

Hello Mr.BIn,
I tested using the latest u-boot (u-boot-2016.07-rc1) with CONFIG_GENERATE_ACPI_TABLE=y enabled. I am still facing the same issue, the Linux kernel is not able to initialize the root file system from the sd card. I have attached the logs for your reference.
My Analysis: [ 1.267312] sdhci-pci 0000:00:12.0: failed to setup card detect gpio -- this error message I am seeing with UEFI firmware also. So I am assuming it is not the issue here.
I have done some debugging of MMC initialisation and found that in mmc_rescan function (drivers/mmc/core/core.c)
host->ops->get_cd(host) returns 0
and the condition is failed. So MMC is not getting intialized. i checked the return of
!!(sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT); and here I am seeing that
with U-boot version it is 1FA0000 and bit AND with 0x00010000 is zero (condition fails) with UEFI version it is 1FF0000 and bit AND with 0x00010000 is one (condition succeeded)
Do you have any idea why this is happening, any input from your side will help me
Thanks a lot:)
Mit Freundlichen Grüßen VinothKumar +49 1798909072
On Tue, Jun 7, 2016 at 11:43 AM, Bin Meng bmeng.cn@gmail.com wrote:
Hi,
On Tue, Jun 7, 2016 at 2:09 PM, vinoth eswaran evinoth1206@gmail.com wrote:
Hello Mr.Bin,
Please keep the ML in the loop, also avoid top-posting, and always use plain text.
I have attached the start up logs for your reference, I have added some debug messages also and I have disabled the SDIO (0f15) by removing it from u-boot , so please ignore that.
bootcmd=fatload mmc 0:1 01000000 bzImage; zboot 01000000
I am not passing any commnd line from u-boot.
Since I have builded a customised Linux kernel I have the command line added in one of the .scc files.
Kernel command line: root=/dev/mmcblk0p2 rootwait rootfstype=ext4 console=ttyS0,115200 console=tty0
My View:
By UEFI SDHCI is on ACPI
mmc0: SDHCI controller on ACPI [80860F16:00] using ADMA
and by u-boot SDHCI is on PCI
mmc0: SDHCI controller on PCI [0000:00:12.0] using ADMA
and I think that something is missing in U-boot or Linux , so it is unable to initialize SD card. It will be great , if u give me some inputs to fix this issue.
Just some initial investigation based on your log. It looks Linux kernel prints:
[ 1.267312] sdhci-pci 0000:00:12.0: failed to setup card detect gpio
where it calls mmc_gpiod_request_cd() in drivers/mmc/host/sdhci-pci-core.c:
mmc_gpiod_request_cd(host->mmc, slot->cd_con_id, slot->cd_idx, slot->cd_override_level, 0, NULL)) { dev_warn(&pdev->dev, "failed to setup card detect gpio\n"); slot->cd_idx = -1; }
I did not have time to debug this, but based on the API name it looks to me this mmc_gpiod_request_cd() has something to do with GPIO where the Linux SDHC driver requests a card detect signal from a GPIO pin.
On BayTrail, GPIO driver in Linux only works with ACPI as it cannot be discovered via PCI, so U-Boot must ship with an ACPI table, which is already supported in the latest mainline. Please do the same testing with the latest U-Boot to see if the problem still exists.
Regards, Bin

Hi,
On Tue, Jun 7, 2016 at 7:40 PM, vinoth eswaran evinoth1206@gmail.com wrote:
Hello Mr.BIn,
I tested using the latest u-boot (u-boot-2016.07-rc1) with CONFIG_GENERATE_ACPI_TABLE=y enabled. I am still facing the same issue, the Linux kernel is not able to initialize the root file system from the sd card. I have attached the logs for your reference.
My Analysis: [ 1.267312] sdhci-pci 0000:00:12.0: failed to setup card detect gpio -- this error message I am seeing with UEFI firmware also. So I am assuming it is not the issue here.
I have done some debugging of MMC initialisation and found that in mmc_rescan function (drivers/mmc/core/core.c)
host->ops->get_cd(host) returns 0
and the condition is failed. So MMC is not getting intialized. i checked the return of
!!(sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT); and here I am seeing that
with U-boot version it is 1FA0000 and bit AND with 0x00010000 is zero (condition fails) with UEFI version it is 1FF0000 and bit AND with 0x00010000 is one (condition succeeded)
Do you have any idea why this is happening, any input from your side will help me
Issue identified. Working on a fix. Stay tuned.
Thanks a lot:)
Mit Freundlichen Grüßen VinothKumar +49 1798909072
Please stop top-posting. Thanks!
Regards, Bin

Hello Mr.Bin,
May I know what is the issue , if you could explain I can fix this in my target and could provide the patch. I am stuck up with this issue and couldn't able to proceed further.
Thanks a lot:)
Mit Freundlichen Grüßen VinothKumar +49 1798909072
On Wed, Jun 8, 2016 at 7:00 AM, Bin Meng bmeng.cn@gmail.com wrote:
Hi,
On Tue, Jun 7, 2016 at 7:40 PM, vinoth eswaran evinoth1206@gmail.com wrote:
Hello Mr.BIn,
I tested using the latest u-boot (u-boot-2016.07-rc1) with CONFIG_GENERATE_ACPI_TABLE=y enabled. I am still facing the same issue, the Linux kernel is not able to initialize the root file system from the sd card. I have attached the logs for your reference.
My Analysis: [ 1.267312] sdhci-pci 0000:00:12.0: failed to setup card detect gpio -- this error message I am seeing with UEFI firmware also. So I am assuming it is not the issue here.
I have done some debugging of MMC initialisation and found that in mmc_rescan function (drivers/mmc/core/core.c)
host->ops->get_cd(host) returns 0
and the condition is failed. So MMC is not getting intialized. i checked the return of
!!(sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT); and here I am seeing that
with U-boot version it is 1FA0000 and bit AND with 0x00010000 is zero (condition fails) with UEFI version it is 1FF0000 and bit AND with 0x00010000 is one (condition succeeded)
Do you have any idea why this is happening, any input from your side will help me
Issue identified. Working on a fix. Stay tuned.
Thanks a lot:)
Mit Freundlichen Grüßen VinothKumar +49 1798909072
Please stop top-posting. Thanks!
Regards, Bin

Hi,
On Wed, Jun 8, 2016 at 8:02 PM, vinoth eswaran evinoth1206@gmail.com wrote:
Hello Mr.Bin,
May I know what is the issue , if you could explain I can fix
this in my target and could provide the patch. I am stuck up with this issue and couldn't able to proceed further.
I've just sent out a series that fixes this issue. Please try it out.
Thanks a lot:)
I've mentioned twice, please don't top-posting. Thanks.
Mit Freundlichen Grüßen VinothKumar +49 1798909072
Regards, Bin
participants (2)
-
Bin Meng
-
vinoth eswaran