Commit f512626f authored by Hans Ulli Kroll's avatar Hans Ulli Kroll Committed by Russell King

ARM: 6604/1: Gemini: add platform support for Gemini RTC

adds rtc support for all Gemini SoC boards
nas4220b, rut1xx, wbd111, wbd222
Signed-off-by: default avatarHans Ulli Kroll <ulli.kroll@googlemail.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 1bae4ce2
...@@ -98,6 +98,7 @@ static void __init ib4220b_init(void) ...@@ -98,6 +98,7 @@ static void __init ib4220b_init(void)
platform_register_pflash(SZ_16M, NULL, 0); platform_register_pflash(SZ_16M, NULL, 0);
platform_device_register(&ib4220b_led_device); platform_device_register(&ib4220b_led_device);
platform_device_register(&ib4220b_key_device); platform_device_register(&ib4220b_key_device);
platform_register_rtc();
} }
MACHINE_START(NAS4220B, "Raidsonic NAS IB-4220-B") MACHINE_START(NAS4220B, "Raidsonic NAS IB-4220-B")
......
...@@ -82,6 +82,7 @@ static void __init rut1xx_init(void) ...@@ -82,6 +82,7 @@ static void __init rut1xx_init(void)
platform_register_pflash(SZ_8M, NULL, 0); platform_register_pflash(SZ_8M, NULL, 0);
platform_device_register(&rut1xx_leds); platform_device_register(&rut1xx_leds);
platform_device_register(&rut1xx_keys_device); platform_device_register(&rut1xx_keys_device);
platform_register_rtc();
} }
MACHINE_START(RUT100, "Teltonika RUT100") MACHINE_START(RUT100, "Teltonika RUT100")
......
...@@ -130,6 +130,7 @@ static void __init wbd111_init(void) ...@@ -130,6 +130,7 @@ static void __init wbd111_init(void)
wbd111_num_partitions); wbd111_num_partitions);
platform_device_register(&wbd111_leds_device); platform_device_register(&wbd111_leds_device);
platform_device_register(&wbd111_keys_device); platform_device_register(&wbd111_keys_device);
platform_register_rtc();
} }
MACHINE_START(WBD111, "Wiliboard WBD-111") MACHINE_START(WBD111, "Wiliboard WBD-111")
......
...@@ -130,6 +130,7 @@ static void __init wbd222_init(void) ...@@ -130,6 +130,7 @@ static void __init wbd222_init(void)
wbd222_num_partitions); wbd222_num_partitions);
platform_device_register(&wbd222_leds_device); platform_device_register(&wbd222_leds_device);
platform_device_register(&wbd222_keys_device); platform_device_register(&wbd222_keys_device);
platform_register_rtc();
} }
MACHINE_START(WBD222, "Wiliboard WBD-222") MACHINE_START(WBD222, "Wiliboard WBD-222")
......
...@@ -18,6 +18,7 @@ extern void gemini_map_io(void); ...@@ -18,6 +18,7 @@ extern void gemini_map_io(void);
extern void gemini_init_irq(void); extern void gemini_init_irq(void);
extern void gemini_timer_init(void); extern void gemini_timer_init(void);
extern void gemini_gpio_init(void); extern void gemini_gpio_init(void);
extern void platform_register_rtc(void);
/* Common platform devices registration functions */ /* Common platform devices registration functions */
extern int platform_register_uart(void); extern int platform_register_uart(void);
......
...@@ -90,3 +90,29 @@ int platform_register_pflash(unsigned int size, struct mtd_partition *parts, ...@@ -90,3 +90,29 @@ int platform_register_pflash(unsigned int size, struct mtd_partition *parts,
return platform_device_register(&pflash_device); return platform_device_register(&pflash_device);
} }
static struct resource gemini_rtc_resources[] = {
[0] = {
.start = GEMINI_RTC_BASE,
.end = GEMINI_RTC_BASE + 0x24,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_RTC,
.end = IRQ_RTC,
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device gemini_rtc_device = {
.name = "rtc-gemini",
.id = 0,
.num_resources = ARRAY_SIZE(gemini_rtc_resources),
.resource = gemini_rtc_resources,
};
int __init platform_register_rtc(void)
{
return platform_device_register(&gemini_rtc_device);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment