]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: add RTC support to beagleboard
authorKoen Kooi <k.kooi@student.utwente.nl>
Tue, 13 May 2008 08:17:18 +0000 (10:17 +0200)
committerTony Lindgren <tony@atomide.com>
Wed, 14 May 2008 22:35:19 +0000 (15:35 -0700)
This patch adds RTC support to the omap3 based beagleboard

Signed-off-by: Koen Kooi <koen@openembedded.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/board-omap3beagle.c

index 626f004bdb0eff83ecbcb6716ff44d588b630f76..0c15ca012550ad134a33e6d5e4a69e0731abfe01 100644 (file)
@@ -58,11 +58,22 @@ static struct omap_mmc_config omap3beagle_mmc_config __initdata = {
        },
 };
 
+static struct platform_device omap3_beagle_twl4030rtc_device = {
+       .name           = "twl4030_rtc",
+       .id             = -1,
+};
+
 static struct omap_board_config_kernel omap3_beagle_config[] __initdata = {
        { OMAP_TAG_UART,        &omap3_beagle_uart_config },
        { OMAP_TAG_MMC,         &omap3beagle_mmc_config },
 };
 
+static struct platform_device *omap3_beagle_devices[] __initdata = {
+#ifdef CONFIG_RTC_DRV_TWL4030
+       &omap3_beagle_twl4030rtc_device,
+#endif
+};
+
 static void __init omap3_beagle_init(void)
 {
        omap_board_config = omap3_beagle_config;
@@ -77,6 +88,8 @@ arch_initcall(omap3_beagle_i2c_init);
 
 static void __init omap3_beagle_map_io(void)
 {
+       platform_add_devices(omap3_beagle_devices,
+                               ARRAY_SIZE(omap3_beagle_devices));
        omap2_set_globals_343x();
        omap2_map_common_io();
 }