diff options
Diffstat (limited to 'arch/arm/mach-omap2/clock24xx.c')
-rw-r--r-- | arch/arm/mach-omap2/clock24xx.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c index efc59c49341b..44de0271fc2f 100644 --- a/arch/arm/mach-omap2/clock24xx.c +++ b/arch/arm/mach-omap2/clock24xx.c | |||
@@ -103,10 +103,10 @@ static struct omap_clk omap24xx_clks[] = { | |||
103 | CLK(NULL, "mdm_ick", &mdm_ick, CK_243X), | 103 | CLK(NULL, "mdm_ick", &mdm_ick, CK_243X), |
104 | CLK(NULL, "mdm_osc_ck", &mdm_osc_ck, CK_243X), | 104 | CLK(NULL, "mdm_osc_ck", &mdm_osc_ck, CK_243X), |
105 | /* DSS domain clocks */ | 105 | /* DSS domain clocks */ |
106 | CLK(NULL, "dss_ick", &dss_ick, CK_243X | CK_242X), | 106 | CLK("omapfb", "ick", &dss_ick, CK_243X | CK_242X), |
107 | CLK(NULL, "dss1_fck", &dss1_fck, CK_243X | CK_242X), | 107 | CLK("omapfb", "dss1_fck", &dss1_fck, CK_243X | CK_242X), |
108 | CLK(NULL, "dss2_fck", &dss2_fck, CK_243X | CK_242X), | 108 | CLK("omapfb", "dss2_fck", &dss2_fck, CK_243X | CK_242X), |
109 | CLK(NULL, "dss_54m_fck", &dss_54m_fck, CK_243X | CK_242X), | 109 | CLK("omapfb", "tv_fck", &dss_54m_fck, CK_243X | CK_242X), |
110 | /* L3 domain clocks */ | 110 | /* L3 domain clocks */ |
111 | CLK(NULL, "core_l3_ck", &core_l3_ck, CK_243X | CK_242X), | 111 | CLK(NULL, "core_l3_ck", &core_l3_ck, CK_243X | CK_242X), |
112 | CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_243X | CK_242X), | 112 | CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_243X | CK_242X), |
@@ -206,7 +206,7 @@ static struct omap_clk omap24xx_clks[] = { | |||
206 | CLK(NULL, "aes_ick", &aes_ick, CK_243X | CK_242X), | 206 | CLK(NULL, "aes_ick", &aes_ick, CK_243X | CK_242X), |
207 | CLK(NULL, "pka_ick", &pka_ick, CK_243X | CK_242X), | 207 | CLK(NULL, "pka_ick", &pka_ick, CK_243X | CK_242X), |
208 | CLK(NULL, "usb_fck", &usb_fck, CK_243X | CK_242X), | 208 | CLK(NULL, "usb_fck", &usb_fck, CK_243X | CK_242X), |
209 | CLK(NULL, "usbhs_ick", &usbhs_ick, CK_243X), | 209 | CLK("musb_hdrc", "ick", &usbhs_ick, CK_243X), |
210 | CLK("mmci-omap-hs.0", "ick", &mmchs1_ick, CK_243X), | 210 | CLK("mmci-omap-hs.0", "ick", &mmchs1_ick, CK_243X), |
211 | CLK("mmci-omap-hs.0", "fck", &mmchs1_fck, CK_243X), | 211 | CLK("mmci-omap-hs.0", "fck", &mmchs1_fck, CK_243X), |
212 | CLK("mmci-omap-hs.1", "ick", &mmchs2_ick, CK_243X), | 212 | CLK("mmci-omap-hs.1", "ick", &mmchs2_ick, CK_243X), |
@@ -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); |