diff options
author | Vegard Nossum <vegard.nossum@gmail.com> | 2009-06-15 09:50:49 -0400 |
---|---|---|
committer | Vegard Nossum <vegard.nossum@gmail.com> | 2009-06-15 09:50:49 -0400 |
commit | 722f2a6c87f34ee0fd0130a8cf45f81e0705594a (patch) | |
tree | 50b054df34d2731eb0ba0cf1a6c27e43e7eed428 /arch/arm/mach-omap2/clock24xx.c | |
parent | 7a0aeb14e18ad59394bd9bbc6e57fb345819e748 (diff) | |
parent | 45e3e1935e2857c54783291107d33323b3ef33c8 (diff) |
Merge commit 'linus/master' into HEAD
Conflicts:
MAINTAINERS
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Diffstat (limited to 'arch/arm/mach-omap2/clock24xx.c')
-rw-r--r-- | arch/arm/mach-omap2/clock24xx.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c index e4cef333e291..44de0271fc2f 100644 --- a/arch/arm/mach-omap2/clock24xx.c +++ b/arch/arm/mach-omap2/clock24xx.c | |||
@@ -233,6 +233,8 @@ static struct prcm_config *curr_prcm_set; | |||
233 | static struct clk *vclk; | 233 | static struct clk *vclk; |
234 | static struct clk *sclk; | 234 | static struct clk *sclk; |
235 | 235 | ||
236 | static void __iomem *prcm_clksrc_ctrl; | ||
237 | |||
236 | /*------------------------------------------------------------------------- | 238 | /*------------------------------------------------------------------------- |
237 | * Omap24xx specific clock functions | 239 | * Omap24xx specific clock functions |
238 | *-------------------------------------------------------------------------*/ | 240 | *-------------------------------------------------------------------------*/ |
@@ -269,10 +271,9 @@ static int omap2_enable_osc_ck(struct clk *clk) | |||
269 | { | 271 | { |
270 | u32 pcc; | 272 | u32 pcc; |
271 | 273 | ||
272 | pcc = __raw_readl(OMAP24XX_PRCM_CLKSRC_CTRL); | 274 | pcc = __raw_readl(prcm_clksrc_ctrl); |
273 | 275 | ||
274 | __raw_writel(pcc & ~OMAP_AUTOEXTCLKMODE_MASK, | 276 | __raw_writel(pcc & ~OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl); |
275 | OMAP24XX_PRCM_CLKSRC_CTRL); | ||
276 | 277 | ||
277 | return 0; | 278 | return 0; |
278 | } | 279 | } |
@@ -281,10 +282,9 @@ static void omap2_disable_osc_ck(struct clk *clk) | |||
281 | { | 282 | { |
282 | u32 pcc; | 283 | u32 pcc; |
283 | 284 | ||
284 | pcc = __raw_readl(OMAP24XX_PRCM_CLKSRC_CTRL); | 285 | pcc = __raw_readl(prcm_clksrc_ctrl); |
285 | 286 | ||
286 | __raw_writel(pcc | OMAP_AUTOEXTCLKMODE_MASK, | 287 | __raw_writel(pcc | OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl); |
287 | OMAP24XX_PRCM_CLKSRC_CTRL); | ||
288 | } | 288 | } |
289 | 289 | ||
290 | static const struct clkops clkops_oscck = { | 290 | static const struct clkops clkops_oscck = { |
@@ -654,7 +654,7 @@ static u32 omap2_get_sysclkdiv(void) | |||
654 | { | 654 | { |
655 | u32 div; | 655 | u32 div; |
656 | 656 | ||
657 | div = __raw_readl(OMAP24XX_PRCM_CLKSRC_CTRL); | 657 | div = __raw_readl(prcm_clksrc_ctrl); |
658 | div &= OMAP_SYSCLKDIV_MASK; | 658 | div &= OMAP_SYSCLKDIV_MASK; |
659 | div >>= OMAP_SYSCLKDIV_SHIFT; | 659 | div >>= OMAP_SYSCLKDIV_SHIFT; |
660 | 660 | ||
@@ -714,15 +714,18 @@ int __init omap2_clk_init(void) | |||
714 | struct omap_clk *c; | 714 | struct omap_clk *c; |
715 | u32 clkrate; | 715 | u32 clkrate; |
716 | 716 | ||
717 | if (cpu_is_omap242x()) | 717 | if (cpu_is_omap242x()) { |
718 | prcm_clksrc_ctrl = OMAP2420_PRCM_CLKSRC_CTRL; | ||
718 | cpu_mask = RATE_IN_242X; | 719 | cpu_mask = RATE_IN_242X; |
719 | else if (cpu_is_omap2430()) | 720 | } else if (cpu_is_omap2430()) { |
721 | prcm_clksrc_ctrl = OMAP2430_PRCM_CLKSRC_CTRL; | ||
720 | cpu_mask = RATE_IN_243X; | 722 | cpu_mask = RATE_IN_243X; |
723 | } | ||
721 | 724 | ||
722 | clk_init(&omap2_clk_functions); | 725 | clk_init(&omap2_clk_functions); |
723 | 726 | ||
724 | for (c = omap24xx_clks; c < omap24xx_clks + ARRAY_SIZE(omap24xx_clks); c++) | 727 | for (c = omap24xx_clks; c < omap24xx_clks + ARRAY_SIZE(omap24xx_clks); c++) |
725 | clk_init_one(c->lk.clk); | 728 | clk_preinit(c->lk.clk); |
726 | 729 | ||
727 | osc_ck.rate = omap2_osc_clk_recalc(&osc_ck); | 730 | osc_ck.rate = omap2_osc_clk_recalc(&osc_ck); |
728 | propagate_rate(&osc_ck); | 731 | propagate_rate(&osc_ck); |