mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
mmc: sdhci-of-dwcmshc: disable internal clock auto gate
With CMDQ enabled, issuing a DCMD as the last command before disabling CMDQ causes the eMMC controller to auto-gate its internal clock. The state machine mismatch after exiting CMDQ mode triggers data-timeout errors on all subsequent reads and writes, so the auto-clock-gate function must be disabled whenever CMDQ is enabled. log: mmc2: Timeout waiting for hardware interrupt. mmc2: sdhci: ============ SDHCI REGISTER DUMP =========== mmc2: sdhci: Sys addr: 0x00000001 | Version: 0x00000005 mmc2: sdhci: Blk size: 0x00007200 | Blk cnt: 0x00000000 Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com> Change-Id: Ibafa74fc2db29b841b5b4df21ef484478f96a44e
This commit is contained in:
@@ -421,10 +421,11 @@ static void dwcmshc_rk3568_set_clock(struct sdhci_host *host, unsigned int clock
|
||||
|
||||
sdhci_set_clock(host, clock);
|
||||
|
||||
/* Disable cmd conflict check */
|
||||
/* Disable cmd conflict check and disable internal clock gate */
|
||||
reg = dwc_priv->vendor_specific_area1 + DWCMSHC_HOST_CTRL3;
|
||||
extra = sdhci_readl(host, reg);
|
||||
extra &= ~BIT(0);
|
||||
extra |= BIT(4);
|
||||
sdhci_writel(host, extra, reg);
|
||||
|
||||
/* Disable output clock while config DLL */
|
||||
|
||||
Reference in New Issue
Block a user