Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: tegra: Fix Tegra210 PLLU initialization

- Added necessary delays in PLLU enable sequence during initialization
- Applied PLLU lock to all secondary gates (PLLU_48M and PLLU_60M were
missing).

Signed-off-by: Alex Frid <afrid@nvidia.com>
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

authored by

Alex Frid and committed by
Stephen Boyd
7157c69a 71422dbb

+4 -2
+4 -2
drivers/clk/tegra/clk-tegra210.c
··· 2554 2554 reg = readl_relaxed(clk_base + pllu.params->ext_misc_reg[0]); 2555 2555 reg &= ~BIT(pllu.params->iddq_bit_idx); 2556 2556 writel_relaxed(reg, clk_base + pllu.params->ext_misc_reg[0]); 2557 + udelay(5); 2557 2558 2558 2559 reg = readl_relaxed(clk_base + PLLU_BASE); 2559 2560 reg &= ~GENMASK(20, 0); ··· 2562 2561 reg |= fentry->n << 8; 2563 2562 reg |= fentry->p << 16; 2564 2563 writel(reg, clk_base + PLLU_BASE); 2564 + udelay(1); 2565 2565 reg |= PLL_ENABLE; 2566 2566 writel(reg, clk_base + PLLU_BASE); 2567 2567 ··· 2802 2800 /* PLLU_60M */ 2803 2801 clk = clk_register_gate(NULL, "pll_u_60M", "pll_u_out2", 2804 2802 CLK_SET_RATE_PARENT, clk_base + PLLU_BASE, 2805 - 23, 0, NULL); 2803 + 23, 0, &pll_u_lock); 2806 2804 clk_register_clkdev(clk, "pll_u_60M", NULL); 2807 2805 clks[TEGRA210_CLK_PLL_U_60M] = clk; 2808 2806 2809 2807 /* PLLU_48M */ 2810 2808 clk = clk_register_gate(NULL, "pll_u_48M", "pll_u_out1", 2811 2809 CLK_SET_RATE_PARENT, clk_base + PLLU_BASE, 2812 - 25, 0, NULL); 2810 + 25, 0, &pll_u_lock); 2813 2811 clk_register_clkdev(clk, "pll_u_48M", NULL); 2814 2812 clks[TEGRA210_CLK_PLL_U_48M] = clk; 2815 2813