[ARM] omap: add support for bypassing DPLLs
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Thu, 19 Feb 2009 13:29:22 +0000 (13:29 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 19 Feb 2009 17:28:30 +0000 (17:28 +0000)
commitc0bf31320dea2cbcbab1f53ee15a8520f762409b
tree1b4fbb4396da448eb116f2bee8b58030b63cfe3b
parent8b9dbc16d4f5786c6c930ab028722e3ed7e4285b
[ARM] omap: add support for bypassing DPLLs

This roughly corresponds with OMAP commits: 7d06c483241b19,
88b5d9b18a55009c909ac5c6497b8b1f0bd2ac1da8.

For both OMAP2 and OMAP3, we note the reference and bypass clocks in
the DPLL data structure.  Whenever we modify the DPLL rate, we first
ensure that both the reference and bypass clocks are enabled.  Then,
we decide whether to use the reference and DPLL, or the bypass clock
if the desired rate is identical to the bypass rate, and program the
DPLL appropriately.  Finally, we update the clock's parent, and then
disable the unused clocks.

This keeps the parents correctly balanced, and more importantly ensures
that the bypass clock is running whenever we reprogram the DPLL.  This
is especially important because the procedure for reprogramming the DPLL
involves switching to the bypass clock.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-omap2/clock.c
arch/arm/mach-omap2/clock.h
arch/arm/mach-omap2/clock24xx.c
arch/arm/mach-omap2/clock24xx.h
arch/arm/mach-omap2/clock34xx.c
arch/arm/mach-omap2/clock34xx.h
arch/arm/mach-omap2/sdrc2xxx.c
arch/arm/plat-omap/include/mach/clock.h