Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

visionfive: mmc0: error -110 whilst initialising SD card #122

Closed
andreas-schwab opened this issue Oct 18, 2023 · 8 comments
Closed

visionfive: mmc0: error -110 whilst initialising SD card #122

andreas-schwab opened this issue Oct 18, 2023 · 8 comments

Comments

@andreas-schwab
Copy link
Contributor

The latest update of the visionfive branch (on top of v6.6-rc6) appears to have broken the MMC driver.

[ 9.173217][ T310] Synopsys Designware Multimedia Card Interface Driver
[ 9.482677][ T11] dw_mmc 10000000.mmc: IDMAC supports 32-bit address mode.
[ 9.527920][ T29] dw_mmc 10010000.mmc: IDMAC supports 32-bit address mode.
[ 9.556013][ T11] dw_mmc 10000000.mmc: Using internal DMA controller.
[ 9.566566][ T29] dw_mmc 10010000.mmc: Using internal DMA controller.
[ 9.569504][ T11] dw_mmc 10000000.mmc: Version ID is 290a
[ 9.576195][ T29] dw_mmc 10010000.mmc: Version ID is 290a
[ 9.576285][ T29] dw_mmc 10010000.mmc: DW MMC controller at irq 28,32 bit host data width,32 deep fifo
[ 9.591151][ T11] dw_mmc 10000000.mmc: DW MMC controller at irq 27,32 bit host data width,32 deep fifo
[ 9.600936][ T29] dw_mmc 10010000.mmc: allocated mmc-pwrseq
[ 9.609686][ T11] mmc_host mmc0: card is polling.
[ 9.614854][ T29] mmc_host mmc1: card is non-removable.
[ 9.632008][ T11] mmc_host mmc0: Bus speed (slot 0) = 100000000Hz (slot req 400000Hz, actual 400000HZ div = 125)
[ 9.652008][ T29] mmc_host mmc1: Bus speed (slot 0) = 123750000Hz (slot req 400000Hz, actual 399193HZ div = 155)
[ 9.853844][ T24] mmc_host mmc1: Bus speed (slot 0) = 123750000Hz (slot req 50000000Hz, actual 30937500HZ div = 2)
[ 9.872146][ T24] mmc1: new high speed SDIO card at address 0001
[ 9.898833][ T8] mmc0: problem reading SD Status register
[ 10.015447][ T8] mmc0: error -110 whilst initialising SD card
[ 10.035348][ T8] mmc_host mmc0: Bus speed (slot 0) = 100000000Hz (slot req
300000Hz, actual 299401HZ div = 167)
[ 10.348690][ T8] mmc0: error -110 whilst initialising SD card
[ 10.369598][ T8] mmc_host mmc0: Bus speed (slot 0) = 100000000Hz (slot req
200000Hz, actual 200000HZ div = 250)
[ 10.578746][ T8] mmc0: problem reading SD Status register
[ 10.705388][ T8] mmc_host mmc0: Bus speed (slot 0) = 100000000Hz (slot req
50000000Hz, actual 50000000HZ div = 1)
[ 10.716070][ T8] mmc0: new high speed SDHC card at address aaaa
[ 10.788096][ T341] mmcblk0: mmc0:aaaa SC32G 29.7 GiB
[ 10.921993][ C0] dw_mmc 10000000.mmc: Unexpected command timeout, state 3
[ 11.135328][ C0] dw_mmc 10000000.mmc: Unexpected command timeout, state 3

With the previous patchset rebased onto v6.6-rc6 it was working fine.

@esmil
Copy link
Collaborator

esmil commented Oct 18, 2023

Hi Andreas. It works fine here. Did you enable CONFIG_NONPORTABLE and CONFIG_ERRATA_STARFIVE_JH7100 ?

I just noticed I forgot to add that to the visionfive_defconfig, so I've just pushed a commit fixing that.

@andreas-schwab
Copy link
Contributor Author

CONFIG_ERRATA_STARFIVE_JH7100 is enabled.

@andreas-schwab
Copy link
Contributor Author

@esmil
Copy link
Collaborator

esmil commented Oct 18, 2023

Interesting. The only change between the previous version and this v6.6-rc6 version is the added depends NONPORTABLE on the CONFIG_ERRATA_STARFIVE_JH7100 so if it's not your config then it must be an change in the mmc driver between the two rc's

@esmil
Copy link
Collaborator

esmil commented Oct 18, 2023

Could you try the visionfive_defconfig and see if that works for you? That works here.

@andreas-schwab
Copy link
Contributor Author

Why do you need NONPORTABLE?

@esmil
Copy link
Collaborator

esmil commented Oct 18, 2023

Because it turns out DMA_GLOBAL_POOL is mutually exclusive with any other way of handling DMA memory. This was found because the Renesas RZ/Five also uses and enabled DMA_GLOBAL_POOL in the RISC-V defconfig and that broke DMA memory allocations for other platforms.

@andreas-schwab
Copy link
Contributor Author

Since my base config has NONPORTABLE disabled this has caused ERRATA_STARFIVE_JH7100 to be silently disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants