Commit a7c18e5c authored by Fred Ai's avatar Fred Ai Committed by Ulf Hansson
Browse files

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: default avatarFred Ai <fred.ai@bayhubtech.com>
Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20211216060824.357-2-fred.ai@bayhubtech.com


Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 4be33cf1
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);