Skip to content

omap2 clock: framework generalization, cleanup

Paul Walmsley linux-omap 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest25 of 28 patches 15 repliesIn review

25 of 28 patches are in this archive. The cover letter announces 28.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/28omap2 clock: dsp_ick parent is dsp_fck, not core_ckarch/arm/mach-omap2/clock.h+1 -10 replies
2/28omap2 clock: generalize initial clock rate setup: recalculate_root_clocks()arch/arm/mach-omap2/clock.c arch/arm/mach-omap2/clock.h arch/arm/plat-omap/clock.c +1 more+23 -50 replies
3/28omap2 clock: mark onchip_clks as __initdataarch/arm/mach-omap2/clock.h+1 -10 replies
5/28omap2 clock: rename, add comment to omap2_mpu_recalc()arch/arm/mach-omap2/clock.c arch/arm/mach-omap2/clock.h+9 -40 replies
6/28omap2 clock: add clksel and clksel_rate dataarch/arm/mach-omap2/board-n800-audio.c arch/arm/mach-omap2/clock.h include/asm-arm/arch-omap/clock.h+557 -170 replies
7/28omap2 clock: init clksel clock parents to hardware reality at clock initarch/arm/mach-omap2/clock.c arch/arm/mach-omap2/clock.h+75 -52 replies
8/28omap2 clock: convert omap2_clksel_to_divisor and omap2_divisor_to_clksel to use new clksel structarch/arm/mach-omap2/clock.c arch/arm/mach-omap2/clock.h+102 -330 replies
9/28omap2 clock: convert omap2_clksel_round_rate to use new clksel structarch/arm/mach-omap2/clock.c+50 -480 replies
10/28omap2 clock: convert omap2_get_clksel to use new clksel structarch/arm/mach-omap2/clock.c+13 -790 replies
11/28omap2 clock: convert omap2_clksel_get_src_field() to use new clksel structarch/arm/mach-omap2/clock.c+25 -1810 replies
12/28omap2 clock: stop using clk->src_offset in omap2_clk_set_rate()arch/arm/mach-omap2/clock.c+3 -60 replies
13/28omap2 clock: stop using clk->src_offset in omap2_clk_set_parent()arch/arm/mach-omap2/clock.c+4 -10 replies
14/28omap2 clock: clean out old code from omap2_clksel_recalc()arch/arm/mach-omap2/clock.c+8 -160 replies
15/28omap2 clock: convert remaining clksel clocks to use omap2_clksel_recalcarch/arm/mach-omap2/clock.h+27 -290 replies
16/28omap2 clock: remove all {src, rate}_offset fields from struct clkarch/arm/mach-omap2/clock.c arch/arm/mach-omap2/clock.h include/asm-arm/arch-omap/clock.h+6 -410 replies
17/28omap2 clock: use the struct clk round_rate field for clksel rate rounding codearch/arm/mach-omap2/clock.c arch/arm/mach-omap2/clock.h+51 -120 replies
19/28omap2 clock: drop RATE_CKCTL from all OMAP2 clocksarch/arm/mach-omap2/clock.h+21 -240 replies
20/28omap2 clock: remove *_SEL* clock flagsarch/arm/mach-omap2/clock.c arch/arm/mach-omap2/clock.h include/asm-arm/arch-omap/clock.h+41 -850 replies
21/28omap2 clock: call clock-specific enable/disable functions if presentarch/arm/mach-omap2/clock.c+8 -00 replies
22/28omap2 clock: use custom osc_ck enable/disable routinesarch/arm/mach-omap2/clock.c arch/arm/mach-omap2/clock.h+19 -180 replies
23/28omap2 clock: use standard clk->enable/disable for APLLsarch/arm/mach-omap2/clock.c arch/arm/mach-omap2/clock.h+14 -120 replies
24/28omap2 clock: replace omap2_get_crystal_rate() with clock-specific recalc codearch/arm/mach-omap2/clock.c arch/arm/mach-omap2/clock.h+29 -250 replies
25/28omap2 clock: Standardize DPLL rate recalculation with struct dpll_dataarch/arm/mach-omap2/clock.c arch/arm/mach-omap2/clock.h include/asm-arm/arch-omap/clock.h+61 -190 replies
27/28omap2 clock: add three missing clocks: gpmc_fck, sdma_{i, f}ckarch/arm/mach-omap2/clock.h+24 -00 replies
28/28omap2 clock: handle (almost) all clock autoidling via the clock frameworkarch/arm/mach-omap2/clock.c arch/arm/mach-omap2/clock.h arch/arm/mach-omap2/cm_regbits_24xx.h +3 more+204 -5813 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 00/28] omap2 clock: framework generalization, cleanup

Hello,

This set of patches contains some significant changes to the OMAP2 clock framework. The main goal of these patches is to generalize the framework enough to be usable for the OMAP3430 clock tree, although in the process I think the OMAP2 clock code is improved quite a bit - I hope you'll agree.

The major change in this patch set is the rewrite of clksel clock handling, which:

* enables clksel parent clocks to be updated at clock framework init, from whatever the bootloader configured,

* properly encodes platform restrictions for particular rates,

* generalizes the clksel code to be useful for OMAP3430 clocks,

* facilitates future improved clock state reporting,

* and improves readability and maintainability.

The clksel patches are patches 6 through 20. A few other notable changes in this patchset:

* Cleanups/bug fixes: patches 1, 3, 4, 5

* Generalize root clock propagation at clock framework init: patch 2

* Use OMAP clock framework enable/disable fns for osc_ck, APLLs: patches 21, 22, 23

* Recalculate osc_ck and sys_ck via recalculate fns, rather than omap2_get_crystal_rate(): patch 24

* Generalize DPLL multiplier, divider handling: patches 25

* Generalize clocks enabled at init via ENABLE_ON_INIT clock flag: patch 26

* Generalize clock autoidle configuration: patches 27, 28

The patches were boot-tested on N800. Comments and testing are appreciated. In particular, any testing on 2430SDP are particularly welcome, since I don't have one here.

Patches apply cleanly against current git head, and seem to run fine, but I've been doing most of my testing against 2.6.22-omap1, since my N800 touchscreen does not work consistently with git head.

These changes increase uncompressed kernel memory footprint by about 6kB:
text data bss dec hex filename

2877920  147788   85992 3111700  2f7b14 vmlinux.orig
2881092  150908   85992 3117992  2f93a8 vmlinux

diffstat:

 arch/arm/mach-omap2/clock.c                       |  978 +++++++++----------
 arch/arm/mach-omap2/clock.h                       | 1092 +++++++++++++++++-----
 arch/arm/plat-omap/clock.c                        |   20
 include/asm-arm/arch-omap/clock.h                 |   57 -
 linux-omap/arch/arm/mach-omap2/board-n800-audio.c |   13
 linux-omap/arch/arm/mach-omap2/clock.c            |    6
 linux-omap/arch/arm/mach-omap2/clock.h            |    2
 linux-omap/arch/arm/mach-omap2/cm_regbits_24xx.h  |   50 +
 linux-omap/arch/arm/mach-omap2/pm.c               |   63 -
 linux-omap/arch/arm/plat-omap/clock.c             |   17
 linux-omap/include/asm-arm/arch-omap/clock.h      |    1
 11 files changed, 1492 insertions(+), 807 deletions(-)

My apologies in advance for the double 'Index:' lines in some of the patches - must be some quilt bug - it seems harmless and I have not yet had the chance to track it down.

- Paul