mmc: sdhci-pci-o2micro: Bug fix for O2 host controller Seabird1

[ Upstream commit cdd2b76978 ]

To fix support for the O2 host controller Seabird1, set the quirk
SDHCI_QUIRK2_PRESET_VALUE_BROKEN and the capability bit MMC_CAP2_NO_SDIO.
Moreover, assign the ->get_cd() callback.

Signed-off-by: Shirley Her <shirley.her@bayhubtech.com>
Link: https://lore.kernel.org/r/20200721011733.8416-1-shirley.her@bayhubtech.com
[Ulf: Updated the commit message]
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
shirley her 2020-07-20 18:17:33 -07:00 committed by Greg Kroah-Hartman
parent d000795c9f
commit 7404ce0f63
1 changed files with 6 additions and 0 deletions

View File

@ -561,6 +561,12 @@ int sdhci_pci_o2_probe_slot(struct sdhci_pci_slot *slot)
slot->host->mmc_host_ops.get_cd = sdhci_o2_get_cd;
}
if (chip->pdev->device == PCI_DEVICE_ID_O2_SEABIRD1) {
slot->host->mmc_host_ops.get_cd = sdhci_o2_get_cd;
host->mmc->caps2 |= MMC_CAP2_NO_SDIO;
host->quirks2 |= SDHCI_QUIRK2_PRESET_VALUE_BROKEN;
}
host->mmc_host_ops.execute_tuning = sdhci_o2_execute_tuning;
if (chip->pdev->device != PCI_DEVICE_ID_O2_FUJIN2)