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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ulf,

On Wed, May 10, 2023 at 4:21 PM Ulf Hansson <ulf.hansson@xxxxxxxxxx> 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.


Best regards,
Martin
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 89cd48fcec79..31d7fff5a1a1 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1500,7 +1500,6 @@ static int mmc_select_hs200(struct mmc_card *card)
 		old_timing = host->ios.timing;
 		old_clock = host->ios.clock;
 		mmc_set_timing(host, MMC_TIMING_MMC_HS200);
-		mmc_set_clock(card->host, card->ext_csd.hs_max_dtr);
 
 		/*
 		 * For HS200, CRC errors are not a reliable way to know the

[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux