Message ID | 20210121124052.3454-3-a-govindraju@ti.com |
---|---|
State | Changes Requested |
Delegated to: | Lokesh Vutla |
Headers | show |
Series | Add support for MMC higher speed modes for TI's am65x, j721e and j7200 platforms | expand |
On 1/21/21 9:40 PM, Aswath Govindraju wrote: > From: Faiz Abbas <faiz_abbas@ti.com> > > There are some speed modes that work without switching the dll on. > Unconditionally switch off the DLL before setting clock frequency to > support this case. The software will automatically enable DLL for speed > modes that require it. This also means the dll_on priv data member is no > longer required. > > Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> > Signed-off-by: Aswath Govindraju <a-govindraju@ti.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Best Regards, Jaehoon Chung > --- > drivers/mmc/am654_sdhci.c | 10 +--------- > 1 file changed, 1 insertion(+), 9 deletions(-) > > diff --git a/drivers/mmc/am654_sdhci.c b/drivers/mmc/am654_sdhci.c > index baa935e0d5b0..33f658fba719 100644 > --- a/drivers/mmc/am654_sdhci.c > +++ b/drivers/mmc/am654_sdhci.c > @@ -84,7 +84,6 @@ struct am654_sdhci_plat { > #define IOMUX_PRESENT (1 << 1) > #define FREQSEL_2_BIT (1 << 2) > #define STRBSEL_4_BIT (1 << 3) > - bool dll_on; > }; > > struct timing_data { > @@ -141,12 +140,7 @@ static int am654_sdhci_set_ios_post(struct sdhci_host *host) > val &= ~SDHCI_CLOCK_CARD_EN; > sdhci_writew(host, val, SDHCI_CLOCK_CONTROL); > > - /* power off phy */ > - if (plat->dll_on) { > - regmap_update_bits(plat->base, PHY_CTRL1, ENDLL_MASK, 0); > - > - plat->dll_on = false; > - } > + regmap_update_bits(plat->base, PHY_CTRL1, ENDLL_MASK, 0); > > /* restart clock */ > sdhci_set_clock(host->mmc, speed); > @@ -212,8 +206,6 @@ static int am654_sdhci_set_ios_post(struct sdhci_host *host) > val & DLLRDY_MASK, 1000, 1000000); > if (ret) > return ret; > - > - plat->dll_on = true; > } > > return 0; >
diff --git a/drivers/mmc/am654_sdhci.c b/drivers/mmc/am654_sdhci.c index baa935e0d5b0..33f658fba719 100644 --- a/drivers/mmc/am654_sdhci.c +++ b/drivers/mmc/am654_sdhci.c @@ -84,7 +84,6 @@ struct am654_sdhci_plat { #define IOMUX_PRESENT (1 << 1) #define FREQSEL_2_BIT (1 << 2) #define STRBSEL_4_BIT (1 << 3) - bool dll_on; }; struct timing_data { @@ -141,12 +140,7 @@ static int am654_sdhci_set_ios_post(struct sdhci_host *host) val &= ~SDHCI_CLOCK_CARD_EN; sdhci_writew(host, val, SDHCI_CLOCK_CONTROL); - /* power off phy */ - if (plat->dll_on) { - regmap_update_bits(plat->base, PHY_CTRL1, ENDLL_MASK, 0); - - plat->dll_on = false; - } + regmap_update_bits(plat->base, PHY_CTRL1, ENDLL_MASK, 0); /* restart clock */ sdhci_set_clock(host->mmc, speed); @@ -212,8 +206,6 @@ static int am654_sdhci_set_ios_post(struct sdhci_host *host) val & DLLRDY_MASK, 1000, 1000000); if (ret) return ret; - - plat->dll_on = true; } return 0;