aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-gemini/board-nas4220b.c1
-rw-r--r--arch/arm/mach-gemini/board-rut1xx.c1
-rw-r--r--arch/arm/mach-gemini/board-wbd111.c1
-rw-r--r--arch/arm/mach-gemini/board-wbd222.c1
-rw-r--r--arch/arm/mach-gemini/common.h1
-rw-r--r--arch/arm/mach-gemini/devices.c26
6 files changed, 31 insertions, 0 deletions
diff --git a/arch/arm/mach-gemini/board-nas4220b.c b/arch/arm/mach-gemini/board-nas4220b.c
index 2ba096de0034..0cf7a07c3f3f 100644
--- a/arch/arm/mach-gemini/board-nas4220b.c
+++ b/arch/arm/mach-gemini/board-nas4220b.c
@@ -98,6 +98,7 @@ static void __init ib4220b_init(void)
98 platform_register_pflash(SZ_16M, NULL, 0); 98 platform_register_pflash(SZ_16M, NULL, 0);
99 platform_device_register(&ib4220b_led_device); 99 platform_device_register(&ib4220b_led_device);
100 platform_device_register(&ib4220b_key_device); 100 platform_device_register(&ib4220b_key_device);
101 platform_register_rtc();
101} 102}
102 103
103MACHINE_START(NAS4220B, "Raidsonic NAS IB-4220-B") 104MACHINE_START(NAS4220B, "Raidsonic NAS IB-4220-B")
diff --git a/arch/arm/mach-gemini/board-rut1xx.c b/arch/arm/mach-gemini/board-rut1xx.c
index a9a0d8b01942..4fa09af99495 100644
--- a/arch/arm/mach-gemini/board-rut1xx.c
+++ b/arch/arm/mach-gemini/board-rut1xx.c
@@ -82,6 +82,7 @@ static void __init rut1xx_init(void)
82 platform_register_pflash(SZ_8M, NULL, 0); 82 platform_register_pflash(SZ_8M, NULL, 0);
83 platform_device_register(&rut1xx_leds); 83 platform_device_register(&rut1xx_leds);
84 platform_device_register(&rut1xx_keys_device); 84 platform_device_register(&rut1xx_keys_device);
85 platform_register_rtc();
85} 86}
86 87
87MACHINE_START(RUT100, "Teltonika RUT100") 88MACHINE_START(RUT100, "Teltonika RUT100")
diff --git a/arch/arm/mach-gemini/board-wbd111.c b/arch/arm/mach-gemini/board-wbd111.c
index 8b88d50d4337..af7b68a6b258 100644
--- a/arch/arm/mach-gemini/board-wbd111.c
+++ b/arch/arm/mach-gemini/board-wbd111.c
@@ -130,6 +130,7 @@ static void __init wbd111_init(void)
130 wbd111_num_partitions); 130 wbd111_num_partitions);
131 platform_device_register(&wbd111_leds_device); 131 platform_device_register(&wbd111_leds_device);
132 platform_device_register(&wbd111_keys_device); 132 platform_device_register(&wbd111_keys_device);
133 platform_register_rtc();
133} 134}
134 135
135MACHINE_START(WBD111, "Wiliboard WBD-111") 136MACHINE_START(WBD111, "Wiliboard WBD-111")
diff --git a/arch/arm/mach-gemini/board-wbd222.c b/arch/arm/mach-gemini/board-wbd222.c
index 1eebcecd1c33..99e5bbecf923 100644
--- a/arch/arm/mach-gemini/board-wbd222.c
+++ b/arch/arm/mach-gemini/board-wbd222.c
@@ -130,6 +130,7 @@ static void __init wbd222_init(void)
130 wbd222_num_partitions); 130 wbd222_num_partitions);
131 platform_device_register(&wbd222_leds_device); 131 platform_device_register(&wbd222_leds_device);
132 platform_device_register(&wbd222_keys_device); 132 platform_device_register(&wbd222_keys_device);
133 platform_register_rtc();
133} 134}
134 135
135MACHINE_START(WBD222, "Wiliboard WBD-222") 136MACHINE_START(WBD222, "Wiliboard WBD-222")
diff --git a/arch/arm/mach-gemini/common.h b/arch/arm/mach-gemini/common.h
index 9392834a214f..7670c39acb2f 100644
--- a/arch/arm/mach-gemini/common.h
+++ b/arch/arm/mach-gemini/common.h
@@ -18,6 +18,7 @@ extern void gemini_map_io(void);
18extern void gemini_init_irq(void); 18extern void gemini_init_irq(void);
19extern void gemini_timer_init(void); 19extern void gemini_timer_init(void);
20extern void gemini_gpio_init(void); 20extern void gemini_gpio_init(void);
21extern void platform_register_rtc(void);
21 22
22/* Common platform devices registration functions */ 23/* Common platform devices registration functions */
23extern int platform_register_uart(void); 24extern int platform_register_uart(void);
diff --git a/arch/arm/mach-gemini/devices.c b/arch/arm/mach-gemini/devices.c
index 6b525253d027..5cff29818b73 100644
--- a/arch/arm/mach-gemini/devices.c
+++ b/arch/arm/mach-gemini/devices.c
@@ -90,3 +90,29 @@ int platform_register_pflash(unsigned int size, struct mtd_partition *parts,
90 90
91 return platform_device_register(&pflash_device); 91 return platform_device_register(&pflash_device);
92} 92}
93
94static struct resource gemini_rtc_resources[] = {
95 [0] = {
96 .start = GEMINI_RTC_BASE,
97 .end = GEMINI_RTC_BASE + 0x24,
98 .flags = IORESOURCE_MEM,
99 },
100 [1] = {
101 .start = IRQ_RTC,
102 .end = IRQ_RTC,
103 .flags = IORESOURCE_IRQ,
104 },
105};
106
107static struct platform_device gemini_rtc_device = {
108 .name = "rtc-gemini",
109 .id = 0,
110 .num_resources = ARRAY_SIZE(gemini_rtc_resources),
111 .resource = gemini_rtc_resources,
112};
113
114int __init platform_register_rtc(void)
115{
116 return platform_device_register(&gemini_rtc_device);
117}
118