提交 3760d31f 编写于 作者: R Roman Tereshonkov 提交者: 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: NRoman Tereshonkov <roman.tereshonkov@nokia.com>
Acked-by: NPaul Walmsley <paul@pwsan.com>
Signed-off-by: NTony Lindgren <tony@atomide.com>
上级 02e19a96
......@@ -111,14 +111,6 @@ u32 omap2_get_dpll_rate(struct clk *clk)
dpll_clk = (long long)clk->parent->rate * dpll_mult;
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;
}
......
......@@ -212,10 +212,10 @@ int __init omap2_clk_init(void)
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",
(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
......
此差异已折叠。
......@@ -115,6 +115,10 @@
/* CM_IDLEST_PLL_MPU */
#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 */
#define OMAP3430_AUTO_MPU_DPLL_SHIFT 0
......
......@@ -33,8 +33,6 @@ struct dpll_data {
void __iomem *mult_div1_reg;
u32 mult_mask;
u32 div1_mask;
void __iomem *div2_reg;
u32 div2_mask;
# if defined(CONFIG_ARCH_OMAP3)
void __iomem *control_reg;
u32 enable_mask;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册