summaryrefslogtreecommitdiff
path: root/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2010-08-12 01:30:39 +0200
committerEric Miao <eric.y.miao@gmail.com>2010-12-20 23:07:41 +0800
commit072e1ae73c65496355279505de378b33c916e364 (patch)
treedd5ba8799f23b20c9f7d82c4b3cd02fdb7c6c9ad /arch/arm/mach-pxa/colibri-pxa270-evalboard.c
parent9b6956f45132f9bf696e9f6c2e457bdfa8e08721 (diff)
downloadlwn-072e1ae73c65496355279505de378b33c916e364.tar.gz
lwn-072e1ae73c65496355279505de378b33c916e364.zip
ARM: pxa: Add M41T00 RTC support into Colibri evalboard
Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Acked-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa/colibri-pxa270-evalboard.c')
-rw-r--r--arch/arm/mach-pxa/colibri-pxa270-evalboard.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
index e1a2b52a9d21..7f27aecc7e0f 100644
--- a/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
+++ b/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
@@ -19,6 +19,7 @@
#include <asm/mach-types.h>
#include <mach/hardware.h>
#include <asm/mach/arch.h>
+#include <linux/i2c.h>
#include <mach/pxa27x.h>
#include <mach/colibri.h>
@@ -26,6 +27,8 @@
#include <mach/ohci.h>
#include <mach/pxa27x-udc.h>
+#include <plat/i2c.h>
+
#include "generic.h"
#include "devices.h"
@@ -87,6 +90,25 @@ static void __init colibri_pxa270_uhc_init(void)
static inline void colibri_pxa270_uhc_init(void) {}
#endif
+/******************************************************************************
+ * I2C RTC
+ ******************************************************************************/
+#if defined(CONFIG_RTC_DRV_DS1307) || defined(CONFIG_RTC_DRV_DS1307_MODULE)
+static struct i2c_board_info __initdata colibri_pxa270_i2c_devs[] = {
+ {
+ I2C_BOARD_INFO("m41t00", 0x68),
+ },
+};
+
+static void __init colibri_pxa270_rtc_init(void)
+{
+ pxa_set_i2c_info(NULL);
+ i2c_register_board_info(0, ARRAY_AND_SIZE(colibri_pxa270_i2c_devs));
+}
+#else
+static inline void colibri_pxa270_rtc_init(void) {}
+#endif
+
void __init colibri_pxa270_evalboard_init(void)
{
pxa_set_ffuart_info(NULL);
@@ -95,4 +117,5 @@ void __init colibri_pxa270_evalboard_init(void)
colibri_pxa270_mmc_init();
colibri_pxa270_uhc_init();
+ colibri_pxa270_rtc_init();
}