diff options
author | Pawel Moll <pawel.moll@arm.com> | 2012-07-13 06:48:16 -0400 |
---|---|---|
committer | Pawel Moll <pawel.moll@arm.com> | 2012-07-13 06:48:16 -0400 |
commit | d1b8a775fdb686c949d31e366a898b64147543e0 (patch) | |
tree | f94ab919c86b5a259fcd879d15926153b73d80b4 /arch/arm/mach-vexpress/include | |
parent | 56a34b03ff427046494db87f05fc810aaedd23a5 (diff) |
ARM: vexpress: Initial common clock support
This patch makes Versatile Express use the common clock framework
instead of the plat-versatile implementation.
It defines clock provider for VE's OSCs (clock generators) and
registers all required fixed and variable clock sources (for both
motherboard and core tile).
This is a simple conversion of the existing state and will be
extended (and migrated to drivers/clk) in the near future.
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Diffstat (limited to 'arch/arm/mach-vexpress/include')
-rw-r--r-- | arch/arm/mach-vexpress/include/mach/clkdev.h | 15 | ||||
-rw-r--r-- | arch/arm/mach-vexpress/include/mach/motherboard.h | 19 |
2 files changed, 19 insertions, 15 deletions
diff --git a/arch/arm/mach-vexpress/include/mach/clkdev.h b/arch/arm/mach-vexpress/include/mach/clkdev.h deleted file mode 100644 index 3f8307d73cad..000000000000 --- a/arch/arm/mach-vexpress/include/mach/clkdev.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | #ifndef __ASM_MACH_CLKDEV_H | ||
2 | #define __ASM_MACH_CLKDEV_H | ||
3 | |||
4 | #include <plat/clock.h> | ||
5 | |||
6 | struct clk { | ||
7 | const struct clk_ops *ops; | ||
8 | unsigned long rate; | ||
9 | const struct icst_params *params; | ||
10 | }; | ||
11 | |||
12 | #define __clk_get(clk) ({ 1; }) | ||
13 | #define __clk_put(clk) do { } while (0) | ||
14 | |||
15 | #endif | ||
diff --git a/arch/arm/mach-vexpress/include/mach/motherboard.h b/arch/arm/mach-vexpress/include/mach/motherboard.h index f004ec982d29..1e388c7bf4d7 100644 --- a/arch/arm/mach-vexpress/include/mach/motherboard.h +++ b/arch/arm/mach-vexpress/include/mach/motherboard.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __MACH_MOTHERBOARD_H | 1 | #ifndef __MACH_MOTHERBOARD_H |
2 | #define __MACH_MOTHERBOARD_H | 2 | #define __MACH_MOTHERBOARD_H |
3 | 3 | ||
4 | #include <linux/clk-provider.h> | ||
5 | |||
4 | /* | 6 | /* |
5 | * Physical addresses, offset from V2M_PA_CS0-3 | 7 | * Physical addresses, offset from V2M_PA_CS0-3 |
6 | */ | 8 | */ |
@@ -147,4 +149,21 @@ struct ct_desc { | |||
147 | 149 | ||
148 | extern struct ct_desc *ct_desc; | 150 | extern struct ct_desc *ct_desc; |
149 | 151 | ||
152 | /* | ||
153 | * OSC clock provider | ||
154 | */ | ||
155 | struct v2m_osc { | ||
156 | struct clk_hw hw; | ||
157 | u8 site; /* 0 = motherboard, 1 = site 1, 2 = site 2 */ | ||
158 | u8 stack; /* board stack position */ | ||
159 | u16 osc; | ||
160 | unsigned long rate_min; | ||
161 | unsigned long rate_max; | ||
162 | unsigned long rate_default; | ||
163 | }; | ||
164 | |||
165 | #define to_v2m_osc(osc) container_of(osc, struct v2m_osc, hw) | ||
166 | |||
167 | struct clk *v2m_osc_register(const char *name, struct v2m_osc *osc); | ||
168 | |||
150 | #endif | 169 | #endif |