Skip to content

OMAP2/3 clock: revise DPLL bypass handling in clock tree

Paul Walmsley linux-omap 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest7 patches 0 repliesNew
  2. v16 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7OMAP3 clock: convert dpll_data.idlest_bit to idlest_maskarch/arm/mach-omap2/clock34xx.c arch/arm/mach-omap2/clock34xx.h arch/arm/plat-omap/include/mach/clock.h+8 -100 replies
2/7OMAP3 clock: add idlest_reg, idlest_mask for DPLL3arch/arm/mach-omap2/clock34xx.h+2 -00 replies
3/7OMAP3 clock: note the bypass source clock for DPLLsarch/arm/mach-omap2/clock34xx.h arch/arm/plat-omap/include/mach/clock.h+10 -00 replies
4/7OMAP3 clock: move DPLL bypass rate calculation into omap2_get_dpll_rate()arch/arm/mach-omap2/clock.c arch/arm/mach-omap2/clock24xx.c arch/arm/mach-omap2/clock24xx.h +1 more+58 -1620 replies
5/7OMAP3 clock: omap3_clkoutx2_recalc() should test DPLL IDLEST to determine if DPLL is bypassedarch/arm/mach-omap2/clock34xx.c+3 -40 replies
6/7OMAP3 clock: DPLLs should enter bypass if new rate is sys_ckarch/arm/mach-omap2/clock34xx.c+29 -110 replies
7/7OMAP3 clock: recalculate DPLL subtree after bypass entry/exitarch/arm/mach-omap2/clock34xx.c+15 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/7] OMAP2/3 clock: revise DPLL bypass handling in clock tree

This second version fixes bypass handling for DPLL1 and DPLL2 to use the high-frequency bypass clocks. This came to light courtesy of Kevin Hilman <[email protected]>.

---

Previously, the OMAP3 clock tree handled DPLL bypass rate recalculation by dynamically switching clock parents depending on the DPLL bypass state. It used the clksel mechanism for this. Unfortunately, this does not actually work. The clock code expects the clock's parent to be the one set in the struct clk, causing kernel messages similar to:

clock: Could not find fieldval 0 for clock iva2_ck parent dpll2_m2_ck

This patch series moves DPLL bypass rate computation into omap2_get_dpll_rate(), and removes most of the bypass clocks in the clock tree. It also converts the bypass tests in the code to use the DPLL IDLEST bits rather than the DPLL CLKEN bits.

Problem reported by Ramesh Gupta Guntha <[email protected]>.

Bypass rate recalculation verified with DPLL1 on 3430SDP, which has bypass support built into its clock code. Boot-tested on 2430SDP.

- Paul

---

text data bss dec hex filename

3443780  158320  105504 3707604  3892d4 vmlinux.3430sdp.orig
3443344  158160  105504 3707008  389080 vmlinux.3430sdp
 arch/arm/mach-omap2/clock.c             |   45 ++++++-
 arch/arm/mach-omap2/clock24xx.c         |    4 -
 arch/arm/mach-omap2/clock24xx.h         |    2 
 arch/arm/mach-omap2/clock34xx.c         |   70 ++++++++----
 arch/arm/mach-omap2/clock34xx.h         |  188 +++++--------------------------
 arch/arm/plat-omap/include/mach/clock.h |    5 -
 6 files changed, 125 insertions(+), 189 deletions(-)