mmc: Merge branch fixes into next
Merge the mmc fixes for v6.12-rc[n] into the next branch, to allow them to get tested together with the new mmc changes that are targeted for v6.13. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
@@ -1161,28 +1161,40 @@ static void gl9767_disable_ssc_pll(struct pci_dev *pdev)
|
||||
gl9767_vhs_read(pdev);
|
||||
}
|
||||
|
||||
static void gl9767_set_low_power_negotiation(struct pci_dev *pdev, bool enable)
|
||||
{
|
||||
u32 value;
|
||||
|
||||
gl9767_vhs_write(pdev);
|
||||
|
||||
pci_read_config_dword(pdev, PCIE_GLI_9767_CFG, &value);
|
||||
if (enable)
|
||||
value &= ~PCIE_GLI_9767_CFG_LOW_PWR_OFF;
|
||||
else
|
||||
value |= PCIE_GLI_9767_CFG_LOW_PWR_OFF;
|
||||
pci_write_config_dword(pdev, PCIE_GLI_9767_CFG, value);
|
||||
|
||||
gl9767_vhs_read(pdev);
|
||||
}
|
||||
|
||||
static void sdhci_gl9767_set_clock(struct sdhci_host *host, unsigned int clock)
|
||||
{
|
||||
struct sdhci_pci_slot *slot = sdhci_priv(host);
|
||||
struct mmc_ios *ios = &host->mmc->ios;
|
||||
struct pci_dev *pdev;
|
||||
u32 value;
|
||||
u16 clk;
|
||||
|
||||
pdev = slot->chip->pdev;
|
||||
host->mmc->actual_clock = 0;
|
||||
|
||||
gl9767_vhs_write(pdev);
|
||||
|
||||
pci_read_config_dword(pdev, PCIE_GLI_9767_CFG, &value);
|
||||
value |= PCIE_GLI_9767_CFG_LOW_PWR_OFF;
|
||||
pci_write_config_dword(pdev, PCIE_GLI_9767_CFG, value);
|
||||
|
||||
gl9767_set_low_power_negotiation(pdev, false);
|
||||
gl9767_disable_ssc_pll(pdev);
|
||||
sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
|
||||
|
||||
if (clock == 0)
|
||||
if (clock == 0) {
|
||||
gl9767_set_low_power_negotiation(pdev, true);
|
||||
return;
|
||||
}
|
||||
|
||||
clk = sdhci_calc_clk(host, clock, &host->mmc->actual_clock);
|
||||
if (clock == 200000000 && ios->timing == MMC_TIMING_UHS_SDR104) {
|
||||
@@ -1191,12 +1203,7 @@ static void sdhci_gl9767_set_clock(struct sdhci_host *host, unsigned int clock)
|
||||
}
|
||||
|
||||
sdhci_enable_clk(host, clk);
|
||||
|
||||
pci_read_config_dword(pdev, PCIE_GLI_9767_CFG, &value);
|
||||
value &= ~PCIE_GLI_9767_CFG_LOW_PWR_OFF;
|
||||
pci_write_config_dword(pdev, PCIE_GLI_9767_CFG, value);
|
||||
|
||||
gl9767_vhs_read(pdev);
|
||||
gl9767_set_low_power_negotiation(pdev, true);
|
||||
}
|
||||
|
||||
static void sdhci_gl9767_set_card_detect_debounce_time(struct sdhci_host *host)
|
||||
@@ -1397,6 +1404,9 @@ static int gl9767_init_sd_express(struct mmc_host *mmc, struct mmc_ios *ios)
|
||||
sdhci_writew(host, value, SDHCI_CLOCK_CONTROL);
|
||||
}
|
||||
|
||||
pci_read_config_dword(pdev, PCIE_GLI_9767_CFG, &value);
|
||||
value &= ~PCIE_GLI_9767_CFG_LOW_PWR_OFF;
|
||||
pci_write_config_dword(pdev, PCIE_GLI_9767_CFG, value);
|
||||
gl9767_vhs_read(pdev);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user