diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-08 19:01:01 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-08 19:01:01 (GMT) |
commit | d8e7b2b3ac5319fcee616488c628c2bbe7e2937b (patch) | |
tree | a04c26abab31d85e0a3a45a808a539fbb5a9b85c /arch/arm/mach-omap2/clock34xx.c | |
parent | 1bfd16a6571db105d7d57acf768c1df297781f07 (diff) | |
parent | ab8d64d7d4ea49cf664ca5562263a8ba78f4541e (diff) | |
download | linux-fsl-qoriq-d8e7b2b3ac5319fcee616488c628c2bbe7e2937b.tar.xz |
Merge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
omapfb: Blizzard: constify register address tables
omapfb: Blizzard: fix pointer to be const
omapfb: Condition mutex acquisition
omap: iovmm: Add missing mutex_unlock
omap: iovmm: Fix incorrect spelling
omap: SRAM: flush the right address after memcpy in omap_sram_push
omap: Lock DPLL5 at boot
omap: Fix incorrect 730 vs 850 detection
OMAP3: PM: introduce a new powerdomain walk helper
OMAP3: PM: Enable GPIO module-level wakeups
OMAP3: PM: USBHOST: clear wakeup events on both hosts
OMAP3: PM: PRCM interrupt: only handle selected PRCM interrupts
OMAP3: PM: PRCM interrupt: check MPUGRPSEL register
OMAP3: PM: Prevent hang in prcm_interrupt_handler
Diffstat (limited to 'arch/arm/mach-omap2/clock34xx.c')
-rw-r--r-- | arch/arm/mach-omap2/clock34xx.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c index fafcd32..489556e 100644 --- a/arch/arm/mach-omap2/clock34xx.c +++ b/arch/arm/mach-omap2/clock34xx.c @@ -338,6 +338,13 @@ static struct omap_clk omap34xx_clks[] = { */ #define SDRC_MPURATE_LOOPS 96 +/* + * DPLL5_FREQ_FOR_USBHOST: USBHOST and USBTLL are the only clocks + * that are sourced by DPLL5, and both of these require this clock + * to be at 120 MHz for proper operation. + */ +#define DPLL5_FREQ_FOR_USBHOST 120000000 + /** * omap3430es2_clk_ssi_find_idlest - return CM_IDLEST info for SSI * @clk: struct clk * being enabled @@ -1056,6 +1063,28 @@ void omap2_clk_prepare_for_reboot(void) #endif } +static void omap3_clk_lock_dpll5(void) +{ + struct clk *dpll5_clk; + struct clk *dpll5_m2_clk; + + dpll5_clk = clk_get(NULL, "dpll5_ck"); + clk_set_rate(dpll5_clk, DPLL5_FREQ_FOR_USBHOST); + clk_enable(dpll5_clk); + + /* Enable autoidle to allow it to enter low power bypass */ + omap3_dpll_allow_idle(dpll5_clk); + + /* Program dpll5_m2_clk divider for no division */ + dpll5_m2_clk = clk_get(NULL, "dpll5_m2_ck"); + clk_enable(dpll5_m2_clk); + clk_set_rate(dpll5_m2_clk, DPLL5_FREQ_FOR_USBHOST); + + clk_disable(dpll5_m2_clk); + clk_disable(dpll5_clk); + return; +} + /* REVISIT: Move this init stuff out into clock.c */ /* @@ -1148,6 +1177,12 @@ int __init omap2_clk_init(void) */ clk_enable_init_clocks(); + /* + * Lock DPLL5 and put it in autoidle. + */ + if (omap_rev() >= OMAP3430_REV_ES2_0) + omap3_clk_lock_dpll5(); + /* Avoid sleeping during omap2_clk_prepare_for_reboot() */ /* REVISIT: not yet ready for 343x */ #if 0 |