aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Michlmayr <tbm@cyrius.com>2007-12-27 08:09:07 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-01-26 09:37:57 -0500
commitbd7b8858631bf335ce6e8b4a985b7f951041b572 (patch)
tree8a3cc5417dcd352942e4f24fae2de958b80ad8da
parentecdc902bf87e57e47efb6cab3999d64bfe3b2dfd (diff)
[ARM] 4732/1: GLAN Tank: register rtc-rs5c372 i2c device
Use the new i2c framework to load rtc-rs5c372 for the GLAN Tank. Tested-by: Gordon Farquharson <gordonfarquharson@gmail.com> Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Acked-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/mach-iop32x/glantank.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c
index 2b086ab2668c..6309f9a99fd5 100644
--- a/arch/arm/mach-iop32x/glantank.c
+++ b/arch/arm/mach-iop32x/glantank.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * Board support code for the GLAN Tank. 4 * Board support code for the GLAN Tank.
5 * 5 *
6 * Copyright (C) 2006 Martin Michlmayr <tbm@cyrius.com> 6 * Copyright (C) 2006, 2007 Martin Michlmayr <tbm@cyrius.com>
7 * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org> 7 * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
8 * 8 *
9 * This program is free software; you can redistribute it and/or modify it 9 * This program is free software; you can redistribute it and/or modify it
@@ -21,6 +21,7 @@
21#include <linux/serial_core.h> 21#include <linux/serial_core.h>
22#include <linux/serial_8250.h> 22#include <linux/serial_8250.h>
23#include <linux/mtd/physmap.h> 23#include <linux/mtd/physmap.h>
24#include <linux/i2c.h>
24#include <linux/platform_device.h> 25#include <linux/platform_device.h>
25#include <asm/hardware.h> 26#include <asm/hardware.h>
26#include <asm/io.h> 27#include <asm/io.h>
@@ -166,6 +167,13 @@ static struct platform_device glantank_serial_device = {
166 .resource = &glantank_uart_resource, 167 .resource = &glantank_uart_resource,
167}; 168};
168 169
170static struct i2c_board_info __initdata glantank_i2c_devices[] = {
171 {
172 I2C_BOARD_INFO("rtc-rs5c372", 0x32),
173 .type = "rs5c372a",
174 },
175};
176
169static void glantank_power_off(void) 177static void glantank_power_off(void)
170{ 178{
171 __raw_writeb(0x01, 0xfe8d0004); 179 __raw_writeb(0x01, 0xfe8d0004);
@@ -183,6 +191,9 @@ static void __init glantank_init_machine(void)
183 platform_device_register(&iop3xx_dma_0_channel); 191 platform_device_register(&iop3xx_dma_0_channel);
184 platform_device_register(&iop3xx_dma_1_channel); 192 platform_device_register(&iop3xx_dma_1_channel);
185 193
194 i2c_register_board_info(0, glantank_i2c_devices,
195 ARRAY_SIZE(glantank_i2c_devices));
196
186 pm_power_off = glantank_power_off; 197 pm_power_off = glantank_power_off;
187} 198}
188 199