aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/clockdomain.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2011-10-30 19:22:54 -0400
committerArnd Bergmann <arnd@arndb.de>2011-10-30 19:22:54 -0400
commitc6c3a3a03e6de52866bc81a32fc551733625d553 (patch)
treeb55967a9163dba315e2543d648de758b82c85fa1 /arch/arm/mach-omap2/clockdomain.h
parent07e87e15b969a05a7943d7ff1abc2d8da287171c (diff)
parent8aca3ab5865f8cfbde841b6daf9442cc2279ced3 (diff)
Merge branch 'omap/cleanup' into next/cleanup2
Diffstat (limited to 'arch/arm/mach-omap2/clockdomain.h')
-rw-r--r--arch/arm/mach-omap2/clockdomain.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h
index 1e50c88b8a07..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;
@@ -166,8 +160,11 @@ struct clkdm_ops {
166 int (*clkdm_clk_disable)(struct clockdomain *clkdm); 160 int (*clkdm_clk_disable)(struct clockdomain *clkdm);
167}; 161};
168 162
169void clkdm_init(struct clockdomain **clkdms, struct clkdm_autodep *autodeps, 163int clkdm_register_platform_funcs(struct clkdm_ops *co);
170 struct clkdm_ops *custom_funcs); 164int clkdm_register_autodeps(struct clkdm_autodep *ia);
165int clkdm_register_clkdms(struct clockdomain **c);
166int clkdm_complete_init(void);
167
171struct clockdomain *clkdm_lookup(const char *name); 168struct clockdomain *clkdm_lookup(const char *name);
172 169
173int clkdm_for_each(int (*fn)(struct clockdomain *clkdm, void *user), 170int clkdm_for_each(int (*fn)(struct clockdomain *clkdm, void *user),
@@ -195,7 +192,8 @@ int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk);
195int clkdm_hwmod_enable(struct clockdomain *clkdm, struct omap_hwmod *oh); 192int clkdm_hwmod_enable(struct clockdomain *clkdm, struct omap_hwmod *oh);
196int clkdm_hwmod_disable(struct clockdomain *clkdm, struct omap_hwmod *oh); 193int clkdm_hwmod_disable(struct clockdomain *clkdm, struct omap_hwmod *oh);
197 194
198extern void __init omap2xxx_clockdomains_init(void); 195extern void __init omap242x_clockdomains_init(void);
196extern void __init omap243x_clockdomains_init(void);
199extern void __init omap3xxx_clockdomains_init(void); 197extern void __init omap3xxx_clockdomains_init(void);
200extern void __init omap44xx_clockdomains_init(void); 198extern void __init omap44xx_clockdomains_init(void);
201extern void _clkdm_add_autodeps(struct clockdomain *clkdm); 199extern void _clkdm_add_autodeps(struct clockdomain *clkdm);
@@ -205,4 +203,10 @@ extern struct clkdm_ops omap2_clkdm_operations;
205extern struct clkdm_ops omap3_clkdm_operations; 203extern struct clkdm_ops omap3_clkdm_operations;
206extern struct clkdm_ops omap4_clkdm_operations; 204extern struct clkdm_ops omap4_clkdm_operations;
207 205
206extern struct clkdm_dep gfx_24xx_wkdeps[];
207extern struct clkdm_dep dsp_24xx_wkdeps[];
208extern struct clockdomain wkup_common_clkdm;
209extern struct clockdomain prm_common_clkdm;
210extern struct clockdomain cm_common_clkdm;
211
208#endif 212#endif