diff options
author | dmitry pervushin <dimka@nomadgs.com> | 2007-04-24 08:39:09 +0400 |
---|---|---|
committer | Paul Mundt <lethal@hera.kernel.org> | 2007-05-07 06:11:56 +0400 |
commit | 1929cb340b74904c130fdf3de3fe5bbedb68a5aa (patch) | |
tree | 2675de406fca78e6bfd5b29535bbb220a167bc2e /include | |
parent | 34a780a0afeb8f99c9ca9934f4cc0822541769c6 (diff) | |
download | linux-1929cb340b74904c130fdf3de3fe5bbedb68a5aa.tar.xz |
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 { void (*enable)(struct clk *clk); void (*disable)(struct clk *clk); void (*recalc)(struct clk *clk); - int (*set_rate)(struct clk *clk, unsigned long rate); + int (*set_rate)(struct clk *clk, unsigned long rate, int algo_id); }; struct clk { @@ -50,4 +50,34 @@ void clk_unregister(struct clk *); int show_clocks(struct seq_file *m); +/* the exported API, in addition to clk_set_rate */ +/** + * clk_set_rate_ex - set the clock rate for a clock source, with additional parameter + * @clk: clock source + * @rate: desired clock rate in Hz + * @algo_id: algorithm id to be passed down to ops->set_rate + * + * Returns success (0) or negative errno. + */ +int clk_set_rate_ex(struct clk *clk, unsigned long rate, int algo_id); + +enum clk_sh_algo_id { + NO_CHANGE = 0, + + IUS_N1_N1, + IUS_322, + IUS_522, + IUS_N11, + + SB_N1, + + SB3_N1, + SB3_32, + SB3_43, + SB3_54, + + BP_N1, + + IP_N1, +}; #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 @@ #if defined(CONFIG_CPU_SUBTYPE_SH73180) || defined(CONFIG_CPU_SUBTYPE_SH7722) #define FRQCR 0xa4150000 +#define VCLKCR 0xa4150004 +#define SCLKACR 0xa4150008 +#define SCLKBCR 0xa415000c +#define IrDACLKCR 0xa4150010 #elif defined(CONFIG_CPU_SUBTYPE_SH7780) #define FRQCR 0xffc80000 #elif defined(CONFIG_CPU_SUBTYPE_SH7785) |