On Thu, 16 Dec 2021 at 07:08, fred <fred.ai@xxxxxxxxxxxxxx> wrote: > > From: Fred Ai <fred.ai@xxxxxxxxxxxxxx> > > Remove SDR104 card, SD clock's base clock > frequency is not right when insert SD2.0/SDR50 card > > Signed-off-by: Fred Ai <fred.ai@xxxxxxxxxxxxxx> Applied for next, thanks! Kind regards Uffe > --- > Change in V3: > 1.Set SD clock's base clock frequency to 208MHz when card mode is SDR104/HS200. > 2.Set SD clock's base clock frequency to 200MHz when card mode is SD2.0/SDR50. > --- > drivers/mmc/host/sdhci-pci-o2micro.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/mmc/host/sdhci-pci-o2micro.c b/drivers/mmc/host/sdhci-pci-o2micro.c > index f55602609f8c..4ca1e8c5b631 100644 > --- a/drivers/mmc/host/sdhci-pci-o2micro.c > +++ b/drivers/mmc/host/sdhci-pci-o2micro.c > @@ -577,6 +577,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); > -- > 2.32.0 >