diff options
author | Haibo Chen <haibo.chen@nxp.com> | 2016-06-14 13:52:16 +0800 |
---|---|---|
committer | Haibo Chen <haibo.chen@nxp.com> | 2016-06-16 08:14:08 +0800 |
commit | d86edca368b277011f5dcf444129705bd56f753c (patch) | |
tree | b97911f2b7ca3ec54053fecf7b9fb75e12c3f957 | |
parent | fc72198f807eb948f91d2349d830cbcbf8856ed1 (diff) |
MLK-12902: usdhc: Revert "MLK-11685-5 mmc: sdhci-esdhc-imx: no need busfreq for imx6qdl"
This reverts commit 312979d1fcbd068d4ba0f461e974e7cbcc889548.
When busfreq is at low bus mode, which is 24MHz, it means DDR/AHB/AXI
will drop to 24MHz. At the same time, when in low busfreq mode, cpuidle
can be in low power idle, DRAM will be put into self-refresh and DRAM IO
will in low power mode to save power, so DMA will NOT work.
So all peripherals that needs DMA, need to request bus freq to high
setpoint when it is active.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
(cherry picked from commit 2c01452f4d7c0f65553b365adc27a1b7b6ba8644)
-rw-r--r-- | drivers/mmc/host/sdhci-esdhc-imx.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index b5293f36d45d..b915ecd3e15d 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -140,8 +140,6 @@ #define ESDHC_FLAG_HS200 BIT(8) /* The IP supports HS400 mode */ #define ESDHC_FLAG_HS400 BIT(9) -/* need request bus freq during low power */ -#define ESDHC_FLAG_BUSFREQ BIT(10) /* A higher clock ferquency than this rate requires strobell dll control */ #define ESDHC_STROBE_DLL_CLK_FREQ 100000000 @@ -186,7 +184,7 @@ static struct esdhc_soc_data usdhc_imx6q_data = { static struct esdhc_soc_data usdhc_imx6sl_data = { .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_ERR004536 - | ESDHC_FLAG_HS200 | ESDHC_FLAG_BUSFREQ, + | ESDHC_FLAG_HS200, }; static struct esdhc_soc_data usdhc_imx6sx_data = { @@ -1217,8 +1215,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev) pltfm_host->clk = imx_data->clk_per; pltfm_host->clock = clk_get_rate(pltfm_host->clk); - if (imx_data->socdata->flags & ESDHC_FLAG_BUSFREQ) - request_bus_freq(BUS_FREQ_HIGH); + request_bus_freq(BUS_FREQ_HIGH); clk_prepare_enable(imx_data->clk_per); clk_prepare_enable(imx_data->clk_ipg); @@ -1310,8 +1307,7 @@ disable_clk: clk_disable_unprepare(imx_data->clk_per); clk_disable_unprepare(imx_data->clk_ipg); clk_disable_unprepare(imx_data->clk_ahb); - if (imx_data->socdata->flags & ESDHC_FLAG_BUSFREQ) - release_bus_freq(BUS_FREQ_HIGH); + release_bus_freq(BUS_FREQ_HIGH); free_sdhci: sdhci_pltfm_free(pdev); return err; @@ -1355,8 +1351,7 @@ static int sdhci_esdhc_runtime_suspend(struct device *dev) } clk_disable_unprepare(imx_data->clk_ahb); - if (imx_data->socdata->flags & ESDHC_FLAG_BUSFREQ) - release_bus_freq(BUS_FREQ_HIGH); + release_bus_freq(BUS_FREQ_HIGH); return ret; } @@ -1367,8 +1362,7 @@ static int sdhci_esdhc_runtime_resume(struct device *dev) struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct pltfm_imx_data *imx_data = pltfm_host->priv; - if (imx_data->socdata->flags & ESDHC_FLAG_BUSFREQ) - request_bus_freq(BUS_FREQ_HIGH); + request_bus_freq(BUS_FREQ_HIGH); if (!sdhci_sdio_irq_enabled(host)) { clk_prepare_enable(imx_data->clk_per); |