aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChanghwan Youn <chaos.youn@samsung.com>2010-09-20 02:25:51 -0400
committerKukjin Kim <kgene.kim@samsung.com>2010-10-20 18:52:17 -0400
commitcdff6e6fd2d4360e2d5bc39afe3f1ef17d79dbf0 (patch)
tree04fdb5f0db8ec36c0493a5c48beab53cee2ffcf9
parent1d826d14cc2783d0c09750c2e1eeb2bdd358769b (diff)
ARM: S5PV310: Add support RTC
This patch adds support RTC for S5PV310 and S5PC210. Signed-off-by: Changhwan Youn <chaos.youn@samsung.com> Signed-off-by: Jemings Ko <jemings@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
-rw-r--r--arch/arm/Kconfig1
-rw-r--r--arch/arm/mach-s5pv310/Kconfig2
-rw-r--r--arch/arm/mach-s5pv310/clock.c5
-rw-r--r--arch/arm/mach-s5pv310/include/mach/irqs.h3
-rw-r--r--arch/arm/mach-s5pv310/include/mach/map.h2
-rw-r--r--arch/arm/mach-s5pv310/mach-smdkc210.c7
-rw-r--r--arch/arm/mach-s5pv310/mach-smdkv310.c7
7 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index e4b74fbdba0a..83b4b0858bf6 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -733,6 +733,7 @@ config ARCH_S5PV310
733 select GENERIC_GPIO 733 select GENERIC_GPIO
734 select HAVE_CLK 734 select HAVE_CLK
735 select GENERIC_CLOCKEVENTS 735 select GENERIC_CLOCKEVENTS
736 select HAVE_S3C_RTC
736 help 737 help
737 Samsung S5PV310 series based systems 738 Samsung S5PV310 series based systems
738 739
diff --git a/arch/arm/mach-s5pv310/Kconfig b/arch/arm/mach-s5pv310/Kconfig
index 9ac29fed44dc..4de5d7265a9f 100644
--- a/arch/arm/mach-s5pv310/Kconfig
+++ b/arch/arm/mach-s5pv310/Kconfig
@@ -33,6 +33,7 @@ config MACH_SMDKC210
33 bool "SMDKC210" 33 bool "SMDKC210"
34 select CPU_S5PV310 34 select CPU_S5PV310
35 select ARCH_SPARSEMEM_ENABLE 35 select ARCH_SPARSEMEM_ENABLE
36 select S3C_DEV_RTC
36 help 37 help
37 Machine support for Samsung SMDKC210 38 Machine support for Samsung SMDKC210
38 S5PC210(MCP) is one of package option of S5PV310 39 S5PC210(MCP) is one of package option of S5PV310
@@ -53,6 +54,7 @@ config MACH_SMDKV310
53 bool "SMDKV310" 54 bool "SMDKV310"
54 select CPU_S5PV310 55 select CPU_S5PV310
55 select ARCH_SPARSEMEM_ENABLE 56 select ARCH_SPARSEMEM_ENABLE
57 select S3C_DEV_RTC
56 help 58 help
57 Machine support for Samsung SMDKV310 59 Machine support for Samsung SMDKV310
58 60
diff --git a/arch/arm/mach-s5pv310/clock.c b/arch/arm/mach-s5pv310/clock.c
index 32146db1f451..58c9d33f36fe 100644
--- a/arch/arm/mach-s5pv310/clock.c
+++ b/arch/arm/mach-s5pv310/clock.c
@@ -472,6 +472,11 @@ static struct clk init_clocks_disable[] = {
472 .enable = s5pv310_clk_ip_peril_ctrl, 472 .enable = s5pv310_clk_ip_peril_ctrl,
473 .ctrlbit = (1 << 15), 473 .ctrlbit = (1 << 15),
474 }, { 474 }, {
475 .name = "rtc",
476 .id = -1,
477 .enable = s5pv310_clk_ip_perir_ctrl,
478 .ctrlbit = (1 << 15),
479 }, {
475 .name = "watchdog", 480 .name = "watchdog",
476 .id = -1, 481 .id = -1,
477 .enable = s5pv310_clk_ip_perir_ctrl, 482 .enable = s5pv310_clk_ip_perir_ctrl,
diff --git a/arch/arm/mach-s5pv310/include/mach/irqs.h b/arch/arm/mach-s5pv310/include/mach/irqs.h
index 7b4b09fb7cc9..e81332f0330f 100644
--- a/arch/arm/mach-s5pv310/include/mach/irqs.h
+++ b/arch/arm/mach-s5pv310/include/mach/irqs.h
@@ -60,6 +60,9 @@
60#define IRQ_TIMER3_VIC COMBINER_IRQ(22, 3) 60#define IRQ_TIMER3_VIC COMBINER_IRQ(22, 3)
61#define IRQ_TIMER4_VIC COMBINER_IRQ(22, 4) 61#define IRQ_TIMER4_VIC COMBINER_IRQ(22, 4)
62 62
63#define IRQ_RTC_ALARM COMBINER_IRQ(23, 0)
64#define IRQ_RTC_TIC COMBINER_IRQ(23, 1)
65
63#define IRQ_UART0 COMBINER_IRQ(26, 0) 66#define IRQ_UART0 COMBINER_IRQ(26, 0)
64#define IRQ_UART1 COMBINER_IRQ(26, 1) 67#define IRQ_UART1 COMBINER_IRQ(26, 1)
65#define IRQ_UART2 COMBINER_IRQ(26, 2) 68#define IRQ_UART2 COMBINER_IRQ(26, 2)
diff --git a/arch/arm/mach-s5pv310/include/mach/map.h b/arch/arm/mach-s5pv310/include/mach/map.h
index aff6d23624bb..75236536c4df 100644
--- a/arch/arm/mach-s5pv310/include/mach/map.h
+++ b/arch/arm/mach-s5pv310/include/mach/map.h
@@ -40,6 +40,7 @@
40#define S5PV310_PA_CMU (0x10030000) 40#define S5PV310_PA_CMU (0x10030000)
41 41
42#define S5PV310_PA_WATCHDOG (0x10060000) 42#define S5PV310_PA_WATCHDOG (0x10060000)
43#define S5PV310_PA_RTC (0x10070000)
43 44
44#define S5PV310_PA_COMBINER (0x10448000) 45#define S5PV310_PA_COMBINER (0x10448000)
45 46
@@ -81,6 +82,7 @@
81#define S3C_PA_HSMMC2 S5PV310_PA_HSMMC(2) 82#define S3C_PA_HSMMC2 S5PV310_PA_HSMMC(2)
82#define S3C_PA_HSMMC3 S5PV310_PA_HSMMC(3) 83#define S3C_PA_HSMMC3 S5PV310_PA_HSMMC(3)
83#define S3C_PA_IIC S5PV310_PA_IIC0 84#define S3C_PA_IIC S5PV310_PA_IIC0
85#define S3C_PA_RTC S5PV310_PA_RTC
84#define S3C_PA_WDT S5PV310_PA_WATCHDOG 86#define S3C_PA_WDT S5PV310_PA_WATCHDOG
85 87
86#endif /* __ASM_ARCH_MAP_H */ 88#endif /* __ASM_ARCH_MAP_H */
diff --git a/arch/arm/mach-s5pv310/mach-smdkc210.c b/arch/arm/mach-s5pv310/mach-smdkc210.c
index 656de0123907..9464084cc1f7 100644
--- a/arch/arm/mach-s5pv310/mach-smdkc210.c
+++ b/arch/arm/mach-s5pv310/mach-smdkc210.c
@@ -17,6 +17,7 @@
17#include <plat/regs-serial.h> 17#include <plat/regs-serial.h>
18#include <plat/s5pv310.h> 18#include <plat/s5pv310.h>
19#include <plat/cpu.h> 19#include <plat/cpu.h>
20#include <plat/devs.h>
20 21
21#include <mach/map.h> 22#include <mach/map.h>
22 23
@@ -65,6 +66,10 @@ static struct s3c2410_uartcfg smdkc210_uartcfgs[] __initdata = {
65 }, 66 },
66}; 67};
67 68
69static struct platform_device *smdkc210_devices[] __initdata = {
70 &s3c_device_rtc,
71};
72
68static void __init smdkc210_map_io(void) 73static void __init smdkc210_map_io(void)
69{ 74{
70 s5p_init_io(NULL, 0, S5P_VA_CHIPID); 75 s5p_init_io(NULL, 0, S5P_VA_CHIPID);
@@ -77,6 +82,8 @@ static void __init smdkc210_machine_init(void)
77#ifdef CONFIG_CACHE_L2X0 82#ifdef CONFIG_CACHE_L2X0
78 l2x0_init(S5P_VA_L2CC, 1 << 28, 0xffffffff); 83 l2x0_init(S5P_VA_L2CC, 1 << 28, 0xffffffff);
79#endif 84#endif
85
86 platform_add_devices(smdkc210_devices, ARRAY_SIZE(smdkc210_devices));
80} 87}
81 88
82MACHINE_START(SMDKC210, "SMDKC210") 89MACHINE_START(SMDKC210, "SMDKC210")
diff --git a/arch/arm/mach-s5pv310/mach-smdkv310.c b/arch/arm/mach-s5pv310/mach-smdkv310.c
index 0d6ab77709d2..06062c8e337c 100644
--- a/arch/arm/mach-s5pv310/mach-smdkv310.c
+++ b/arch/arm/mach-s5pv310/mach-smdkv310.c
@@ -17,6 +17,7 @@
17#include <plat/regs-serial.h> 17#include <plat/regs-serial.h>
18#include <plat/s5pv310.h> 18#include <plat/s5pv310.h>
19#include <plat/cpu.h> 19#include <plat/cpu.h>
20#include <plat/devs.h>
20 21
21#include <mach/map.h> 22#include <mach/map.h>
22 23
@@ -65,6 +66,10 @@ static struct s3c2410_uartcfg smdkv310_uartcfgs[] __initdata = {
65 }, 66 },
66}; 67};
67 68
69static struct platform_device *smdkv310_devices[] __initdata = {
70 &s3c_device_rtc,
71};
72
68static void __init smdkv310_map_io(void) 73static void __init smdkv310_map_io(void)
69{ 74{
70 s5p_init_io(NULL, 0, S5P_VA_CHIPID); 75 s5p_init_io(NULL, 0, S5P_VA_CHIPID);
@@ -77,6 +82,8 @@ static void __init smdkv310_machine_init(void)
77#ifdef CONFIG_CACHE_L2X0 82#ifdef CONFIG_CACHE_L2X0
78 l2x0_init(S5P_VA_L2CC, 1 << 28, 0xffffffff); 83 l2x0_init(S5P_VA_L2CC, 1 << 28, 0xffffffff);
79#endif 84#endif
85
86 platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices));
80} 87}
81 88
82MACHINE_START(SMDKV310, "SMDKV310") 89MACHINE_START(SMDKV310, "SMDKV310")