diff options
author | dmitry pervushin <dimka@nomadgs.com> | 2007-04-24 00:39:09 -0400 |
---|---|---|
committer | Paul Mundt <lethal@hera.kernel.org> | 2007-05-06 22:11:56 -0400 |
commit | 1929cb340b74904c130fdf3de3fe5bbedb68a5aa (patch) | |
tree | 2675de406fca78e6bfd5b29535bbb220a167bc2e /include | |
parent | 34a780a0afeb8f99c9ca9934f4cc0822541769c6 (diff) |
sh: SH7722 clock framework support.
This adds support for the SH7722 (MobileR) to the clock framework.
Signed-off-by: dmitry pervushin <dimka@nomadgs.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-sh/clock.h | 32 | ||||
-rw-r--r-- | include/asm-sh/cpu-sh4/freq.h | 4 |
2 files changed, 35 insertions, 1 deletions
diff --git a/include/asm-sh/clock.h b/include/asm-sh/clock.h index 1df92807f8c5..a5d629f090d4 100644 --- a/include/asm-sh/clock.h +++ b/include/asm-sh/clock.h | |||
@@ -13,7 +13,7 @@ struct clk_ops { | |||
13 | void (*enable)(struct clk *clk); | 13 | void (*enable)(struct clk *clk); |
14 | void (*disable)(struct clk *clk); | 14 | void (*disable)(struct clk *clk); |
15 | void (*recalc)(struct clk *clk); | 15 | void (*recalc)(struct clk *clk); |
16 | int (*set_rate)(struct clk *clk, unsigned long rate); | 16 | int (*set_rate)(struct clk *clk, unsigned long rate, int algo_id); |
17 | }; | 17 | }; |
18 | 18 | ||
19 | struct clk { | 19 | struct clk { |
@@ -50,4 +50,34 @@ void clk_unregister(struct clk *); | |||
50 | 50 | ||
51 | int show_clocks(struct seq_file *m); | 51 | int show_clocks(struct seq_file *m); |
52 | 52 | ||
53 | /* the exported API, in addition to clk_set_rate */ | ||
54 | /** | ||
55 | * clk_set_rate_ex - set the clock rate for a clock source, with additional parameter | ||
56 | * @clk: clock source | ||
57 | * @rate: desired clock rate in Hz | ||
58 | * @algo_id: algorithm id to be passed down to ops->set_rate | ||
59 | * | ||
60 | * Returns success (0) or negative errno. | ||
61 | */ | ||
62 | int clk_set_rate_ex(struct clk *clk, unsigned long rate, int algo_id); | ||
63 | |||
64 | enum clk_sh_algo_id { | ||
65 | NO_CHANGE = 0, | ||
66 | |||
67 | IUS_N1_N1, | ||
68 | IUS_322, | ||
69 | IUS_522, | ||
70 | IUS_N11, | ||
71 | |||
72 | SB_N1, | ||
73 | |||
74 | SB3_N1, | ||
75 | SB3_32, | ||
76 | SB3_43, | ||
77 | SB3_54, | ||
78 | |||
79 | BP_N1, | ||
80 | |||
81 | IP_N1, | ||
82 | }; | ||
53 | #endif /* __ASM_SH_CLOCK_H */ | 83 | #endif /* __ASM_SH_CLOCK_H */ |
diff --git a/include/asm-sh/cpu-sh4/freq.h b/include/asm-sh/cpu-sh4/freq.h index 99402547ed06..86564e7a26ae 100644 --- a/include/asm-sh/cpu-sh4/freq.h +++ b/include/asm-sh/cpu-sh4/freq.h | |||
@@ -12,6 +12,10 @@ | |||
12 | 12 | ||
13 | #if defined(CONFIG_CPU_SUBTYPE_SH73180) || defined(CONFIG_CPU_SUBTYPE_SH7722) | 13 | #if defined(CONFIG_CPU_SUBTYPE_SH73180) || defined(CONFIG_CPU_SUBTYPE_SH7722) |
14 | #define FRQCR 0xa4150000 | 14 | #define FRQCR 0xa4150000 |
15 | #define VCLKCR 0xa4150004 | ||
16 | #define SCLKACR 0xa4150008 | ||
17 | #define SCLKBCR 0xa415000c | ||
18 | #define IrDACLKCR 0xa4150010 | ||
15 | #elif defined(CONFIG_CPU_SUBTYPE_SH7780) | 19 | #elif defined(CONFIG_CPU_SUBTYPE_SH7780) |
16 | #define FRQCR 0xffc80000 | 20 | #define FRQCR 0xffc80000 |
17 | #elif defined(CONFIG_CPU_SUBTYPE_SH7785) | 21 | #elif defined(CONFIG_CPU_SUBTYPE_SH7785) |