summaryrefslogtreecommitdiff
path: root/drivers/clk
diff options
context:
space:
mode:
authorDmitry Osipenko <digetx@gmail.com>2018-10-21 21:30:51 +0300
committerThierry Reding <treding@nvidia.com>2018-11-08 12:47:18 +0100
commitd14ce174ca02ee2a9f390b9e279663b3a848a48b (patch)
tree21e833999e6930c0dd67f2b50a6df318b3db5463 /drivers/clk
parent514fddba845ed3a1b17e01e99cb3a2a52256a88a (diff)
clk: tegra20: Check whether direct PLLM sourcing is turned off for EMC
Ensure that direct PLLM sourcing is turned off for EMC as we don't support that configuration in the clk driver. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Acked-by: Peter De Schrijver <pdeschrijver@nvidia.com> Acked-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/tegra/clk-tegra20.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c
index 68551effb5ca..c71b61162a32 100644
--- a/drivers/clk/tegra/clk-tegra20.c
+++ b/drivers/clk/tegra/clk-tegra20.c
@@ -800,7 +800,9 @@ static struct tegra_periph_init_data tegra_periph_nodiv_clk_list[] = {
static void __init tegra20_emc_clk_init(void)
{
+ const u32 use_pllm_ud = BIT(29);
struct clk *clk;
+ u32 emc_reg;
clk = clk_register_mux(NULL, "emc_mux", mux_pllmcp_clkm,
ARRAY_SIZE(mux_pllmcp_clkm),
@@ -812,6 +814,14 @@ static void __init tegra20_emc_clk_init(void)
&emc_lock);
clks[TEGRA20_CLK_MC] = clk;
+ /* un-divided pll_m_out0 is currently unsupported */
+ emc_reg = readl_relaxed(clk_base + CLK_SOURCE_EMC);
+ if (emc_reg & use_pllm_ud) {
+ pr_err("%s: un-divided PllM_out0 used as clock source\n",
+ __func__);
+ return;
+ }
+
/*
* Note that 'emc_mux' source and 'emc' rate shouldn't be changed at
* the same time due to a HW bug, this won't happen because we're