diff options
author | Mateusz Krawczuk <m.krawczuk@partner.samsung.com> | 2013-12-28 12:09:16 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2014-07-18 15:24:50 -0400 |
commit | 28dc7ef8cd53f965da47688a52f7afddb00979d2 (patch) | |
tree | 6b2e3441c618cbfcc14c57feef851ccd6c5cb817 /arch/arm/mach-s5pv210/common.c | |
parent | 841586082d84639e206a08f93b29d3fce7769c08 (diff) |
ARM: S5PV210: Migrate clock handling to Common Clock Framework
This patch migrates the s5pv210 platform to use new clock driver
using Common Clock Framework.
Signed-off-by: Mateusz Krawczuk <m.krawczuk@partner.samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
[t.figa: Rebased and fixed merge conflicts.]
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s5pv210/common.c')
-rw-r--r-- | arch/arm/mach-s5pv210/common.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pv210/common.c b/arch/arm/mach-s5pv210/common.c index 7024dcd0e40a..2e2202ac7173 100644 --- a/arch/arm/mach-s5pv210/common.c +++ b/arch/arm/mach-s5pv210/common.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/dma-mapping.h> | 25 | #include <linux/dma-mapping.h> |
26 | #include <linux/serial_core.h> | 26 | #include <linux/serial_core.h> |
27 | #include <linux/serial_s3c.h> | 27 | #include <linux/serial_s3c.h> |
28 | #include <linux/of.h> | ||
28 | 29 | ||
29 | #include <asm/proc-fns.h> | 30 | #include <asm/proc-fns.h> |
30 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
@@ -35,7 +36,13 @@ | |||
35 | #include <mach/regs-clock.h> | 36 | #include <mach/regs-clock.h> |
36 | 37 | ||
37 | #include <plat/cpu.h> | 38 | #include <plat/cpu.h> |
39 | |||
40 | #ifdef CONFIG_S5P_CLOCK | ||
38 | #include <plat/clock.h> | 41 | #include <plat/clock.h> |
42 | #else | ||
43 | #include <linux/clk-provider.h> | ||
44 | #endif | ||
45 | |||
39 | #include <plat/devs.h> | 46 | #include <plat/devs.h> |
40 | #include <plat/sdhci.h> | 47 | #include <plat/sdhci.h> |
41 | #include <plat/adc-core.h> | 48 | #include <plat/adc-core.h> |
@@ -50,6 +57,9 @@ | |||
50 | 57 | ||
51 | #include "common.h" | 58 | #include "common.h" |
52 | 59 | ||
60 | /* External clock frequency */ | ||
61 | static unsigned long xusbxti_f; | ||
62 | |||
53 | static const char name_s5pv210[] = "S5PV210/S5PC110"; | 63 | static const char name_s5pv210[] = "S5PV210/S5PC110"; |
54 | 64 | ||
55 | static struct cpu_table cpu_ids[] __initdata = { | 65 | static struct cpu_table cpu_ids[] __initdata = { |
@@ -229,18 +239,24 @@ void __init s5pv210_map_io(void) | |||
229 | 239 | ||
230 | void __init s5pv210_init_clocks(int xtal) | 240 | void __init s5pv210_init_clocks(int xtal) |
231 | { | 241 | { |
242 | #ifdef CONFIG_S5P_CLOCK | ||
232 | printk(KERN_DEBUG "%s: initializing clocks\n", __func__); | 243 | printk(KERN_DEBUG "%s: initializing clocks\n", __func__); |
233 | 244 | ||
234 | s3c24xx_register_baseclocks(xtal); | 245 | s3c24xx_register_baseclocks(xtal); |
235 | s5p_register_clocks(xtal); | 246 | s5p_register_clocks(xtal); |
236 | s5pv210_register_clocks(); | 247 | s5pv210_register_clocks(); |
237 | s5pv210_setup_clocks(); | 248 | s5pv210_setup_clocks(); |
249 | #else | ||
250 | xusbxti_f = xtal; | ||
251 | #endif | ||
238 | } | 252 | } |
239 | 253 | ||
240 | void __init s5pv210_init_irq(void) | 254 | void __init s5pv210_init_irq(void) |
241 | { | 255 | { |
242 | u32 vic[4]; /* S5PV210 supports 4 VIC */ | 256 | u32 vic[4]; /* S5PV210 supports 4 VIC */ |
243 | 257 | ||
258 | s5pv210_clk_init(0, xusbxti_f, S3C_VA_SYS); | ||
259 | |||
244 | /* All the VICs are fully populated. */ | 260 | /* All the VICs are fully populated. */ |
245 | vic[0] = ~0; | 261 | vic[0] = ~0; |
246 | vic[1] = ~0; | 262 | vic[1] = ~0; |