~ubuntu-branches/ubuntu/precise/linux-linaro-u8500/precise

« back to all changes in this revision

Viewing changes to arch/arm/mach-omap2/clockdomain.h

  • Committer: Bazaar Package Importer
  • Author(s): John Rigby, Upstream Fixes, Andy Green, John Rigby
  • Date: 2011-04-14 12:16:06 UTC
  • Revision ID: james.westby@ubuntu.com-20110414121606-b77podkyqgr2oix7
Tags: 2.6.38-1002.3
[ Upstream Fixes ]

* MUSB: shutdown: Make sure block is awake before doing shutdown
  - LP: #745737
* Fixed gpio polarity of gpio USB-phy reset.
  - LP: #747639

[ Andy Green ]

* LINARO: SAUCE: disable CONFIG_OMAP_RESET_CLOCKS
  - LP: #752900

[ John Rigby ]

* Rebase to new upstreams:
  Linux v2.6.38.1
  linaro-linux-2.6.38-upstream-29Mar2011
  Ubuntu-2.6.38-7.35
* SAUCE: OMAP4: clock: wait for module to become accessible on
  a clk enable
  - LP: #745737
* Rebase to new upstreams:
  Linux v2.6.38.2
  linaro-linux-2.6.38-upstream-5Apr2011
  Ubuntu-2.6.38-8.41
  - LP: #732842
* Update configs for device tree, dvfs and lttng
* LINARO: add building of dtb's
* LINARO: SAUCE: Disable lowest operating freqs on omap34xx
  - LP: #732912

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 * OMAP2/3 clockdomain framework functions
5
5
 *
6
6
 * Copyright (C) 2008 Texas Instruments, Inc.
7
 
 * Copyright (C) 2008-2010 Nokia Corporation
 
7
 * Copyright (C) 2008-2011 Nokia Corporation
8
8
 *
9
9
 * Paul Walmsley
10
10
 *
22
22
#include <plat/clock.h>
23
23
#include <plat/cpu.h>
24
24
 
25
 
/* Clockdomain capability flags */
 
25
/*
 
26
 * Clockdomain flags
 
27
 *
 
28
 * XXX Document CLKDM_CAN_* flags
 
29
 *
 
30
 * CLKDM_NO_AUTODEPS: Prevent "autodeps" from being added/removed from this
 
31
 *     clockdomain.  (Currently, this applies to OMAP3 clockdomains only.)
 
32
 */
26
33
#define CLKDM_CAN_FORCE_SLEEP                   (1 << 0)
27
34
#define CLKDM_CAN_FORCE_WAKEUP                  (1 << 1)
28
35
#define CLKDM_CAN_ENABLE_AUTO                   (1 << 2)
29
36
#define CLKDM_CAN_DISABLE_AUTO                  (1 << 3)
 
37
#define CLKDM_NO_AUTODEPS                       (1 << 4)
30
38
 
31
39
#define CLKDM_CAN_HWSUP         (CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_DISABLE_AUTO)
32
40
#define CLKDM_CAN_SWSUP         (CLKDM_CAN_FORCE_SLEEP | CLKDM_CAN_FORCE_WAKEUP)
116
124
        struct list_head node;
117
125
};
118
126
 
119
 
void clkdm_init(struct clockdomain **clkdms, struct clkdm_autodep *autodeps);
 
