aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-s5pv210/Kconfig9
-rw-r--r--arch/arm/mach-s5pv210/Makefile4
-rw-r--r--arch/arm/mach-s5pv210/common.c16
-rw-r--r--arch/arm/mach-s5pv210/common.h9
-rw-r--r--arch/arm/mach-s5pv210/mach-goni.c2
-rw-r--r--arch/arm/mach-s5pv210/mach-smdkv210.c2
-rw-r--r--arch/arm/plat-samsung/Kconfig2
7 files changed, 39 insertions, 5 deletions
diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
index f60f2862856d..60785cea7c61 100644
--- a/arch/arm/mach-s5pv210/Kconfig
+++ b/arch/arm/mach-s5pv210/Kconfig
@@ -13,6 +13,7 @@ config CPU_S5PV210
13 bool 13 bool
14 select ARM_AMBA 14 select ARM_AMBA
15 select PL330_DMA if DMADEVICES 15 select PL330_DMA if DMADEVICES
16 select S5P_CLOCK if !COMMON_CLK
16 select S5P_EXT_INT 17 select S5P_EXT_INT
17 select S5P_PM if PM 18 select S5P_PM if PM
18 select S5P_SLEEP if PM 19 select S5P_SLEEP if PM
@@ -70,6 +71,14 @@ config S5PV210_SETUP_USB_PHY
70 help 71 help
71 Common setup code for USB PHY controller 72 Common setup code for USB PHY controller
72 73
74config COMMON_CLK_S5PV210
75 bool "Common Clock Framework support"
76 default y
77 select COMMON_CLK_SAMSUNG
78 help
79 Enable this option to use new clock driver
80 based on Common Clock Framework.
81
73menu "S5PC110 Machines" 82menu "S5PC110 Machines"
74 83
75config MACH_AQUILA 84config MACH_AQUILA
diff --git a/arch/arm/mach-s5pv210/Makefile b/arch/arm/mach-s5pv210/Makefile
index 1c4e41998a10..d1a493aea1cf 100644
--- a/arch/arm/mach-s5pv210/Makefile
+++ b/arch/arm/mach-s5pv210/Makefile
@@ -12,8 +12,8 @@ obj- :=
12 12
13# Core 13# Core
14 14
15obj-y += common.o clock.o 15obj-y += common.o
16 16obj-$(CONFIG_S5P_CLOCK) += clock.o
17obj-$(CONFIG_PM) += pm.o 17obj-$(CONFIG_PM) += pm.o
18 18
19obj-y += dma.o 19obj-y += dma.o
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 */
61static unsigned long xusbxti_f;
62
53static const char name_s5pv210[] = "S5PV210/S5PC110"; 63static const char name_s5pv210[] = "S5PV210/S5PC110";
54 64
55static struct cpu_table cpu_ids[] __initdata = { 65static struct cpu_table cpu_ids[] __initdata = {
@@ -229,18 +239,24 @@ void __init s5pv210_map_io(void)
229 239
230void __init s5pv210_init_clocks(int xtal) 240void __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
240void __init s5pv210_init_irq(void) 254void __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;
diff --git a/arch/arm/mach-s5pv210/common.h b/arch/arm/mach-s5pv210/common.h
index fe1beb54e548..a2e85cb9b471 100644
--- a/arch/arm/mach-s5pv210/common.h
+++ b/arch/arm/mach-s5pv210/common.h
@@ -14,6 +14,15 @@
14 14
15#include <linux/reboot.h> 15#include <linux/reboot.h>
16 16
17#ifdef CONFIG_COMMON_CLK_S5PV210
18void s5pv210_clk_init(unsigned long xxti_f, unsigned long xusbxti_f,
19 void __iomem *reg_base);
20#else
21static inline void s5pv210_clk_init(unsigned long xxti_f,
22 unsigned long xusbxti_f,
23 void __iomem *reg_base) {}
24#endif
25
17void s5pv210_init_io(struct map_desc *mach_desc, int size); 26void s5pv210_init_io(struct map_desc *mach_desc, int size);
18void s5pv210_init_irq(void); 27void s5pv210_init_irq(void);
19 28
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index c1ce921c4088..0fc71beab779 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -849,7 +849,7 @@ static void __init goni_sound_init(void)
849static void __init goni_map_io(void) 849static void __init goni_map_io(void)
850{ 850{
851 s5pv210_init_io(NULL, 0); 851 s5pv210_init_io(NULL, 0);
852 s3c24xx_init_clocks(clk_xusbxti.rate); 852 s3c24xx_init_clocks(24000000);
853 s3c24xx_init_uarts(goni_uartcfgs, ARRAY_SIZE(goni_uartcfgs)); 853 s3c24xx_init_uarts(goni_uartcfgs, ARRAY_SIZE(goni_uartcfgs));
854 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); 854 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
855} 855}
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c
index 2a6655fb63e7..1bde3a37060b 100644
--- a/arch/arm/mach-s5pv210/mach-smdkv210.c
+++ b/arch/arm/mach-s5pv210/mach-smdkv210.c
@@ -285,7 +285,7 @@ static struct platform_pwm_backlight_data smdkv210_bl_data = {
285static void __init smdkv210_map_io(void) 285static void __init smdkv210_map_io(void)
286{ 286{
287 s5pv210_init_io(NULL, 0); 287 s5pv210_init_io(NULL, 0);
288 s3c24xx_init_clocks(clk_xusbxti.rate); 288 s3c24xx_init_clocks(24000000);
289 s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs)); 289 s3c24xx_init_uarts(smdkv210_uartcfgs, ARRAY_SIZE(smdkv210_uartcfgs));
290 samsung_set_timer_source(SAMSUNG_PWM2, SAMSUNG_PWM4); 290 samsung_set_timer_source(SAMSUNG_PWM2, SAMSUNG_PWM4);
291} 291}
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 1c629c2c270f..42f5d5bde627 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -78,7 +78,7 @@ config SAMSUNG_CLKSRC
78 used by newer systems such as the S3C64XX. 78 used by newer systems such as the S3C64XX.
79 79
80config S5P_CLOCK 80config S5P_CLOCK
81 def_bool ARCH_S5PV210 81 bool
82 help 82 help
83 Support common clock part for ARCH_S5P and ARCH_EXYNOS SoCs 83 Support common clock part for ARCH_S5P and ARCH_EXYNOS SoCs
84 84