diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-07-28 17:32:00 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-07-28 17:32:00 -0400 |
| commit | 9e3ee1c39c0cc71222f9980ccbf87fe072897eef (patch) | |
| tree | 99462000e6f0d4f907cb2fc690f19d4d441ba0f3 /include/asm-sh/clock.h | |
| parent | e56b3bc7942982ac2589c942fb345e38bc7a341a (diff) | |
| parent | f934fb19ef34730263e6afc01e8ec27a8a71470f (diff) | |
Merge branch 'linus' into cpus4096
Conflicts:
kernel/stop_machine.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-sh/clock.h')
| -rw-r--r-- | include/asm-sh/clock.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/include/asm-sh/clock.h b/include/asm-sh/clock.h index b550a27a7042..720dfab7b15e 100644 --- a/include/asm-sh/clock.h +++ b/include/asm-sh/clock.h | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #include <linux/list.h> | 5 | #include <linux/list.h> |
| 6 | #include <linux/seq_file.h> | 6 | #include <linux/seq_file.h> |
| 7 | #include <linux/clk.h> | 7 | #include <linux/clk.h> |
| 8 | #include <linux/err.h> | ||
| 8 | 9 | ||
| 9 | struct clk; | 10 | struct clk; |
| 10 | 11 | ||
| @@ -30,6 +31,7 @@ struct clk { | |||
| 30 | 31 | ||
| 31 | unsigned long rate; | 32 | unsigned long rate; |
| 32 | unsigned long flags; | 33 | unsigned long flags; |
| 34 | unsigned long arch_flags; | ||
| 33 | }; | 35 | }; |
| 34 | 36 | ||
| 35 | #define CLK_ALWAYS_ENABLED (1 << 0) | 37 | #define CLK_ALWAYS_ENABLED (1 << 0) |
| @@ -41,14 +43,27 @@ void arch_init_clk_ops(struct clk_ops **, int type); | |||
| 41 | /* arch/sh/kernel/cpu/clock.c */ | 43 | /* arch/sh/kernel/cpu/clock.c */ |
| 42 | int clk_init(void); | 44 | int clk_init(void); |
| 43 | 45 | ||
| 44 | int __clk_enable(struct clk *); | ||
| 45 | void __clk_disable(struct clk *); | ||
| 46 | |||
| 47 | void clk_recalc_rate(struct clk *); | 46 | void clk_recalc_rate(struct clk *); |
| 48 | 47 | ||
| 49 | int clk_register(struct clk *); | 48 | int clk_register(struct clk *); |
| 50 | void clk_unregister(struct clk *); | 49 | void clk_unregister(struct clk *); |
| 51 | 50 | ||
| 51 | static inline int clk_always_enable(const char *id) | ||
| 52 | { | ||
| 53 | struct clk *clk; | ||
| 54 | int ret; | ||
| 55 | |||
| 56 | clk = clk_get(NULL, id); | ||
| 57 | if (IS_ERR(clk)) | ||
| 58 | return PTR_ERR(clk); | ||
| 59 | |||
| 60 | ret = clk_enable(clk); | ||
| 61 | if (ret) | ||
| 62 | clk_put(clk); | ||
| 63 | |||
| 64 | return ret; | ||
| 65 | } | ||
| 66 | |||
| 52 | /* the exported API, in addition to clk_set_rate */ | 67 | /* the exported API, in addition to clk_set_rate */ |
| 53 | /** | 68 | /** |
| 54 | * clk_set_rate_ex - set the clock rate for a clock source, with additional parameter | 69 | * clk_set_rate_ex - set the clock rate for a clock source, with additional parameter |