127
/**
 
128
 * struct clkdm_ops - Arch specfic function implementations
 
129
 * @clkdm_add_wkdep: Add a wakeup dependency between clk domains
 
130
 * @clkdm_del_wkdep: Delete a wakeup dependency between clk domains
 
131
 * @clkdm_read_wkdep: Read wakeup dependency state between clk domains
 
132
 * @clkdm_clear_all_wkdeps: Remove all wakeup dependencies from the clk domain
 
133
 * @clkdm_add_sleepdep: Add a sleep dependency between clk domains
 
134
 * @clkdm_del_sleepdep: Delete a sleep dependency between clk domains
 
135
 * @clkdm_read_sleepdep: Read sleep dependency state between clk domains
 
136
 * @clkdm_clear_all_sleepdeps: Remove all sleep dependencies from the clk domain
 
137
 * @clkdm_sleep: Force a clockdomain to sleep
 
138
 * @clkdm_wakeup: Force a clockdomain to wakeup
 
139
 * @clkdm_allow_idle: Enable hw supervised idle transitions for clock domain
 
140
 * @clkdm_deny_idle: Disable hw supervised idle transitions for clock domain
 
141
 * @clkdm_clk_enable: Put the clkdm in right state for a clock enable
 
142
 * @clkdm_clk_disable: Put the clkdm in right state for a clock disable
 
143
 */
 
144
struct clkdm_ops {
 
145
        int     (*clkdm_add_wkdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2);
 
146
        int     (*clkdm_del_wkdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2);
 
147
        int     (*clkdm_read_wkdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2);
 
148
        int     (*clkdm_clear_all_wkdeps)(struct clockdomain *clkdm);
 
149
        int     (*clkdm_add_sleepdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2);
 
150
        int     (*clkdm_del_sleepdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2);
 
151
        int     (*clkdm_read_sleepdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2);
 
152
        int     (*clkdm_clear_all_sleepdeps)(struct clockdomain *clkdm);
 
153
        int     (*clkdm_sleep)(struct clockdomain *clkdm);
 
154
        int     (*clkdm_wakeup)(struct clockdomain *clkdm);
 
155
        void    (*clkdm_allow_idle)(struct clockdomain *clkdm);
 
156
        void    (*clkdm_deny_idle)(struct clockdomain *clkdm);
 
157
        int     (*clkdm_clk_enable)(struct clockdomain *clkdm);
 
158
        int     (*clkdm_clk_disable)(struct clockdomain *clkdm);
 
159
};
 
160
 
 
161
void clkdm_init(struct clockdomain **clkdms, struct clkdm_autodep *autodeps,
 
162
                        struct clkdm_ops *custom_funcs);
120
163
struct clockdomain *clkdm_lookup(const char *name);
121
164
 
122
165
int clkdm_for_each(int (*fn)(struct clockdomain *clkdm, void *user),
132
175
int clkdm_read_sleepdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2);
133
176
int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm);
134
177
 
135
 
void omap2_clkdm_allow_idle(struct clockdomain *clkdm);
136
 
void omap2_clkdm_deny_idle(struct clockdomain *clkdm);
137
 
 
138
 
int omap2_clkdm_wakeup(struct clockdomain *clkdm);
139
 
int omap2_clkdm_sleep(struct clockdomain *clkdm);
140
 
 
141
 
int omap2_clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk);
142
 
int omap2_clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk);
143
 
 
144
 
extern void __init omap2_clockdomains_init(void);
 
178
void clkdm_allow_idle(struct clockdomain *clkdm);
 
179
void clkdm_deny_idle(struct clockdomain *clkdm);
 
180
 
 
181
int clkdm_wakeup(struct clockdomain *clkdm);
 
182
int clkdm_sleep(struct clockdomain *clkdm);
 
183
 
 
184
int clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk);
 
185
int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk);
 
186
 
 
187
extern void __init omap2xxx_clockdomains_init(void);
 
188
extern void __init omap3xxx_clockdomains_init(void);
145
189
extern void __init omap44xx_clockdomains_init(void);
 
190
extern void _clkdm_add_autodeps(struct clockdomain *clkdm);
 
191
extern void _clkdm_del_autodeps(struct clockdomain *clkdm);
 
192
 
 
193
extern struct clkdm_ops omap2_clkdm_operations;
 
194
extern struct clkdm_ops omap3_clkdm_operations;
 
195
extern struct clkdm_ops omap4_clkdm_operations;
146
196
 
147
197
#endif