1
0
Fork 0
remarkable-linux/drivers/mmc
Shawn Guo e15c9d5f72 Revert "mmc: sdhci-esdhc-imx: disable the CMD CRC check for standard tuning"
This reverts commit 6534c897fd, which
causes reboot failure with AP5256 like below.

[   54.212072] systemd-shutdown[1]: All filesystems unmounted.
[   54.218225] systemd-shutdown[1]: Deactivating swaps.
[   54.223322] systemd-shutdown[1]: All swaps deactivated.
[   54.228631] systemd-shutdown[1]: Detaching loop devices.
[   54.237910] systemd-shutdown[1]: All loop devices detached.
[   54.243502] systemd-shutdown[1]: Detaching DM devices.
[   54.249215] systemd-shutdown[1]: All DM devices detached.
[   54.254735] systemd-shutdown[1]: All filesystems, swaps, loop devices and DM devices detached.
[   54.268653] systemd-shutdown[1]: Syncing filesystems and block devices.
[   54.275628] systemd-shutdown[1]: Rebooting.
[   64.474446] mmc1: Timeout waiting for hardware interrupt.
[   64.479851] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========
[   64.486293] mmc1: sdhci: Sys addr:  0xbeaec284 | Version:  0x00000002
[   64.492734] mmc1: sdhci: Blk size:  0x00000004 | Blk cnt:  0x00000001
[   64.499174] mmc1: sdhci: Argument:  0x95804804 | Trn mode: 0x00000003
[   64.505615] mmc1: sdhci: Present:   0x01f88008 | Host ctl: 0x00000013
[   64.512056] mmc1: sdhci: Power:     0x00000002 | Blk gap:  0x00000080
[   64.518497] mmc1: sdhci: Wake-up:   0x00000008 | Clock:    0x0000000f
[   64.524937] mmc1: sdhci: Timeout:   0x0000008f | Int stat: 0x00000000
[   64.531378] mmc1: sdhci: Int enab:  0x117f100b | Sig enab: 0x117f100b
[   64.537818] mmc1: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000302
[   64.544260] mmc1: sdhci: Caps:      0x07eb0000 | Caps_1:   0x8000b407
[   64.550700] mmc1: sdhci: Cmd:       0x0000353a | Max curr: 0x00ffffff
[   64.557141] mmc1: sdhci: Resp[0]:   0x00001000 | Resp[1]:  0x00000000
[   64.563581] mmc1: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000000
[   64.570020] mmc1: sdhci: Host ctl2: 0x00000008
[   64.574464] mmc1: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0xa9c41208
[   64.580904] mmc1: sdhci-esdhc-imx: ========= ESDHC IMX DEBUG STATUS DUMP =========
[   64.588473] mmc1: sdhci-esdhc-imx: cmd debug status:  0x2100
[   64.594132] mmc1: sdhci-esdhc-imx: data debug status:  0x2200
[   64.599877] mmc1: sdhci-esdhc-imx: trans debug status:  0x2300
[   64.605709] mmc1: sdhci-esdhc-imx: dma debug status:  0x24e0
[   64.611368] mmc1: sdhci-esdhc-imx: adma debug status:  0x2510
[   64.617113] mmc1: sdhci-esdhc-imx: fifo debug status:  0x2680
[   64.622859] mmc1: sdhci-esdhc-imx: async fifo debug status:  0x2750
[   64.629124] mmc1: sdhci: ============================================

A couple of notes about this issue:

- The issue is only seen with AP5256, not AP5256V.
- The issue doesn't happen with SDIO High-Speed mode but only UHS mode.
- If xochitl is disabled (and WiFi is manually enabled), the issue
  doesn't happen.

My guess is that we are hitting UHS tuning CMD CRC error, which might be
caused by signal quality issue we have already seen with AP5256 in DDR50
mode.  Considering that xochitl makes a lot of modules active, it might
bring in some signal interference on UHS tuning procedure.

The issue commences on 5.4 kernel, because the tuning CMD CRC check in
USDHC controller is disabled by setting ESDHC_TUNING_CMD_CRC_CHECK_DISABLE
bit with commit above.  Reverting the commit can just fix the issue.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2021-04-30 20:58:09 +08:00
..
core mmc: pwrseq_simple: select pinctrl state during suspend/resume 2021-03-19 23:32:23 +01:00
host Revert "mmc: sdhci-esdhc-imx: disable the CMD CRC check for standard tuning" 2021-04-30 20:58:09 +08:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00