diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-01-31 05:05:51 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-02-08 12:50:42 -0500 |
commit | 3f0a820c4c0b4670fb5f164baa5582e23c2ef118 (patch) | |
tree | 6af02e1456c0316791ab95e7da9c09496f29c232 /arch/arm/plat-omap/include/mach/clock.h | |
parent | b5088c0d90b898802318c62caf2320a53df6ce57 (diff) |
[ARM] omap: create a proper tree of clocks
Traditionally, we've tracked the parent/child relationships between
clk structures by setting the child's parent member to point at the
upstream clock. As a result, when decending the tree, we have had
to scan all clocks to find the children.
Avoid this wasteful scanning by keeping a list of the clock's children.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/plat-omap/include/mach/clock.h')
-rw-r--r-- | arch/arm/plat-omap/include/mach/clock.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/plat-omap/include/mach/clock.h b/arch/arm/plat-omap/include/mach/clock.h index 8705902de1d..af6ae4fa46d 100644 --- a/arch/arm/plat-omap/include/mach/clock.h +++ b/arch/arm/plat-omap/include/mach/clock.h | |||
@@ -70,6 +70,8 @@ struct clk { | |||
70 | const char *name; | 70 | const char *name; |
71 | int id; | 71 | int id; |
72 | struct clk *parent; | 72 | struct clk *parent; |
73 | struct list_head children; | ||
74 | struct list_head sibling; /* node for children */ | ||
73 | unsigned long rate; | 75 | unsigned long rate; |
74 | __u32 flags; | 76 | __u32 flags; |
75 | void __iomem *enable_reg; | 77 | void __iomem *enable_reg; |
@@ -115,7 +117,9 @@ struct clk_functions { | |||
115 | extern unsigned int mpurate; | 117 | extern unsigned int mpurate; |
116 | 118 | ||
117 | extern int clk_init(struct clk_functions *custom_clocks); | 119 | extern int clk_init(struct clk_functions *custom_clocks); |
120 | extern void clk_init_one(struct clk *clk); | ||
118 | extern int clk_register(struct clk *clk); | 121 | extern int clk_register(struct clk *clk); |
122 | extern void clk_reparent(struct clk *child, struct clk *parent); | ||
119 | extern void clk_unregister(struct clk *clk); | 123 | extern void clk_unregister(struct clk *clk); |
120 | extern void propagate_rate(struct clk *clk); | 124 | extern void propagate_rate(struct clk *clk); |
121 | extern void recalculate_root_clocks(void); | 125 | extern void recalculate_root_clocks(void); |
@@ -131,8 +135,7 @@ extern const struct clkops clkops_null; | |||
131 | /* Clock flags */ | 135 | /* Clock flags */ |
132 | /* bit 0 is free */ | 136 | /* bit 0 is free */ |
133 | #define RATE_FIXED (1 << 1) /* Fixed clock rate */ | 137 | #define RATE_FIXED (1 << 1) /* Fixed clock rate */ |
134 | #define RATE_PROPAGATES (1 << 2) /* Program children too */ | 138 | /* bits 2-4 are free */ |
135 | /* bits 3-4 are free */ | ||
136 | #define ENABLE_REG_32BIT (1 << 5) /* Use 32-bit access */ | 139 | #define ENABLE_REG_32BIT (1 << 5) /* Use 32-bit access */ |
137 | #define CLOCK_IDLE_CONTROL (1 << 7) | 140 | #define CLOCK_IDLE_CONTROL (1 << 7) |
138 | #define CLOCK_NO_IDLE_PARENT (1 << 8) | 141 | #define CLOCK_NO_IDLE_PARENT (1 << 8) |