summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorJerome Brunet <jbrunet@baylibre.com>2017-08-28 16:29:04 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2017-08-30 15:03:47 +0200
commit3c39e2ca88016fb88d767750cd254d328f84248f (patch)
treef17d7681993008301103f00494885d935904d75f /drivers/mmc
parentef5c48157e5fa6c574a7269743b68049ee3b9459 (diff)
downloadlinux-3c39e2ca88016fb88d767750cd254d328f84248f.tar.gz
linux-3c39e2ca88016fb88d767750cd254d328f84248f.tar.bz2
linux-3c39e2ca88016fb88d767750cd254d328f84248f.zip
mmc: meson-gx: cfg init overwrite values
cfg init function overwrite values set in the clk init function Remove the cfg pokes from the clk init. Actually, trying to use the CLK_AUTO, like initially tried in clk_init, would break the card initialization Reviewed-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/meson-gx-mmc.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index d2de5c11cdce..7d14d382cb1c 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -337,7 +337,7 @@ static int meson_mmc_clk_init(struct meson_host *host)
int i, ret = 0;
const char *mux_parent_names[MUX_CLK_NUM_PARENTS];
const char *clk_div_parents[1];
- u32 clk_reg, cfg;
+ u32 clk_reg;
/* init SD_EMMC_CLOCK to sane defaults w/min clock rate */
clk_reg = 0;
@@ -402,12 +402,6 @@ static int meson_mmc_clk_init(struct meson_host *host)
if (WARN_ON(PTR_ERR_OR_ZERO(host->cfg_div_clk)))
return PTR_ERR(host->cfg_div_clk);
- /* Ensure clock starts in "auto" mode, not "always on" */
- cfg = readl(host->regs + SD_EMMC_CFG);
- cfg &= ~CFG_CLK_ALWAYS_ON;
- cfg |= CFG_AUTO_CLK;
- writel(cfg, host->regs + SD_EMMC_CFG);
-
ret = clk_prepare_enable(host->cfg_div_clk);
if (ret)
return ret;
@@ -956,6 +950,9 @@ static int meson_mmc_probe(struct platform_device *pdev)
if (ret)
goto err_core_clk;
+ /* set config to sane default */
+ meson_mmc_cfg_init(host);
+
/* Stop execution */
writel(0, host->regs + SD_EMMC_START);
@@ -964,9 +961,6 @@ static int meson_mmc_probe(struct platform_device *pdev)
writel(IRQ_EN_MASK, host->regs + SD_EMMC_STATUS);
writel(IRQ_EN_MASK, host->regs + SD_EMMC_IRQ_EN);
- /* set config to sane default */
- meson_mmc_cfg_init(host);
-
ret = devm_request_threaded_irq(&pdev->dev, irq, meson_mmc_irq,
meson_mmc_irq_thread, IRQF_SHARED,
NULL, host);