RE: [PATCH] Revert "mmc: sdhci: Remove unneeded quirk2 flag of O2 SD host controller"

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

 



Hi Daniel,
	I suggestion that you set PCR(PCI Configuration Register) 0x308 bit4 to 1 before load module " sdhci_pci " then test again.
	For support 1.8V eMMC chip better, I had submit some patches to Linux kernel.  But these patches are only work when PCR 0x308 bit4 is 1. 
              If you use O2 SD host controller as SD card reader, you'd better set PCR 0x308 bit4 to 0; 
              If you use O2 SD host controller as eMMC host, you'd better set PCR 0x308 bit4 to 1.
BR
Ernest

-----邮件原件-----
发件人: Daniel Drake <drake@xxxxxxxxxxxx> 
发送时间: 2019年9月5日 12:56
收件人: ulf.hansson@xxxxxxxxxx
抄送: linux-mmc@xxxxxxxxxxxxxxx; linux@xxxxxxxxxxxx; Ernest Zhang(WH) <ernest.zhang@xxxxxxxxxxxxxx>
主题: [PATCH] Revert "mmc: sdhci: Remove unneeded quirk2 flag of O2 SD host controller"

This reverts commit 414126f9e5abf1973c661d24229543a9458fa8ce.

This commit broke eMMC storage access on a new consumer MiniPC based on AMD SoC, which has eMMC connected to:

02:00.0 SD Host controller: O2 Micro, Inc. Device 8620 (rev 01) (prog-if 01)
	Subsystem: O2 Micro, Inc. Device 0002

During probe, several errors are seen including:

  mmc1: Got data interrupt 0x02000000 even though no data operation was in progress.
  mmc1: Timeout waiting for hardware interrupt.
  mmc1: error -110 whilst initialising MMC card

Reverting this commit allows the eMMC storage to be detected & usable again.

Signed-off-by: Daniel Drake <drake@xxxxxxxxxxxx>
---
 drivers/mmc/host/sdhci-pci-o2micro.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-pci-o2micro.c b/drivers/mmc/host/sdhci-pci-o2micro.c
index 9dc4548271b4..19944b0049db 100644
--- a/drivers/mmc/host/sdhci-pci-o2micro.c
+++ b/drivers/mmc/host/sdhci-pci-o2micro.c
@@ -432,7 +432,6 @@ int sdhci_pci_o2_probe_slot(struct sdhci_pci_slot *slot)
 					mmc_hostname(host->mmc));
 				host->flags &= ~SDHCI_SIGNALING_330;
 				host->flags |= SDHCI_SIGNALING_180;
-				host->quirks2 |= SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD;
 				host->mmc->caps2 |= MMC_CAP2_NO_SD;
 				host->mmc->caps2 |= MMC_CAP2_NO_SDIO;
 				pci_write_config_dword(chip->pdev,
@@ -682,6 +681,7 @@ static const struct sdhci_ops sdhci_pci_o2_ops = {  const struct sdhci_pci_fixes sdhci_o2 = {
 	.probe = sdhci_pci_o2_probe,
 	.quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
+	.quirks2 = SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD,
 	.probe_slot = sdhci_pci_o2_probe_slot,  #ifdef CONFIG_PM_SLEEP
 	.resume = sdhci_pci_o2_resume,
--
2.20.1





[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