1 From 88721db37ead2212a54c1392e2e65bae78d2604b Mon Sep 17 00:00:00 2001
2 From: Rod Whitby <rod@whitby.id.au>
3 Date: Tue, 29 Jan 2008 10:05:48 +1030
4 Subject: ixp4xx: Register nslu2 rtc i2c_board_info (Patch #4772)
6 Register the i2c board info related to the RTC chip on the nslu2 board
7 to allow it to be found automatically on boot.
9 Signed-off-by: Rod Whitby <rod@whitby.id.au>
10 Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
13 KernelVersion: 2.6.24-git5
15 Index: linux-2.6.24.7/arch/arm/mach-ixp4xx/nslu2-setup.c
16 ===================================================================
17 --- linux-2.6.24.7.orig/arch/arm/mach-ixp4xx/nslu2-setup.c
18 +++ linux-2.6.24.7/arch/arm/mach-ixp4xx/nslu2-setup.c
20 #include <linux/serial.h>
21 #include <linux/serial_8250.h>
22 #include <linux/leds.h>
23 +#include <linux/i2c.h>
24 #include <linux/i2c-gpio.h>
26 #include <asm/mach-types.h>
27 @@ -47,6 +48,12 @@ static struct i2c_gpio_platform_data nsl
28 .scl_pin = NSLU2_SCL_PIN,
31 +static struct i2c_board_info __initdata nslu2_i2c_board_info [] = {
33 + I2C_BOARD_INFO("rtc-x1205", 0x6f),
37 #ifdef CONFIG_LEDS_IXP4XX
38 static struct resource nslu2_led_resources[] = {
40 @@ -183,6 +190,9 @@ static void __init nslu2_init(void)
42 pm_power_off = nslu2_power_off;
44 + i2c_register_board_info(0, nslu2_i2c_board_info,
45 + ARRAY_SIZE(nslu2_i2c_board_info));
48 * This is only useful on a modified machine, but it is valuable
49 * to have it first in order to see debug messages, and so that
50 Index: linux-2.6.24.7/arch/arm/mach-ixp4xx/nas100d-setup.c
51 ===================================================================
52 --- linux-2.6.24.7.orig/arch/arm/mach-ixp4xx/nas100d-setup.c
53 +++ linux-2.6.24.7/arch/arm/mach-ixp4xx/nas100d-setup.c
55 #include <linux/serial.h>
56 #include <linux/serial_8250.h>
57 #include <linux/leds.h>
58 +#include <linux/i2c.h>
59 #include <linux/i2c-gpio.h>
61 #include <asm/mach-types.h>
62 @@ -39,6 +40,12 @@ static struct platform_device nas100d_fl
63 .resource = &nas100d_flash_resource,
66 +static struct i2c_board_info __initdata nas100d_i2c_board_info [] = {
68 + I2C_BOARD_INFO("rtc-pcf8563", 0x51),
72 #ifdef CONFIG_LEDS_IXP4XX
73 static struct resource nas100d_led_resources[] = {
75 @@ -157,6 +164,9 @@ static void __init nas100d_init(void)
77 pm_power_off = nas100d_power_off;
79 + i2c_register_board_info(0, nas100d_i2c_board_info,
80 + ARRAY_SIZE(nas100d_i2c_board_info));
83 * This is only useful on a modified machine, but it is valuable
84 * to have it first in order to see debug messages, and so that
85 Index: linux-2.6.24.7/arch/arm/mach-ixp4xx/dsmg600-setup.c
86 ===================================================================
87 --- linux-2.6.24.7.orig/arch/arm/mach-ixp4xx/dsmg600-setup.c
88 +++ linux-2.6.24.7/arch/arm/mach-ixp4xx/dsmg600-setup.c
90 #include <linux/kernel.h>
91 #include <linux/serial.h>
92 #include <linux/serial_8250.h>
93 +#include <linux/i2c.h>
94 #include <linux/i2c-gpio.h>
96 #include <asm/mach-types.h>
97 @@ -51,6 +52,12 @@ static struct platform_device dsmg600_i2
101 +static struct i2c_board_info __initdata dsmg600_i2c_board_info [] = {
103 + I2C_BOARD_INFO("rtc-pcf8563", 0x51),
107 #ifdef CONFIG_LEDS_CLASS
108 static struct resource dsmg600_led_resources[] = {
110 @@ -158,6 +165,9 @@ static void __init dsmg600_init(void)
112 pm_power_off = dsmg600_power_off;
114 + i2c_register_board_info(0, dsmg600_i2c_board_info,
115 + ARRAY_SIZE(dsmg600_i2c_board_info));
117 /* The UART is required on the DSM-G600 (Redboot cannot use the
118 * NIC) -- do it here so that it does *not* get removed if
119 * platform_add_devices fails!