diff options
author | Alex Frid <afrid@nvidia.com> | 2012-07-14 20:11:04 -0700 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2012-07-30 16:04:25 +0530 |
commit | 85dea84844b7d527a3adc836f60447d7078e5e4b (patch) | |
tree | 3133b556fb7d9daaba67d991ad403a169edf4e61 /arch/arm/mach-tegra/tegra30_clocks.c | |
parent | 18fc82f3e4bd9cc814031537d3c5344a588ab682 (diff) |
ARM: tegra: clock: Reduce Tegra3 pll post-lock delay
Reduced pll post-lock delay from 50us to 2us.
Rearranged wait for lock loop to delay first check of lock bit
by 2us after pll is enabled.
Added read fence for PLLM lock via PMC (in this case enable bit is
in APB bus register, but lock detect bit is in PPSB bus register).
Bug 1017271
Change-Id: Ibc963533854383e884d87be61e1b98e9d54d3ea0
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/115933
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/tegra30_clocks.c')
-rw-r--r-- | arch/arm/mach-tegra/tegra30_clocks.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/tegra30_clocks.c b/arch/arm/mach-tegra/tegra30_clocks.c index 7d3ebdd70f34..ea00fc225f52 100644 --- a/arch/arm/mach-tegra/tegra30_clocks.c +++ b/arch/arm/mach-tegra/tegra30_clocks.c @@ -1395,11 +1395,11 @@ static int tegra3_pll_clk_wait_for_lock(struct clk *c, u32 lock_reg, u32 lock_bi #if USE_PLL_LOCK_BITS int i; for (i = 0; i < c->u.pll.lock_delay; i++) { + udelay(2); /* timeout = 2 * lock time */ if (clk_readl(lock_reg) & lock_bit) { udelay(PLL_POST_LOCK_DELAY); return 0; } - udelay(2); /* timeout = 2 * lock time */ } pr_err("Timed out waiting for lock bit on pll %s", c->name); return -1; @@ -1556,6 +1556,7 @@ static int tegra3_pll_clk_enable(struct clk *c) val = pmc_readl(PMC_PLLP_WB0_OVERRIDE); val |= PMC_PLLP_WB0_OVERRIDE_PLLM_ENABLE; pmc_writel(val, PMC_PLLP_WB0_OVERRIDE); + pmc_readl(PMC_PLLP_WB0_OVERRIDE); } tegra3_pll_clk_wait_for_lock(c, c->reg + PLL_BASE, PLL_BASE_LOCK); |