Commit 068b1e51 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 a18609a1
......@@ -115,14 +115,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 = cm_read_reg(dd->div2_reg);
dpll_div = dpll & dd->div2_mask;
dpll_div >>= mask_to_shift(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
......
This diff is collapsed.
......@@ -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
......
......@@ -496,7 +496,7 @@ static struct file_operations proc_omap_ck_operations = {
int __init omap_ck_init(void)
{
struct proc_dir_entry *entry;
struct proc_dir_entry *entry;
entry = create_proc_entry("omap_clocks", 0, NULL);
if (entry)
......@@ -506,4 +506,3 @@ int __init omap_ck_init(void)
}
__initcall(omap_ck_init);
#endif
......@@ -35,8 +35,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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment