Commit 3760d31f authored by Roman Tereshonkov's avatar Roman Tereshonkov Committed by Tony Lindgren

ARM: OMAP2: New DPLL clock framework

These changes is the result of the discussion with Paul Walmsley.
His ideas are included into this patch.

Remove DPLL output divider handling from DPLLs and CLKOUTX2 clocks,
and place it into specific DPLL output divider clocks (e.g., dpll3_m2_clk).
omap2_get_dpll_rate() now returns the correct DPLL rate, as represented
by the DPLL's CLKOUT output. Also add MPU and IVA2 subsystem clocks, along
with high-frequency bypass support.

Add support for DPLLs function in locked and bypass clock modes.
Signed-off-by: default avatarRoman Tereshonkov <roman.tereshonkov@nokia.com>
Acked-by: default avatarPaul Walmsley <paul@pwsan.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 02e19a96
...@@ -111,14 +111,6 @@ u32 omap2_get_dpll_rate(struct clk *clk) ...@@ -111,14 +111,6 @@ u32 omap2_get_dpll_rate(struct clk *clk)
dpll_clk = (long long)clk->parent->rate * dpll_mult; dpll_clk = (long long)clk->parent->rate * dpll_mult;
do_div(dpll_clk, dpll_div + 1); do_div(dpll_clk, dpll_div + 1);
/* 34XX only */
if (dd->div2_reg) {
dpll = __raw_readl(dd->div2_reg);
dpll_div = dpll & dd->div2_mask;
dpll_div >>= __ffs(dd->div2_mask);
do_div(dpll_clk, dpll_div + 1);
}
return dpll_clk; return dpll_clk;
} }
......
...@@ -212,10 +212,10 @@ int __init omap2_clk_init(void) ...@@ -212,10 +212,10 @@ int __init omap2_clk_init(void)
recalculate_root_clocks(); recalculate_root_clocks();
printk(KERN_INFO "Clocking rate (Crystal/DPLL/MPU): " printk(KERN_INFO "Clocking rate (Crystal/DPLL/ARM core): "
"%ld.%01ld/%ld/%ld MHz\n", "%ld.%01ld/%ld/%ld MHz\n",
(osc_sys_ck.rate / 1000000), (osc_sys_ck.rate / 100000) % 10, (osc_sys_ck.rate / 1000000), (osc_sys_ck.rate / 100000) % 10,
(core_ck.rate / 1000000), (dpll1_fck.rate / 1000000)) ; (core_ck.rate / 1000000), (arm_fck.rate / 1000000));
/* /*
* Only enable those clocks we will need, let the drivers * Only enable those clocks we will need, let the drivers
......
This diff is collapsed.
...@@ -115,6 +115,10 @@ ...@@ -115,6 +115,10 @@
/* CM_IDLEST_PLL_MPU */ /* CM_IDLEST_PLL_MPU */
#define OMAP3430_ST_MPU_CLK (1 << 0) #define OMAP3430_ST_MPU_CLK (1 << 0)
#define OMAP3430_ST_IVA2_CLK_MASK (1 << 0)
/* CM_IDLEST_PLL_MPU */
#define OMAP3430_ST_MPU_CLK_MASK (1 << 0)
/* CM_AUTOIDLE_PLL_MPU */ /* CM_AUTOIDLE_PLL_MPU */
#define OMAP3430_AUTO_MPU_DPLL_SHIFT 0 #define OMAP3430_AUTO_MPU_DPLL_SHIFT 0
......
...@@ -33,8 +33,6 @@ struct dpll_data { ...@@ -33,8 +33,6 @@ struct dpll_data {
void __iomem *mult_div1_reg; void __iomem *mult_div1_reg;
u32 mult_mask; u32 mult_mask;
u32 div1_mask; u32 div1_mask;
void __iomem *div2_reg;
u32 div2_mask;
# if defined(CONFIG_ARCH_OMAP3) # if defined(CONFIG_ARCH_OMAP3)
void __iomem *control_reg; void __iomem *control_reg;
u32 enable_mask; u32 enable_mask;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment