diff options
author | Fred Ai <fred.ai@bayhubtech.com> | 2021-12-16 07:08:24 +0100 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2021-12-28 17:26:41 +0100 |
commit | a7c18e5cbb23ec467fb0671ee72ee7790b37335e (patch) | |
tree | 1e9fb370333e8bf458f1d17d64bca01c3e405e39 /drivers/mmc | |
parent | mmc: sdhci-pci-o2micro: Improve card input timing at SDR104/HS200 mode (diff) | |
download | linux-a7c18e5cbb23ec467fb0671ee72ee7790b37335e.tar.xz linux-a7c18e5cbb23ec467fb0671ee72ee7790b37335e.zip |
mmc: sdhci-pci-o2micro: Restore the SD clock's base clock frequency
Drop the SD clock's base clock for an SDR104 card, as frequency is wrong when
inserting and SD2.0/SDR50 card.
Signed-off-by: Fred Ai <fred.ai@bayhubtech.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20211216060824.357-2-fred.ai@bayhubtech.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci-pci-o2micro.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-pci-o2micro.c b/drivers/mmc/host/sdhci-pci-o2micro.c index 56e9f93999c4..92c20cb8074a 100644 --- a/drivers/mmc/host/sdhci-pci-o2micro.c +++ b/drivers/mmc/host/sdhci-pci-o2micro.c @@ -578,6 +578,11 @@ static void sdhci_pci_o2_set_clock(struct sdhci_host *host, unsigned int clock) if ((scratch_32 & 0xFFFF0000) != 0x2c280000) o2_pci_set_baseclk(chip, 0x2c280000); + } else { + pci_read_config_dword(chip->pdev, O2_SD_PLL_SETTING, &scratch_32); + + if ((scratch_32 & 0xFFFF0000) != 0x25100000) + o2_pci_set_baseclk(chip, 0x25100000); } pci_read_config_dword(chip->pdev, O2_SD_OUTPUT_CLK_SOURCE_SWITCH, &scratch_32); |