aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-01-12 05:25:29 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-02-09 10:34:12 -0500
commita181099e2f74dffe45487704cf0e97fd007b2628 (patch)
tree38c878a8ae203240971fb1b7b89c696fbf4c435a /arch
parent80ea2065e186d8d69b617770ae7fe51dfea6ba90 (diff)
ARM: sa11x0: convert to use DEFINE_RES_xxx macros
Convert StrongARM-11x0 platforms and core SoC code to use the DEFINE_RES_xxx macros. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-sa1100/assabet.c11
-rw-r--r--arch/arm/mach-sa1100/badge4.c19
-rw-r--r--arch/arm/mach-sa1100/cerf.c13
-rw-r--r--arch/arm/mach-sa1100/collie.c24
-rw-r--r--arch/arm/mach-sa1100/generic.c93
-rw-r--r--arch/arm/mach-sa1100/h3xxx.c13
-rw-r--r--arch/arm/mach-sa1100/hackkit.c7
-rw-r--r--arch/arm/mach-sa1100/irq.c7
-rw-r--r--arch/arm/mach-sa1100/jornada720.c31
-rw-r--r--arch/arm/mach-sa1100/nanoengine.c11
-rw-r--r--arch/arm/mach-sa1100/neponset.c39
-rw-r--r--arch/arm/mach-sa1100/pci-nanoengine.c8
-rw-r--r--arch/arm/mach-sa1100/pleb.c24
-rw-r--r--arch/arm/mach-sa1100/shannon.c7
-rw-r--r--arch/arm/mach-sa1100/simpad.c11
15 files changed, 61 insertions, 257 deletions
diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c
index 0c4b76ab4d8e..642f3b3df215 100644
--- a/arch/arm/mach-sa1100/assabet.c
+++ b/arch/arm/mach-sa1100/assabet.c
@@ -152,15 +152,8 @@ static struct flash_platform_data assabet_flash_data = {
152}; 152};
153 153
154static struct resource assabet_flash_resources[] = { 154static struct resource assabet_flash_resources[] = {
155 { 155 DEFINE_RES_MEM(SA1100_CS0_PHYS, SZ_32M),
156 .start = SA1100_CS0_PHYS, 156 DEFINE_RES_MEM(SA1100_CS1_PHYS, SZ_32M),
157 .end = SA1100_CS0_PHYS + SZ_32M - 1,
158 .flags = IORESOURCE_MEM,
159 }, {
160 .start = SA1100_CS1_PHYS,
161 .end = SA1100_CS1_PHYS + SZ_32M - 1,
162 .flags = IORESOURCE_MEM,
163 }
164}; 157};
165 158
166 159
diff --git a/arch/arm/mach-sa1100/badge4.c b/arch/arm/mach-sa1100/badge4.c
index b07a2c024cb7..ce2dbdf4ba1a 100644
--- a/arch/arm/mach-sa1100/badge4.c
+++ b/arch/arm/mach-sa1100/badge4.c
@@ -39,16 +39,8 @@
39#include "generic.h" 39#include "generic.h"
40 40
41static struct resource sa1111_resources[] = { 41static struct resource sa1111_resources[] = {
42 [0] = { 42 [0] = DEFINE_RES_MEM(BADGE4_SA1111_BASE, 0x2000),
43 .start = BADGE4_SA1111_BASE, 43 [1] = DEFINE_RES_IRQ(BADGE4_IRQ_GPIO_SA1111),
44 .end = BADGE4_SA1111_BASE + 0x00001fff,
45 .flags = IORESOURCE_MEM,
46 },
47 [1] = {
48 .start = BADGE4_IRQ_GPIO_SA1111,
49 .end = BADGE4_IRQ_GPIO_SA1111,
50 .flags = IORESOURCE_IRQ,
51 },
52}; 44};
53 45
54static struct sa1111_platform_data sa1111_info = { 46static struct sa1111_platform_data sa1111_info = {
@@ -121,11 +113,8 @@ static struct flash_platform_data badge4_flash_data = {
121 .nr_parts = ARRAY_SIZE(badge4_partitions), 113 .nr_parts = ARRAY_SIZE(badge4_partitions),
122}; 114};
123 115
124static struct resource badge4_flash_resource = { 116static struct resource badge4_flash_resource =
125 .start = SA1100_CS0_PHYS, 117 DEFINE_RES_MEM(SA1100_CS0_PHYS, SZ_64M);
126 .end = SA1100_CS0_PHYS + SZ_64M - 1,
127 .flags = IORESOURCE_MEM,
128};
129 118
130static int five_v_on __initdata = 0; 119static int five_v_on __initdata = 0;
131 120
diff --git a/arch/arm/mach-sa1100/cerf.c b/arch/arm/mach-sa1100/cerf.c
index 11bb6d0b9be3..c2f9ba3a9578 100644
--- a/arch/arm/mach-sa1100/cerf.c
+++ b/arch/arm/mach-sa1100/cerf.c
@@ -33,11 +33,7 @@
33#include "generic.h" 33#include "generic.h"
34 34
35static struct resource cerfuart2_resources[] = { 35static struct resource cerfuart2_resources[] = {
36 [0] = { 36 [0] = DEFINE_RES_MEM(0x80030000, SZ_64K),
37 .start = 0x80030000,
38 .end = 0x8003ffff,
39 .flags = IORESOURCE_MEM,
40 },
41}; 37};
42 38
43static struct platform_device cerfuart2_device = { 39static struct platform_device cerfuart2_device = {
@@ -87,11 +83,8 @@ static struct flash_platform_data cerf_flash_data = {
87 .nr_parts = ARRAY_SIZE(cerf_partitions), 83 .nr_parts = ARRAY_SIZE(cerf_partitions),
88}; 84};
89 85
90static struct resource cerf_flash_resource = { 86static struct resource cerf_flash_resource =
91 .start = SA1100_CS0_PHYS, 87 DEFINE_RES_MEM(SA1100_CS0_PHYS, SZ_32M);
92 .end = SA1100_CS0_PHYS + SZ_32M - 1,
93 .flags = IORESOURCE_MEM,
94};
95 88
96static void __init cerf_init_irq(void) 89static void __init cerf_init_irq(void)
97{ 90{
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
index fd5652118ed1..dbe5cf719f7e 100644
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -48,11 +48,7 @@
48#include "generic.h" 48#include "generic.h"
49 49
50static struct resource collie_scoop_resources[] = { 50static struct resource collie_scoop_resources[] = {
51 [0] = { 51 [0] = DEFINE_RES_MEM(0x40800000, SZ_4K),
52 .start = 0x40800000,
53 .end = 0x40800fff,
54 .flags = IORESOURCE_MEM,
55 },
56}; 52};
57 53
58static struct scoop_config collie_scoop_setup = { 54static struct scoop_config collie_scoop_setup = {
@@ -221,16 +217,8 @@ device_initcall(collie_uart_init);
221 217
222 218
223static struct resource locomo_resources[] = { 219static struct resource locomo_resources[] = {
224 [0] = { 220 [0] = DEFINE_RES_MEM(0x40000000, SZ_8K),
225 .start = 0x40000000, 221 [1] = DEFINE_RES_IRQ(IRQ_GPIO25),
226 .end = 0x40001fff,
227 .flags = IORESOURCE_MEM,
228 },
229 [1] = {
230 .start = IRQ_GPIO25,
231 .end = IRQ_GPIO25,
232 .flags = IORESOURCE_IRQ,
233 },
234}; 222};
235 223
236static struct locomo_platform_data locomo_info = { 224static struct locomo_platform_data locomo_info = {
@@ -303,11 +291,7 @@ static struct flash_platform_data collie_flash_data = {
303}; 291};
304 292
305static struct resource collie_flash_resources[] = { 293static struct resource collie_flash_resources[] = {
306 { 294 DEFINE_RES_MEM(SA1100_CS0_PHYS, SZ_32M),
307 .start = SA1100_CS0_PHYS,
308 .end = SA1100_CS0_PHYS + SZ_32M - 1,
309 .flags = IORESOURCE_MEM,
310 }
311}; 295};
312 296
313static void __init collie_init(void) 297static void __init collie_init(void)
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c
index 0e356bb89fb7..2b33b4597468 100644
--- a/arch/arm/mach-sa1100/generic.c
+++ b/arch/arm/mach-sa1100/generic.c
@@ -149,16 +149,8 @@ static void sa11x0_register_device(struct platform_device *dev, void *data)
149 149
150 150
151static struct resource sa11x0udc_resources[] = { 151static struct resource sa11x0udc_resources[] = {
152 [0] = { 152 [0] = DEFINE_RES_MEM(__PREG(Ser0UDCCR), SZ_64K),
153 .start = __PREG(Ser0UDCCR), 153 [1] = DEFINE_RES_IRQ(IRQ_Ser0UDC),
154 .end = __PREG(Ser0UDCCR) + 0xffff,
155 .flags = IORESOURCE_MEM,
156 },
157 [1] = {
158 .start = IRQ_Ser0UDC,
159 .end = IRQ_Ser0UDC,
160 .flags = IORESOURCE_IRQ,
161 },
162}; 154};
163 155
164static u64 sa11x0udc_dma_mask = 0xffffffffUL; 156static u64 sa11x0udc_dma_mask = 0xffffffffUL;
@@ -175,16 +167,8 @@ static struct platform_device sa11x0udc_device = {
175}; 167};
176 168
177static struct resource sa11x0uart1_resources[] = { 169static struct resource sa11x0uart1_resources[] = {
178 [0] = { 170 [0] = DEFINE_RES_MEM(__PREG(Ser1UTCR0), SZ_64K),
179 .start = __PREG(Ser1UTCR0), 171 [1] = DEFINE_RES_IRQ(IRQ_Ser1UART),
180 .end = __PREG(Ser1UTCR0) + 0xffff,
181 .flags = IORESOURCE_MEM,
182 },
183 [1] = {
184 .start = IRQ_Ser1UART,
185 .end = IRQ_Ser1UART,
186 .flags = IORESOURCE_IRQ,
187 },
188}; 172};
189 173
190static struct platform_device sa11x0uart1_device = { 174static struct platform_device sa11x0uart1_device = {
@@ -195,16 +179,8 @@ static struct platform_device sa11x0uart1_device = {
195}; 179};
196 180
197static struct resource sa11x0uart3_resources[] = { 181static struct resource sa11x0uart3_resources[] = {
198 [0] = { 182 [0] = DEFINE_RES_MEM(__PREG(Ser3UTCR0), SZ_64K),
199 .start = __PREG(Ser3UTCR0), 183 [1] = DEFINE_RES_IRQ(IRQ_Ser3UART),
200 .end = __PREG(Ser3UTCR0) + 0xffff,
201 .flags = IORESOURCE_MEM,
202 },
203 [1] = {
204 .start = IRQ_Ser3UART,
205 .end = IRQ_Ser3UART,
206 .flags = IORESOURCE_IRQ,
207 },
208}; 184};
209 185
210static struct platform_device sa11x0uart3_device = { 186static struct platform_device sa11x0uart3_device = {
@@ -215,16 +191,8 @@ static struct platform_device sa11x0uart3_device = {
215}; 191};
216 192
217static struct resource sa11x0mcp_resources[] = { 193static struct resource sa11x0mcp_resources[] = {
218 [0] = { 194 [0] = DEFINE_RES_MEM(__PREG(Ser4MCCR0), SZ_64K),
219 .start = __PREG(Ser4MCCR0), 195 [1] = DEFINE_RES_IRQ(IRQ_Ser4MCP),
220 .end = __PREG(Ser4MCCR0) + 0xffff,
221 .flags = IORESOURCE_MEM,
222 },
223 [1] = {
224 .start = IRQ_Ser4MCP,
225 .end = IRQ_Ser4MCP,
226 .flags = IORESOURCE_IRQ,
227 },
228}; 196};
229 197
230static u64 sa11x0mcp_dma_mask = 0xffffffffUL; 198static u64 sa11x0mcp_dma_mask = 0xffffffffUL;
@@ -246,16 +214,8 @@ void sa11x0_register_mcp(struct mcp_plat_data *data)
246} 214}
247 215
248static struct resource sa11x0ssp_resources[] = { 216static struct resource sa11x0ssp_resources[] = {
249 [0] = { 217 [0] = DEFINE_RES_MEM(0x80070000, SZ_64K),
250 .start = 0x80070000, 218 [1] = DEFINE_RES_IRQ(IRQ_Ser4SSP),
251 .end = 0x8007ffff,
252 .flags = IORESOURCE_MEM,
253 },
254 [1] = {
255 .start = IRQ_Ser4SSP,
256 .end = IRQ_Ser4SSP,
257 .flags = IORESOURCE_IRQ,
258 },
259}; 219};
260 220
261static u64 sa11x0ssp_dma_mask = 0xffffffffUL; 221static u64 sa11x0ssp_dma_mask = 0xffffffffUL;
@@ -272,16 +232,8 @@ static struct platform_device sa11x0ssp_device = {
272}; 232};
273 233
274static struct resource sa11x0fb_resources[] = { 234static struct resource sa11x0fb_resources[] = {
275 [0] = { 235 [0] = DEFINE_RES_MEM(0xb0100000, SZ_64K),
276 .start = 0xb0100000, 236 [1] = DEFINE_RES_IRQ(IRQ_LCD),
277 .end = 0xb010ffff,
278 .flags = IORESOURCE_MEM,
279 },
280 [1] = {
281 .start = IRQ_LCD,
282 .end = IRQ_LCD,
283 .flags = IORESOURCE_IRQ,
284 },
285}; 237};
286 238
287static struct platform_device sa11x0fb_device = { 239static struct platform_device sa11x0fb_device = {
@@ -314,23 +266,10 @@ void sa11x0_register_mtd(struct flash_platform_data *flash,
314} 266}
315 267
316static struct resource sa11x0ir_resources[] = { 268static struct resource sa11x0ir_resources[] = {
317 { 269 DEFINE_RES_MEM(__PREG(Ser2UTCR0), 0x24),
318 .start = __PREG(Ser2UTCR0), 270 DEFINE_RES_MEM(__PREG(Ser2HSCR0), 0x1c),
319 .end = __PREG(Ser2UTCR0) + 0x24 - 1, 271 DEFINE_RES_MEM(__PREG(Ser2HSCR2), 0x04),
320 .flags = IORESOURCE_MEM, 272 DEFINE_RES_IRQ(IRQ_Ser2ICP),
321 }, {
322 .start = __PREG(Ser2HSCR0),
323 .end = __PREG(Ser2HSCR0) + 0x1c - 1,
324 .flags = IORESOURCE_MEM,
325 }, {
326 .start = __PREG(Ser2HSCR2),
327 .end = __PREG(Ser2HSCR2) + 0x04 - 1,
328 .flags = IORESOURCE_MEM,
329 }, {
330 .start = IRQ_Ser2ICP,
331 .end = IRQ_Ser2ICP,
332 .flags = IORESOURCE_IRQ,
333 }
334}; 273};
335 274
336static struct platform_device sa11x0ir_device = { 275static struct platform_device sa11x0ir_device = {
diff --git a/arch/arm/mach-sa1100/h3xxx.c b/arch/arm/mach-sa1100/h3xxx.c
index b0784c974c2d..63150e1ffe9e 100644
--- a/arch/arm/mach-sa1100/h3xxx.c
+++ b/arch/arm/mach-sa1100/h3xxx.c
@@ -109,11 +109,8 @@ static struct flash_platform_data h3xxx_flash_data = {
109 .nr_parts = ARRAY_SIZE(h3xxx_partitions), 109 .nr_parts = ARRAY_SIZE(h3xxx_partitions),
110}; 110};
111 111
112static struct resource h3xxx_flash_resource = { 112static struct resource h3xxx_flash_resource =
113 .start = SA1100_CS0_PHYS, 113 DEFINE_RES_MEM(SA1100_CS0_PHYS, SZ_32M);
114 .end = SA1100_CS0_PHYS + SZ_32M - 1,
115 .flags = IORESOURCE_MEM,
116};
117 114
118 115
119/* 116/*
@@ -186,11 +183,7 @@ static struct sa1100_port_fns h3xxx_port_fns __initdata = {
186 */ 183 */
187 184
188static struct resource egpio_resources[] = { 185static struct resource egpio_resources[] = {
189 [0] = { 186 [0] = DEFINE_RES_MEM(H3600_EGPIO_PHYS, 0x4),
190 .start = H3600_EGPIO_PHYS,
191 .end = H3600_EGPIO_PHYS + 0x4 - 1,
192 .flags = IORESOURCE_MEM,
193 },
194}; 187};
195 188
196static struct htc_egpio_chip egpio_chips[] = { 189static struct htc_egpio_chip egpio_chips[] = {
diff --git a/arch/arm/mach-sa1100/hackkit.c b/arch/arm/mach-sa1100/hackkit.c
index 9092b3aff534..37d381ad5464 100644
--- a/arch/arm/mach-sa1100/hackkit.c
+++ b/arch/arm/mach-sa1100/hackkit.c
@@ -179,11 +179,8 @@ static struct flash_platform_data hackkit_flash_data = {
179 .nr_parts = ARRAY_SIZE(hackkit_partitions), 179 .nr_parts = ARRAY_SIZE(hackkit_partitions),
180}; 180};
181 181
182static struct resource hackkit_flash_resource = { 182static struct resource hackkit_flash_resource =
183 .start = SA1100_CS0_PHYS, 183 DEFINE_RES_MEM(SA1100_CS0_PHYS, SZ_32M);
184 .end = SA1100_CS0_PHYS + SZ_32M - 1,
185 .flags = IORESOURCE_MEM,
186};
187 184
188static void __init hackkit_init(void) 185static void __init hackkit_init(void)
189{ 186{
diff --git a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c
index dfbf824a69fa..5d12a305f53e 100644
--- a/arch/arm/mach-sa1100/irq.c
+++ b/arch/arm/mach-sa1100/irq.c
@@ -221,11 +221,8 @@ static struct irq_chip sa1100_normal_chip = {
221 .irq_set_wake = sa1100_set_wake, 221 .irq_set_wake = sa1100_set_wake,
222}; 222};
223 223
224static struct resource irq_resource = { 224static struct resource irq_resource =
225 .name = "irqs", 225 DEFINE_RES_MEM_NAMED(0x90050000, SZ_64K, "irqs");
226 .start = 0x90050000,
227 .end = 0x9005ffff,
228};
229 226
230static struct sa1100irq_state { 227static struct sa1100irq_state {
231 unsigned int saved; 228 unsigned int saved;
diff --git a/arch/arm/mach-sa1100/jornada720.c b/arch/arm/mach-sa1100/jornada720.c
index 5393b06ee2d2..8512cfcc0d9b 100644
--- a/arch/arm/mach-sa1100/jornada720.c
+++ b/arch/arm/mach-sa1100/jornada720.c
@@ -174,16 +174,8 @@ static struct s1d13xxxfb_pdata s1d13xxxfb_data = {
174}; 174};
175 175
176static struct resource s1d13xxxfb_resources[] = { 176static struct resource s1d13xxxfb_resources[] = {
177 [0] = { 177 [0] = DEFINE_RES_MEM(EPSONFBSTART, EPSONFBLEN),
178 .start = EPSONFBSTART, 178 [1] = DEFINE_RES_MEM(EPSONREGSTART, EPSONREGLEN),
179 .end = EPSONFBSTART + EPSONFBLEN - 1,
180 .flags = IORESOURCE_MEM,
181 },
182 [1] = {
183 .start = EPSONREGSTART,
184 .end = EPSONREGSTART + EPSONREGLEN - 1,
185 .flags = IORESOURCE_MEM,
186 }
187}; 179};
188 180
189static struct platform_device s1d13xxxfb_device = { 181static struct platform_device s1d13xxxfb_device = {
@@ -197,16 +189,8 @@ static struct platform_device s1d13xxxfb_device = {
197}; 189};
198 190
199static struct resource sa1111_resources[] = { 191static struct resource sa1111_resources[] = {
200 [0] = { 192 [0] = DEFINE_RES_MEM(SA1111REGSTART, SA1111REGLEN),
201 .start = SA1111REGSTART, 193 [1] = DEFINE_RES_IRQ(IRQ_GPIO1),
202 .end = SA1111REGSTART + SA1111REGLEN - 1,
203 .flags = IORESOURCE_MEM,
204 },
205 [1] = {
206 .start = IRQ_GPIO1,
207 .end = IRQ_GPIO1,
208 .flags = IORESOURCE_IRQ,
209 },
210}; 194};
211 195
212static struct sa1111_platform_data sa1111_info = { 196static struct sa1111_platform_data sa1111_info = {
@@ -352,11 +336,8 @@ static struct flash_platform_data jornada720_flash_data = {
352 .nr_parts = ARRAY_SIZE(jornada720_partitions), 336 .nr_parts = ARRAY_SIZE(jornada720_partitions),
353}; 337};
354 338
355static struct resource jornada720_flash_resource = { 339static struct resource jornada720_flash_resource =
356 .start = SA1100_CS0_PHYS, 340 DEFINE_RES_MEM(SA1100_CS0_PHYS, SZ_32M);
357 .end = SA1100_CS0_PHYS + SZ_32M - 1,
358 .flags = IORESOURCE_MEM,
359};
360 341
361static void __init jornada720_mach_init(void) 342static void __init jornada720_mach_init(void)
362{ 343{
diff --git a/arch/arm/mach-sa1100/nanoengine.c b/arch/arm/mach-sa1100/nanoengine.c
index 85f6ee672225..3923911000de 100644
--- a/arch/arm/mach-sa1100/nanoengine.c
+++ b/arch/arm/mach-sa1100/nanoengine.c
@@ -58,15 +58,8 @@ static struct flash_platform_data nanoengine_flash_data = {
58}; 58};
59 59
60static struct resource nanoengine_flash_resources[] = { 60static struct resource nanoengine_flash_resources[] = {
61 { 61 DEFINE_RES_MEM(SA1100_CS0_PHYS, SZ_32M),
62 .start = SA1100_CS0_PHYS, 62 DEFINE_RES_MEM(SA1100_CS1_PHYS, SZ_32M),
63 .end = SA1100_CS0_PHYS + SZ_32M - 1,
64 .flags = IORESOURCE_MEM,
65 }, {
66 .start = SA1100_CS1_PHYS,
67 .end = SA1100_CS1_PHYS + SZ_32M - 1,
68 .flags = IORESOURCE_MEM,
69 }
70}; 63};
71 64
72static struct map_desc nanoengine_io_desc[] __initdata = { 65static struct map_desc nanoengine_io_desc[] __initdata = {
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c
index b4fa53a1427e..abbe859b265d 100644
--- a/arch/arm/mach-sa1100/neponset.c
+++ b/arch/arm/mach-sa1100/neponset.c
@@ -213,11 +213,7 @@ static struct platform_driver neponset_device_driver = {
213}; 213};
214 214
215static struct resource neponset_resources[] = { 215static struct resource neponset_resources[] = {
216 [0] = { 216 [0] = DEFINE_RES_MEM(0x10000000, 0x08000000),
217 .start = 0x10000000,
218 .end = 0x17ffffff,
219 .flags = IORESOURCE_MEM,
220 },
221}; 217};
222 218
223static struct platform_device neponset_device = { 219static struct platform_device neponset_device = {
@@ -228,16 +224,8 @@ static struct platform_device neponset_device = {
228}; 224};
229 225
230static struct resource sa1111_resources[] = { 226static struct resource sa1111_resources[] = {
231 [0] = { 227 [0] = DEFINE_RES_MEM(0x40000000, SZ_8K),
232 .start = 0x40000000, 228 [1] = DEFINE_RES_IRQ(IRQ_NEPONSET_SA1111),
233 .end = 0x40001fff,
234 .flags = IORESOURCE_MEM,
235 },
236 [1] = {
237 .start = IRQ_NEPONSET_SA1111,
238 .end = IRQ_NEPONSET_SA1111,
239 .flags = IORESOURCE_IRQ,
240 },
241}; 229};
242 230
243static struct sa1111_platform_data sa1111_info = { 231static struct sa1111_platform_data sa1111_info = {
@@ -259,23 +247,10 @@ static struct platform_device sa1111_device = {
259}; 247};
260 248
261static struct resource smc91x_resources[] = { 249static struct resource smc91x_resources[] = {
262 [0] = { 250 [0] = DEFINE_RES_MEM_NAMED(SA1100_CS3_PHYS, 0x02000000, "smc91x-regs"),
263 .name = "smc91x-regs", 251 [1] = DEFINE_RES_IRQ(IRQ_NEPONSET_SMC9196),
264 .start = SA1100_CS3_PHYS, 252 [2] = DEFINE_RES_MEM_NAMED(SA1100_CS3_PHYS + 0x02000000,
265 .end = SA1100_CS3_PHYS + 0x01ffffff, 253 0x02000000, "smc91x-attrib"),
266 .flags = IORESOURCE_MEM,
267 },
268 [1] = {
269 .start = IRQ_NEPONSET_SMC9196,
270 .end = IRQ_NEPONSET_SMC9196,
271 .flags = IORESOURCE_IRQ,
272 },
273 [2] = {
274 .name = "smc91x-attrib",
275 .start = SA1100_CS3_PHYS + 0x02000000,
276 .end = SA1100_CS3_PHYS + 0x03ffffff,
277 .flags = IORESOURCE_MEM,
278 },
279}; 254};
280 255
281static struct platform_device smc91x_device = { 256static struct platform_device smc91x_device = {
diff --git a/arch/arm/mach-sa1100/pci-nanoengine.c b/arch/arm/mach-sa1100/pci-nanoengine.c
index 0d01ca788922..41bb018b3103 100644
--- a/arch/arm/mach-sa1100/pci-nanoengine.c
+++ b/arch/arm/mach-sa1100/pci-nanoengine.c
@@ -135,12 +135,8 @@ struct pci_bus * __init pci_nanoengine_scan_bus(int nr, struct pci_sys_data *sys
135 &sys->resources); 135 &sys->resources);
136} 136}
137 137
138static struct resource pci_io_ports = { 138static struct resource pci_io_ports =
139 .name = "PCI IO", 139 DEFINE_RES_IO_NAMED(0x400, 0x400, "PCI IO");
140 .start = 0x400,
141 .end = 0x7FF,
142 .flags = IORESOURCE_IO,
143};
144 140
145static struct resource pci_non_prefetchable_memory = { 141static struct resource pci_non_prefetchable_memory = {
146 .name = "PCI non-prefetchable", 142 .name = "PCI non-prefetchable",
diff --git a/arch/arm/mach-sa1100/pleb.c b/arch/arm/mach-sa1100/pleb.c
index 9307df053533..ca5d33b6041a 100644
--- a/arch/arm/mach-sa1100/pleb.c
+++ b/arch/arm/mach-sa1100/pleb.c
@@ -37,17 +37,9 @@
37#define IRQ_GPIO_ETH0_IRQ IRQ_GPIO21 37#define IRQ_GPIO_ETH0_IRQ IRQ_GPIO21
38 38
39static struct resource smc91x_resources[] = { 39static struct resource smc91x_resources[] = {
40 [0] = { 40 [0] = DEFINE_RES_MEM(PLEB_ETH0_P, 0x04000000),
41 .start = PLEB_ETH0_P,
42 .end = PLEB_ETH0_P | 0x03ffffff,
43 .flags = IORESOURCE_MEM,
44 },
45#if 0 /* Autoprobe instead, to get rising/falling edge characteristic right */ 41#if 0 /* Autoprobe instead, to get rising/falling edge characteristic right */
46 [1] = { 42 [1] = DEFINE_RES_IRQ(IRQ_GPIO_ETH0_IRQ),
47 .start = IRQ_GPIO_ETH0_IRQ,
48 .end = IRQ_GPIO_ETH0_IRQ,
49 .flags = IORESOURCE_IRQ,
50 },
51#endif 43#endif
52}; 44};
53 45
@@ -70,16 +62,8 @@ static struct platform_device *devices[] __initdata = {
70 * the two SA1100 lowest chip select outputs. 62 * the two SA1100 lowest chip select outputs.
71 */ 63 */
72static struct resource pleb_flash_resources[] = { 64static struct resource pleb_flash_resources[] = {
73 [0] = { 65 [0] = DEFINE_RES_MEM(SA1100_CS0_PHYS, SZ_8M),
74 .start = SA1100_CS0_PHYS, 66 [1] = DEFINE_RES_MEM(SA1100_CS1_PHYS, SZ_8M),
75 .end = SA1100_CS0_PHYS + SZ_8M - 1,
76 .flags = IORESOURCE_MEM,
77 },
78 [1] = {
79 .start = SA1100_CS1_PHYS,
80 .end = SA1100_CS1_PHYS + SZ_8M - 1,
81 .flags = IORESOURCE_MEM,
82 }
83}; 67};
84 68
85 69
diff --git a/arch/arm/mach-sa1100/shannon.c b/arch/arm/mach-sa1100/shannon.c
index 318b2b766a0b..5fd615649847 100644
--- a/arch/arm/mach-sa1100/shannon.c
+++ b/arch/arm/mach-sa1100/shannon.c
@@ -46,11 +46,8 @@ static struct flash_platform_data shannon_flash_data = {
46 .nr_parts = ARRAY_SIZE(shannon_partitions), 46 .nr_parts = ARRAY_SIZE(shannon_partitions),
47}; 47};
48 48
49static struct resource shannon_flash_resource = { 49static struct resource shannon_flash_resource =
50 .start = SA1100_CS0_PHYS, 50 DEFINE_RES_MEM(SA1100_CS0_PHYS, SZ_4M);
51 .end = SA1100_CS0_PHYS + SZ_4M - 1,
52 .flags = IORESOURCE_MEM,
53};
54 51
55static struct mcp_plat_data shannon_mcp_data = { 52static struct mcp_plat_data shannon_mcp_data = {
56 .mccr0 = MCCR0_ADM, 53 .mccr0 = MCCR0_ADM,
diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c
index e17c04d6e324..cdb9d197c092 100644
--- a/arch/arm/mach-sa1100/simpad.c
+++ b/arch/arm/mach-sa1100/simpad.c
@@ -176,15 +176,8 @@ static struct flash_platform_data simpad_flash_data = {
176 176
177 177
178static struct resource simpad_flash_resources [] = { 178static struct resource simpad_flash_resources [] = {
179 { 179 DEFINE_RES_MEM(SA1100_CS0_PHYS, SZ_16M),
180 .start = SA1100_CS0_PHYS, 180 DEFINE_RES_MEM(SA1100_CS1_PHYS, SZ_16M),
181 .end = SA1100_CS0_PHYS + SZ_16M -1,
182 .flags = IORESOURCE_MEM,
183 }, {
184 .start = SA1100_CS1_PHYS,
185 .end = SA1100_CS1_PHYS + SZ_16M -1,
186 .flags = IORESOURCE_MEM,
187 }
188}; 181};
189 182
190static struct mcp_plat_data simpad_mcp_data = { 183static struct mcp_plat_data simpad_mcp_data = {