summaryrefslogtreecommitdiffstats
path: root/target/linux/ixp4xx/patches-2.6.24/020-ixp4xx_rtc_info.patch
blob: 60a3c28c1da7ee17be397ab97759927e4ac7780f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
From 88721db37ead2212a54c1392e2e65bae78d2604b Mon Sep 17 00:00:00 2001
From: Rod Whitby <rod@whitby.id.au>
Date: Tue, 29 Jan 2008 10:05:48 +1030
Subject: ixp4xx: Register nslu2 rtc i2c_board_info (Patch #4772)

Register the i2c board info related to the RTC chip on the nslu2 board
to allow it to be found automatically on boot.

Signed-off-by: Rod Whitby <rod@whitby.id.au>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>

PATCH FOLLOWS
KernelVersion: 2.6.24-git5

Index: linux-2.6.24.7/arch/arm/mach-ixp4xx/nslu2-setup.c
===================================================================
--- linux-2.6.24.7.orig/arch/arm/mach-ixp4xx/nslu2-setup.c
+++ linux-2.6.24.7/arch/arm/mach-ixp4xx/nslu2-setup.c
@@ -18,6 +18,7 @@
 #include <linux/serial.h>
 #include <linux/serial_8250.h>
 #include <linux/leds.h>
+#include <linux/i2c.h>
 #include <linux/i2c-gpio.h>
 
 #include <asm/mach-types.h>
@@ -47,6 +48,12 @@ static struct i2c_gpio_platform_data nsl
 	.scl_pin		= NSLU2_SCL_PIN,
 };
 
+static struct i2c_board_info __initdata nslu2_i2c_board_info [] = {
+	{
+		I2C_BOARD_INFO("rtc-x1205", 0x6f),
+	},
+};
+
 #ifdef CONFIG_LEDS_IXP4XX
 static struct resource nslu2_led_resources[] = {
 	{
@@ -183,6 +190,9 @@ static void __init nslu2_init(void)
 
 	pm_power_off = nslu2_power_off;
 
+	i2c_register_board_info(0, nslu2_i2c_board_info,
+				ARRAY_SIZE(nslu2_i2c_board_info));
+
 	/*
 	 * This is only useful on a modified machine, but it is valuable
 	 * to have it first in order to see debug messages, and so that
Index: linux-2.6.24.7/arch/arm/mach-ixp4xx/nas100d-setup.c
===================================================================
--- linux-2.6.24.7.orig/arch/arm/mach-ixp4xx/nas100d-setup.c
+++ linux-2.6.24.7/arch/arm/mach-ixp4xx/nas100d-setup.c
@@ -16,6 +16,7 @@
 #include <linux/serial.h>
 #include <linux/serial_8250.h>
 #include <linux/leds.h>
+#include <linux/i2c.h>
 #include <linux/i2c-gpio.h>
 
 #include <asm/mach-types.h>
@@ -39,6 +40,12 @@ static struct platform_device nas100d_fl
 	.resource		= &nas100d_flash_resource,
 };
 
+static struct i2c_board_info __initdata nas100d_i2c_board_info [] = {
+	{
+		I2C_BOARD_INFO("rtc-pcf8563", 0x51),
+	},
+};
+
 #ifdef CONFIG_LEDS_IXP4XX
 static struct resource nas100d_led_resources[] = {
 	{
@@ -157,6 +164,9 @@ static void __init nas100d_init(void)
 
 	pm_power_off = nas100d_power_off;
 
+	i2c_register_board_info(0, nas100d_i2c_board_info,
+				ARRAY_SIZE(nas100d_i2c_board_info));
+
 	/*
 	 * This is only useful on a modified machine, but it is valuable
 	 * to have it first in order to see debug messages, and so that
Index: linux-2.6.24.7/arch/arm/mach-ixp4xx/dsmg600-setup.c
===================================================================
--- linux-2.6.24.7.orig/arch/arm/mach-ixp4xx/dsmg600-setup.c
+++ linux-2.6.24.7/arch/arm/mach-ixp4xx/dsmg600-setup.c
@@ -14,6 +14,7 @@
 #include <linux/kernel.h>
 #include <linux/serial.h>
 #include <linux/serial_8250.h>
+#include <linux/i2c.h>
 #include <linux/i2c-gpio.h>
 
 #include <asm/mach-types.h>
@@ -51,6 +52,12 @@ static struct platform_device dsmg600_i2
 	},
 };
 
+static struct i2c_board_info __initdata dsmg600_i2c_board_info [] = {
+	{
+		I2C_BOARD_INFO("rtc-pcf8563", 0x51),
+	},
+};
+
 #ifdef CONFIG_LEDS_CLASS
 static struct resource dsmg600_led_resources[] = {
 	{
@@ -158,6 +165,9 @@ static void __init dsmg600_init(void)
 
 	pm_power_off = dsmg600_power_off;
 
+	i2c_register_board_info(0, dsmg600_i2c_board_info,
+				ARRAY_SIZE(dsmg600_i2c_board_info));
+
 	/* The UART is required on the DSM-G600 (Redboot cannot use the
 	 * NIC) -- do it here so that it does *not* get removed if
 	 * platform_add_devices fails!