strip the kernel version suffix from target directories, except for brcm-2.4 (the...
[openwrt/staging/florian.git] / target / linux / ixp4xx / patches / 080-trivial_nslu2_nas100d_cleanup.patch
1 This trivial patch updates the nslu2 and nas-100d headers to
2 remove pointless GPIO defines, and updates nslu2-setup.c
3 accordingly. In addition minor style cleanups to some comments
4 are included.
5
6 Signed-off-by: Michael-Luke Jones <mlj28@cam.ac.uk>
7
8 Index: linux-2.6.21-armeb/arch/arm/mach-ixp4xx/nslu2-setup.c
9 ===================================================================
10 --- linux-2.6.21-armeb.orig/arch/arm/mach-ixp4xx/nslu2-setup.c 2007-05-09 07:32:43.000000000 -0700
11 +++ linux-2.6.21-armeb/arch/arm/mach-ixp4xx/nslu2-setup.c 2007-05-09 07:32:46.000000000 -0700
12 @@ -50,26 +50,26 @@
13 static struct resource nslu2_led_resources[] = {
14 {
15 .name = "ready", /* green led */
16 - .start = NSLU2_LED_GRN,
17 - .end = NSLU2_LED_GRN,
18 + .start = NSLU2_LED_GRN_GPIO,
19 + .end = NSLU2_LED_GRN_GPIO,
20 .flags = IXP4XX_GPIO_HIGH,
21 },
22 {
23 .name = "status", /* red led */
24 - .start = NSLU2_LED_RED,
25 - .end = NSLU2_LED_RED,
26 + .start = NSLU2_LED_RED_GPIO,
27 + .end = NSLU2_LED_RED_GPIO,
28 .flags = IXP4XX_GPIO_HIGH,
29 },
30 {
31 .name = "disk-1",
32 - .start = NSLU2_LED_DISK1,
33 - .end = NSLU2_LED_DISK1,
34 + .start = NSLU2_LED_DISK1_GPIO,
35 + .end = NSLU2_LED_DISK1_GPIO,
36 .flags = IXP4XX_GPIO_LOW,
37 },
38 {
39 .name = "disk-2",
40 - .start = NSLU2_LED_DISK2,
41 - .end = NSLU2_LED_DISK2,
42 + .start = NSLU2_LED_DISK2_GPIO,
43 + .end = NSLU2_LED_DISK2_GPIO,
44 .flags = IXP4XX_GPIO_LOW,
45 },
46 };
47 @@ -181,7 +181,8 @@
48
49 pm_power_off = nslu2_power_off;
50
51 - /* This is only useful on a modified machine, but it is valuable
52 + /*
53 + * This is only useful on a modified machine, but it is valuable
54 * to have it first in order to see debug messages, and so that
55 * it does *not* get removed if platform_add_devices fails!
56 */
57 Index: linux-2.6.21-armeb/include/asm-arm/arch-ixp4xx/nslu2.h
58 ===================================================================
59 --- linux-2.6.21-armeb.orig/include/asm-arm/arch-ixp4xx/nslu2.h 2007-05-09 07:32:43.000000000 -0700
60 +++ linux-2.6.21-armeb/include/asm-arm/arch-ixp4xx/nslu2.h 2007-05-09 07:32:46.000000000 -0700
61 @@ -9,7 +9,7 @@
62 * based on ixdp425.h:
63 * Copyright 2004 (c) MontaVista, Software, Inc.
64 *
65 - * This file is licensed under the terms of the GNU General Public
66 + * This file is licensed under the terms of the GNU General Public
67 * License version 2. This program is licensed "as is" without any
68 * warranty of any kind, whether express or implied.
69 */
70 @@ -34,36 +34,14 @@
71 #define NSLU2_PCI_INTC_PIN 9
72 #define NSLU2_PCI_INTD_PIN 8
73
74 -
75 /* NSLU2 Timer */
76 #define NSLU2_FREQ 66000000
77 -#define NSLU2_CLOCK_TICK_RATE (((NSLU2_FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
78 -#define NSLU2_CLOCK_TICKS_PER_USEC ((NSLU2_CLOCK_TICK_RATE + USEC_PER_SEC/2) / USEC_PER_SEC)
79 -
80 -/* GPIO */
81 -
82 -#define NSLU2_GPIO0 0
83 -#define NSLU2_GPIO1 1
84 -#define NSLU2_GPIO2 2
85 -#define NSLU2_GPIO3 3
86 -#define NSLU2_GPIO4 4
87 -#define NSLU2_GPIO5 5
88 -#define NSLU2_GPIO6 6
89 -#define NSLU2_GPIO7 7
90 -#define NSLU2_GPIO8 8
91 -#define NSLU2_GPIO9 9
92 -#define NSLU2_GPIO10 10
93 -#define NSLU2_GPIO11 11
94 -#define NSLU2_GPIO12 12
95 -#define NSLU2_GPIO13 13
96 -#define NSLU2_GPIO14 14
97 -#define NSLU2_GPIO15 15
98
99 /* Buttons */
100
101 -#define NSLU2_PB_GPIO NSLU2_GPIO5
102 -#define NSLU2_PO_GPIO NSLU2_GPIO8 /* power off */
103 -#define NSLU2_RB_GPIO NSLU2_GPIO12
104 +#define NSLU2_PB_GPIO 5
105 +#define NSLU2_PO_GPIO 8 /* power off */
106 +#define NSLU2_RB_GPIO 12
107
108 #define NSLU2_PB_IRQ IRQ_IXP4XX_GPIO5
109 #define NSLU2_RB_IRQ IRQ_IXP4XX_GPIO12
110 @@ -79,16 +57,16 @@
111
112 /* LEDs */
113
114 -#define NSLU2_LED_RED NSLU2_GPIO0
115 -#define NSLU2_LED_GRN NSLU2_GPIO1
116 +#define NSLU2_LED_RED_GPIO 0
117 +#define NSLU2_LED_GRN_GPIO 1
118
119 -#define NSLU2_LED_RED_BM (1L << NSLU2_LED_RED)
120 -#define NSLU2_LED_GRN_BM (1L << NSLU2_LED_GRN)
121 +#define NSLU2_LED_RED_BM (1L << NSLU2_LED_RED_GPIO)
122 +#define NSLU2_LED_GRN_BM (1L << NSLU2_LED_GRN_GPIO)
123
124 -#define NSLU2_LED_DISK1 NSLU2_GPIO3
125 -#define NSLU2_LED_DISK2 NSLU2_GPIO2
126 +#define NSLU2_LED_DISK1_GPIO 3
127 +#define NSLU2_LED_DISK2_GPIO 2
128
129 -#define NSLU2_LED_DISK1_BM (1L << NSLU2_GPIO2)
130 -#define NSLU2_LED_DISK2_BM (1L << NSLU2_GPIO3)
131 +#define NSLU2_LED_DISK1_BM (1L << NSLU2_LED_DISK1_GPIO)
132 +#define NSLU2_LED_DISK2_BM (1L << NSLU2_LED_DISK2_GPIO)
133
134
135 Index: linux-2.6.21-armeb/include/asm-arm/arch-ixp4xx/nas100d.h
136 ===================================================================
137 --- linux-2.6.21-armeb.orig/include/asm-arm/arch-ixp4xx/nas100d.h 2007-04-25 20:08:32.000000000 -0700
138 +++ linux-2.6.21-armeb/include/asm-arm/arch-ixp4xx/nas100d.h 2007-05-09 07:34:14.000000000 -0700
139 @@ -10,7 +10,7 @@
140 * based on ixdp425.h:
141 * Copyright 2004 (c) MontaVista, Software, Inc.
142 *
143 - * This file is licensed under the terms of the GNU General Public
144 + * This file is licensed under the terms of the GNU General Public
145 * License version 2. This program is licensed "as is" without any
146 * warranty of any kind, whether express or implied.
147 */
148 @@ -36,31 +36,11 @@
149 #define NAS100D_PCI_INTD_PIN 8
150 #define NAS100D_PCI_INTE_PIN 7
151
152 -/* GPIO */
153 -
154 -#define NAS100D_GPIO0 0
155 -#define NAS100D_GPIO1 1
156 -#define NAS100D_GPIO2 2
157 -#define NAS100D_GPIO3 3
158 -#define NAS100D_GPIO4 4
159 -#define NAS100D_GPIO5 5
160 -#define NAS100D_GPIO6 6
161 -#define NAS100D_GPIO7 7
162 -#define NAS100D_GPIO8 8
163 -#define NAS100D_GPIO9 9
164 -#define NAS100D_GPIO10 10
165 -#define NAS100D_GPIO11 11
166 -#define NAS100D_GPIO12 12
167 -#define NAS100D_GPIO13 13
168 -#define NAS100D_GPIO14 14
169 -#define NAS100D_GPIO15 15
170 -
171 -
172 /* Buttons */
173
174 -#define NAS100D_PB_GPIO NAS100D_GPIO14
175 -#define NAS100D_RB_GPIO NAS100D_GPIO4
176 -#define NAS100D_PO_GPIO NAS100D_GPIO12 /* power off */
177 +#define NAS100D_PB_GPIO 14
178 +#define NAS100D_RB_GPIO 4
179 +#define NAS100D_PO_GPIO 12 /* power off */
180
181 #define NAS100D_PB_IRQ IRQ_IXP4XX_GPIO14
182 #define NAS100D_RB_IRQ IRQ_IXP4XX_GPIO4
183 Index: linux-2.6.21-armeb/arch/arm/mach-ixp4xx/nas100d-setup.c
184 ===================================================================
185 --- linux-2.6.21-armeb.orig/arch/arm/mach-ixp4xx/nas100d-setup.c 2007-05-09 07:32:43.000000000 -0700
186 +++ linux-2.6.21-armeb/arch/arm/mach-ixp4xx/nas100d-setup.c 2007-05-09 07:34:55.000000000 -0700
187 @@ -155,7 +155,8 @@
188
189 pm_power_off = nas100d_power_off;
190
191 - /* This is only useful on a modified machine, but it is valuable
192 + /*
193 + * This is only useful on a modified machine, but it is valuable
194 * to have it first in order to see debug messages, and so that
195 * it does *not* get removed if platform_add_devices fails!
196 */