Odroid-C1 regression with commit 4bc31edebde5 ("mmc: core: Set HS clock speed before sending HS CMD13")
Ulf Hansson
ulf.hansson at linaro.org
Thu May 11 03:42:41 PDT 2023
On Wed, 10 May 2023 at 22:54, Martin Blumenstingl
<martin.blumenstingl at googlemail.com> wrote:
>
> Hi Ulf,
>
> On Wed, May 10, 2023 at 4:21 PM Ulf Hansson <ulf.hansson at linaro.org> wrote:
> [...]
> > Thanks for reporting - and my apologies for the long delay! It's been
> > a busy period with lots of travelling for me.
> Thank you for taking the time to look into this now - no need to apologize!
>
> [...]
> > > In this state I get:
> > > # cat /sys/kernel/debug/mmc1/ios
> > > clock: 52000000 Hz
> > > actual clock: 51000000 Hz
> > > vdd: 21 (3.3 ~ 3.4 V)
> > > bus mode: 2 (push-pull)
> > > chip select: 0 (don't care)
> > > power mode: 2 (on)
> > > bus width: 3 (8 bits)
> > > timing spec: 9 (mmc HS200)
> > > signal voltage: 1 (1.80 V)
> > > driver type: 0 (driver type B)
> >
> > It looks to me that we are in the process of enabling the HS200 mode,
> > but hangs at some point. Unless I am mistaken.
> >
> > More precisely, I suspect it's either the call to mmc_set_clock() or
> > the call to mmc_switch_status(), in mmc_select_hs200(). Can you have a
> > closer look to confirm this?
> 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?
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?
Kind regards
Uffe
More information about the linux-amlogic
mailing list