linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] mmc: core: hs400 fix probe errors
@ 2020-12-03  9:33 Chris Ruehl
  2020-12-03  9:33 ` [PATCH 1/3] mmc: core: prepare hs400 update, code order Chris Ruehl
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Chris Ruehl @ 2020-12-03  9:33 UTC (permalink / raw)
  To: Avri Altman
  Cc: Jack, Chris Ruehl, Ulf Hansson, Yoshihiro Shimoda, Wolfram Sang,
	Ludovic Barre, Baolin Wang, Krishna Konda, linux-mmc,
	linux-kernel

Fix the probe if hs400-1_8v / hs400-1_2v is used in the
dts and mmc-hs400-enhanced-strobe isn't set.

Kernel errors report when on boot and reboot and eMMC device
not detect randomly. With log output below.

[    1.802342] mmc1: SDHCI controller on fe330000.sdhci [fe330000.sdhci] using ADMA
[    2.007581] mmc1: mmc_select_hs200 failed, error -110
[    2.007589] mmc1: error -110 whilst initialising MMC card
[    2.413559] mmc1: mmc_select_hs200 failed, error -110
[    2.413562] mmc1: error -110 whilst initialising MMC card
[    3.183343] mmc1: Command Queue Engine enabled
[    3.183355] mmc1: new HS400 MMC card at address 0001
[    3.197163] mmcblk1: mmc1:0001 DG4008 7.28 GiB

Current implementation called the mmc_select_hs200 first, and after init
upgrade to hs400. Somehow the eMMC chip randomly crashed here.

Patch has been tested with customized Rockchip rk3399.

Patch 1/3 preparation
move mmc_select_hs400() in between hs400es and hs200, to be able to use
static functions defined previously below the mmc_select_hs400().

Patch 2/3 functionally change
mmc_select_timing()
 call mmc_select_hs400 if EXT_CSD_CARD_TYPE_HS400 is set the
 mmc_avail_type
mmc_select_hs400()
 fixup bus-width check
 fixup set power 1.8v or 1.2v; only one because of host-cap2
 is checked in mmc_select_card().
 Add drop-down to hs-mode.
 Call hs400 prepare tuning (if ops callback)
 and mmc_execute_tuning()

Patch 3/3 cleanup
Remove MMC_CAP2_HS200_1_8V_SDR / MMC_CAP2_HS200_1_2V_SDR from
host->caps2 when mmc-hs400-1_8v or mmc-hs400-1_2v is used in the dts.


Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
---


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-12-08  3:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-03  9:33 [PATCH 0/3] mmc: core: hs400 fix probe errors Chris Ruehl
2020-12-03  9:33 ` [PATCH 1/3] mmc: core: prepare hs400 update, code order Chris Ruehl
2020-12-03  9:33 ` [PATCH 2/3] mmc: core: make hs400 independent from hs200 init Chris Ruehl
2020-12-08  3:23   ` Chris Ruehl
2020-12-03  9:33 ` [PATCH 3/3] mmc: core: MMC_CAP2_HS200_1_8V_SDR with mmc-hs400-1_8v Chris Ruehl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).