Odroid-C1 regression with commit 4bc31edebde5 ("mmc: core: Set HS clock speed before sending HS CMD13")

Martin Blumenstingl martin.blumenstingl at googlemail.com
Sun May 14 13:42:46 PDT 2023


Hi Ulf,

On Thu, May 11, 2023 at 12:43 PM Ulf Hansson <ulf.hansson at linaro.org> wrote:
[...]
> > Indeed, removing mmc_set_clock() from mmc_select_hs200() also makes my
> > eMMC appear again on top of Linux 6.4-rc1.
> > See the attached diff in case it's not fully clear which
> > mmc_set_clock() call I removed.
>
> Thanks for the update! Removing that call restores mmc_select_hs200()
> to the previous behaviour - so thanks for confirming that this is
> working.
>
> However, to find the proper solution, I think we need to understand
> why we are hanging in the meson-mx-sdhc driver first. Here's a couple
> of follow up questions from me:
>
> 1) Before calling mmc_set_clock() what is the actual clock rate that
> has been set by the meson driver?
>
> 2) Does the call to mmc_set_clock() return or hang? Can we verify that
> the clock gets set correctly?
I used the attached diff to answer these two questions. See the
following log extract (full log is attached):
meson-mx-sdhc c1108e00.mmc: Trying to set MMC clock to 400000Hz
meson-mx-sdhc c1108e00.mmc: Actual MMC clock to 399812Hz
mmc1: mmc_select_hs200 switching to clock from card->ext_csd.hs_max_dtr...
meson-mx-sdhc c1108e00.mmc: Trying to set MMC clock to 52000000Hz
meson-mx-sdhc c1108e00.mmc: Actual MMC clock to 51000000Hz
mmc1: mmc_select_hs200 mmc_set_clock returned

> 3) If 2) seems to work above, we need to figure out why
> mmc_switch_status() is hanging. If there is a problem with the eMMC
> card responding in-correctly, the host driver should return with an
> error code, right?
You're right: it's indeed hanging in mmc_switch_status()
I don't get any interrupts (timeout, CRC error, ...) for it.
Do you have any suggestions what to check next?


Best regards,
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: error-prints-to-identify-why-hs200-switch-hangs.diff
Type: text/x-patch
Size: 2097 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20230514/273f4c5c/attachment.bin>


More information about the linux-amlogic mailing list