summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-versatile
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2009-02-12 15:58:20 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-02-19 11:30:25 +0000
commit533ad5e60c0a5ff3cef7583b5b1b0eee84c2bda6 (patch)
tree8fee4ffecf0b42314d20d2a906c46938bad3c543 /arch/arm/mach-versatile
parent2514cca06be9dc7ae12908085ebaf0ef49e6d8ae (diff)
downloadop-kernel-dev-533ad5e60c0a5ff3cef7583b5b1b0eee84c2bda6.zip
op-kernel-dev-533ad5e60c0a5ff3cef7583b5b1b0eee84c2bda6.tar.gz
[ARM] 5395/1: RealView: Add support for the DS1338 RTC chip
This chip is on the I2C bus on the RealView and Versatile boards. The patch adds the i2c_board_info definition for this device and registers it with the I2C subsystem. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-versatile')
-rw-r--r--arch/arm/mach-versatile/core.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index 1c43494..5657766 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -335,11 +335,25 @@ static struct resource versatile_i2c_resource = {
static struct platform_device versatile_i2c_device = {
.name = "versatile-i2c",
- .id = -1,
+ .id = 0,
.num_resources = 1,
.resource = &versatile_i2c_resource,
};
+static struct i2c_board_info versatile_i2c_board_info[] = {
+ {
+ I2C_BOARD_INFO("rtc-ds1307", 0xd0 >> 1),
+ .type = "ds1338",
+ },
+};
+
+static int __init versatile_i2c_init(void)
+{
+ return i2c_register_board_info(0, versatile_i2c_board_info,
+ ARRAY_SIZE(versatile_i2c_board_info));
+}
+arch_initcall(versatile_i2c_init);
+
#define VERSATILE_SYSMCI (__io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_MCI_OFFSET)
unsigned int mmc_status(struct device *dev)
OpenPOWER on IntegriCloud