diff options
author | Mateusz Krawczuk <m.krawczuk@partner.samsung.com> | 2013-12-28 21:09:16 +0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2014-07-18 23:24:50 +0400 |
commit | 28dc7ef8cd53f965da47688a52f7afddb00979d2 (patch) | |
tree | 6b2e3441c618cbfcc14c57feef851ccd6c5cb817 /arch/arm/mach-s5pv210/common.c | |
parent | 841586082d84639e206a08f93b29d3fce7769c08 (diff) | |
download | linux-28dc7ef8cd53f965da47688a52f7afddb00979d2.tar.xz |
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 @@ #include <linux/dma-mapping.h> #include <linux/serial_core.h> #include <linux/serial_s3c.h> +#include <linux/of.h> #include <asm/proc-fns.h> #include <asm/mach/arch.h> @@ -35,7 +36,13 @@ #include <mach/regs-clock.h> #include <plat/cpu.h> + +#ifdef CONFIG_S5P_CLOCK #include <plat/clock.h> +#else +#include <linux/clk-provider.h> +#endif + #include <plat/devs.h> #include <plat/sdhci.h> #include <plat/adc-core.h> @@ -50,6 +57,9 @@ #include "common.h" +/* External clock frequency */ +static unsigned long xusbxti_f; + static const char name_s5pv210[] = "S5PV210/S5PC110"; static struct cpu_table cpu_ids[] __initdata = { @@ -229,18 +239,24 @@ void __init s5pv210_map_io(void) void __init s5pv210_init_clocks(int xtal) { +#ifdef CONFIG_S5P_CLOCK printk(KERN_DEBUG "%s: initializing clocks\n", __func__); s3c24xx_register_baseclocks(xtal); s5p_register_clocks(xtal); s5pv210_register_clocks(); s5pv210_setup_clocks(); +#else + xusbxti_f = xtal; +#endif } void __init s5pv210_init_irq(void) { u32 vic[4]; /* S5PV210 supports 4 VIC */ + s5pv210_clk_init(0, xusbxti_f, S3C_VA_SYS); + /* All the VICs are fully populated. */ vic[0] = ~0; vic[1] = ~0; |