diff options
author | Paul Walmsley <paul@pwsan.com> | 2011-09-14 18:01:21 -0400 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2011-09-14 18:01:21 -0400 |
commit | a5ffef6af127721a813d70f87cd8cc348ea9d6ab (patch) | |
tree | c68df36339ab9a6842a35813d5ec3d05683b516c /arch/arm/mach-omap2/clockdomain.h | |
parent | 08cb9703e2922db297d8f83ec110bde37823e021 (diff) |
OMAP: clockdomain code/data: remove omap_chip bitmask from struct clockdomain
At Tony's request, remove the omap_chip bitmasks from the clockdomain
and clockdomain dependency definitions. Instead, initialize
clockdomains based on one or more lists that are applicable to a
particular SoC family, variant, and silicon revision.
Tony Lindgren <tony@atomide.com> found a bug in a previous version of this
patch - thanks Tony.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/clockdomain.h')
-rw-r--r-- | arch/arm/mach-omap2/clockdomain.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h index 0d879ff490d1..f7b58609bad8 100644 --- a/arch/arm/mach-omap2/clockdomain.h +++ b/arch/arm/mach-omap2/clockdomain.h | |||
@@ -45,7 +45,6 @@ | |||
45 | /** | 45 | /** |
46 | * struct clkdm_autodep - clkdm deps to add when entering/exiting hwsup mode | 46 | * struct clkdm_autodep - clkdm deps to add when entering/exiting hwsup mode |
47 | * @clkdm: clockdomain to add wkdep+sleepdep on - set name member only | 47 | * @clkdm: clockdomain to add wkdep+sleepdep on - set name member only |
48 | * @omap_chip: OMAP chip types that this autodep is valid on | ||
49 | * | 48 | * |
50 | * A clockdomain that should have wkdeps and sleepdeps added when a | 49 | * A clockdomain that should have wkdeps and sleepdeps added when a |
51 | * clockdomain should stay active in hwsup mode; and conversely, | 50 | * clockdomain should stay active in hwsup mode; and conversely, |
@@ -60,14 +59,12 @@ struct clkdm_autodep { | |||
60 | const char *name; | 59 | const char *name; |
61 | struct clockdomain *ptr; | 60 | struct clockdomain *ptr; |
62 | } clkdm; | 61 | } clkdm; |
63 | const struct omap_chip_id omap_chip; | ||
64 | }; | 62 | }; |
65 | 63 | ||
66 | /** | 64 | /** |
67 | * struct clkdm_dep - encode dependencies between clockdomains | 65 | * struct clkdm_dep - encode dependencies between clockdomains |
68 | * @clkdm_name: clockdomain name | 66 | * @clkdm_name: clockdomain name |
69 | * @clkdm: pointer to the struct clockdomain of @clkdm_name | 67 | * @clkdm: pointer to the struct clockdomain of @clkdm_name |
70 | * @omap_chip: OMAP chip types that this dependency is valid on | ||
71 | * @wkdep_usecount: Number of wakeup dependencies causing this clkdm to wake | 68 | * @wkdep_usecount: Number of wakeup dependencies causing this clkdm to wake |
72 | * @sleepdep_usecount: Number of sleep deps that could prevent clkdm from idle | 69 | * @sleepdep_usecount: Number of sleep deps that could prevent clkdm from idle |
73 | * | 70 | * |
@@ -81,7 +78,6 @@ struct clkdm_dep { | |||
81 | struct clockdomain *clkdm; | 78 | struct clockdomain *clkdm; |
82 | atomic_t wkdep_usecount; | 79 | atomic_t wkdep_usecount; |
83 | atomic_t sleepdep_usecount; | 80 | atomic_t sleepdep_usecount; |
84 | const struct omap_chip_id omap_chip; | ||
85 | }; | 81 | }; |
86 | 82 | ||
87 | /* Possible flags for struct clockdomain._flags */ | 83 | /* Possible flags for struct clockdomain._flags */ |
@@ -101,7 +97,6 @@ struct clkdm_dep { | |||
101 | * @clkdm_offs: (OMAP4 only) CM clockdomain register offset | 97 | * @clkdm_offs: (OMAP4 only) CM clockdomain register offset |
102 | * @wkdep_srcs: Clockdomains that can be told to wake this powerdomain up | 98 | * @wkdep_srcs: Clockdomains that can be told to wake this powerdomain up |
103 | * @sleepdep_srcs: Clockdomains that can be told to keep this clkdm from inact | 99 | * @sleepdep_srcs: Clockdomains that can be told to keep this clkdm from inact |
104 | * @omap_chip: OMAP chip types that this clockdomain is valid on | ||
105 | * @usecount: Usecount tracking | 100 | * @usecount: Usecount tracking |
106 | * @node: list_head to link all clockdomains together | 101 | * @node: list_head to link all clockdomains together |
107 | * | 102 | * |
@@ -126,7 +121,6 @@ struct clockdomain { | |||
126 | const u16 clkdm_offs; | 121 | const u16 clkdm_offs; |
127 | struct clkdm_dep *wkdep_srcs; | 122 | struct clkdm_dep *wkdep_srcs; |
128 | struct clkdm_dep *sleepdep_srcs; | 123 | struct clkdm_dep *sleepdep_srcs; |
129 | const struct omap_chip_id omap_chip; | ||
130 | atomic_t usecount; | 124 | atomic_t usecount; |
131 | struct list_head node; | 125 | struct list_head node; |
132 | spinlock_t lock; | 126 | spinlock_t lock; |
@@ -198,7 +192,8 @@ int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk); | |||
198 | int clkdm_hwmod_enable(struct clockdomain *clkdm, struct omap_hwmod *oh); | 192 | int clkdm_hwmod_enable(struct clockdomain *clkdm, struct omap_hwmod *oh); |
199 | int clkdm_hwmod_disable(struct clockdomain *clkdm, struct omap_hwmod *oh); | 193 | int clkdm_hwmod_disable(struct clockdomain *clkdm, struct omap_hwmod *oh); |
200 | 194 | ||
201 | extern void __init omap2xxx_clockdomains_init(void); | 195 | extern void __init omap242x_clockdomains_init(void); |
196 | extern void __init omap243x_clockdomains_init(void); | ||
202 | extern void __init omap3xxx_clockdomains_init(void); | 197 | extern void __init omap3xxx_clockdomains_init(void); |
203 | extern void __init omap44xx_clockdomains_init(void); | 198 | extern void __init omap44xx_clockdomains_init(void); |
204 | extern void _clkdm_add_autodeps(struct clockdomain *clkdm); | 199 | extern void _clkdm_add_autodeps(struct clockdomain *clkdm); |
@@ -208,4 +203,10 @@ extern struct clkdm_ops omap2_clkdm_operations; | |||
208 | extern struct clkdm_ops omap3_clkdm_operations; | 203 | extern struct clkdm_ops omap3_clkdm_operations; |
209 | extern struct clkdm_ops omap4_clkdm_operations; | 204 | extern struct clkdm_ops omap4_clkdm_operations; |
210 | 205 | ||
206 | extern struct clkdm_dep gfx_24xx_wkdeps[]; | ||
207 | extern struct clkdm_dep dsp_24xx_wkdeps[]; | ||
208 | extern struct clockdomain wkup_common_clkdm; | ||
209 | extern struct clockdomain prm_common_clkdm; | ||
210 | extern struct clockdomain cm_common_clkdm; | ||
211 | |||
211 | #endif | 212 | #endif |