]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
OMAP clock: track child clocks
authorPaul Walmsley <paul@pwsan.com>
Wed, 7 Jan 2009 15:20:24 +0000 (17:20 +0200)
committerTony Lindgren <tony@atomide.com>
Wed, 7 Jan 2009 15:20:24 +0000 (17:20 +0200)
commitc4cd1332c2a78112624f4a418116e95fa6e9e57c
treedb73071a92a11a1fd2863cb0e73396a1d897c71e
parent33d000c99ee393fe2042f93e8422f94976d276ce
OMAP clock: track child clocks

Track child clocks for each struct clk.  This optimizes traversals of the
clock tree from parent to child, which happens during rate propagation, and
in the future, clock notifiers.

Previously, parent-to-child traversals sequentially scanned the entire
clock list at each step to determine the children of a particular
clock node.  Now each struct clk maintains a clock list of its
children.  For a DPLL3_M2_CK rate change, this converts what were
about O(6*180*2) operations into O(6*6*2) operations.  The savings
will be even more significant after the future notifier patches:
something like O(6*180*6) to O(6*6*6).

The price paid is additional runtime memory consumption - 8 bytes per
clock and 16 bytes per child clock - roughly 4.5KiB on OMAP3.  The
memory comes mostly from bootmem, since initial clock registration
takes place before slab is ready.  Several other operations will take
slightly more time due the extra bookkeeping: clk_register(),
clk_unregister(), clk_set_parent(), and omap2_init_clksel_parent().

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/clock.c
arch/arm/plat-omap/clock.c
arch/arm/plat-omap/include/mach/clock.h