diff options
author | Ben Dooks <ben-linux@fluff.org> | 2007-04-20 06:19:16 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-04-21 15:53:19 -0400 |
commit | 57e5171c9ff817d56344d8473e484d6870ae2bf3 (patch) | |
tree | 0c1f0259d0ac0714be0b5bd5600edfcc5cbac717 /arch/arm/mach-s3c2410 | |
parent | ce89c206ac03dfec700cfa538dcbcc347c0683ce (diff) |
[ARM] 4325/1: S3C24XX: remove s3c24xx_board
Remove the use of struct s3c24xx_board as
this is just as easily done by using the
platform device registration functions to
make the initialisation sequence easier.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-s3c2410')
-rw-r--r-- | arch/arm/mach-s3c2410/mach-amlm5900.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-bast.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-h1940.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-n30.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-otom.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-qt2410.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-smdk2410.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-vr1000.c | 12 |
8 files changed, 25 insertions, 52 deletions
diff --git a/arch/arm/mach-s3c2410/mach-amlm5900.c b/arch/arm/mach-s3c2410/mach-amlm5900.c index 72f2cc4fcd03..bc308ceb91c3 100644 --- a/arch/arm/mach-s3c2410/mach-amlm5900.c +++ b/arch/arm/mach-s3c2410/mach-amlm5900.c | |||
@@ -160,17 +160,11 @@ static struct platform_device *amlm5900_devices[] __initdata = { | |||
160 | #endif | 160 | #endif |
161 | }; | 161 | }; |
162 | 162 | ||
163 | static struct s3c24xx_board amlm5900_board __initdata = { | ||
164 | .devices = amlm5900_devices, | ||
165 | .devices_count = ARRAY_SIZE(amlm5900_devices) | ||
166 | }; | ||
167 | |||
168 | void __init amlm5900_map_io(void) | 163 | void __init amlm5900_map_io(void) |
169 | { | 164 | { |
170 | s3c24xx_init_io(amlm5900_iodesc, ARRAY_SIZE(amlm5900_iodesc)); | 165 | s3c24xx_init_io(amlm5900_iodesc, ARRAY_SIZE(amlm5900_iodesc)); |
171 | s3c24xx_init_clocks(0); | 166 | s3c24xx_init_clocks(0); |
172 | s3c24xx_init_uarts(amlm5900_uartcfgs, ARRAY_SIZE(amlm5900_uartcfgs)); | 167 | s3c24xx_init_uarts(amlm5900_uartcfgs, ARRAY_SIZE(amlm5900_uartcfgs)); |
173 | s3c24xx_set_board(&amlm5900_board); | ||
174 | } | 168 | } |
175 | 169 | ||
176 | #ifdef CONFIG_FB_S3C2410 | 170 | #ifdef CONFIG_FB_S3C2410 |
@@ -247,6 +241,7 @@ static void __init amlm5900_init(void) | |||
247 | #ifdef CONFIG_FB_S3C2410 | 241 | #ifdef CONFIG_FB_S3C2410 |
248 | s3c24xx_fb_set_platdata(&amlm5900_lcd_info); | 242 | s3c24xx_fb_set_platdata(&amlm5900_lcd_info); |
249 | #endif | 243 | #endif |
244 | platform_add_devices(amlm5900_devices, ARRAY_SIZE(amlm5900_devices)); | ||
250 | } | 245 | } |
251 | 246 | ||
252 | MACHINE_START(AML_M5900, "AML_M5900") | 247 | MACHINE_START(AML_M5900, "AML_M5900") |
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 0bb2e8b2dd28..f01de807b72f 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c | |||
@@ -464,11 +464,6 @@ static struct clk *bast_clocks[] = { | |||
464 | &s3c24xx_uclk, | 464 | &s3c24xx_uclk, |
465 | }; | 465 | }; |
466 | 466 | ||
467 | static struct s3c24xx_board bast_board __initdata = { | ||
468 | .devices = bast_devices, | ||
469 | .devices_count = ARRAY_SIZE(bast_devices), | ||
470 | }; | ||
471 | |||
472 | static void __init bast_map_io(void) | 467 | static void __init bast_map_io(void) |
473 | { | 468 | { |
474 | /* initialise the clocks */ | 469 | /* initialise the clocks */ |
@@ -492,13 +487,14 @@ static void __init bast_map_io(void) | |||
492 | s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); | 487 | s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); |
493 | s3c24xx_init_clocks(0); | 488 | s3c24xx_init_clocks(0); |
494 | s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs)); | 489 | s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs)); |
495 | s3c24xx_set_board(&bast_board); | 490 | |
496 | usb_simtec_init(); | 491 | usb_simtec_init(); |
497 | } | 492 | } |
498 | 493 | ||
499 | static void __init bast_init(void) | 494 | static void __init bast_init(void) |
500 | { | 495 | { |
501 | s3c24xx_fb_set_platdata(&bast_lcd_info); | 496 | s3c24xx_fb_set_platdata(&bast_lcd_info); |
497 | platform_add_devices(bast_devices, ARRAY_SIZE(bast_devices)); | ||
502 | } | 498 | } |
503 | 499 | ||
504 | MACHINE_START(BAST, "Simtec-BAST") | 500 | MACHINE_START(BAST, "Simtec-BAST") |
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index d052ab2d9377..5d5f00e9c462 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c | |||
@@ -129,7 +129,6 @@ static struct s3c2410_udc_mach_info h1940_udc_cfg __initdata = { | |||
129 | }; | 129 | }; |
130 | 130 | ||
131 | 131 | ||
132 | |||
133 | /** | 132 | /** |
134 | * Set lcd on or off | 133 | * Set lcd on or off |
135 | **/ | 134 | **/ |
@@ -188,17 +187,11 @@ static struct platform_device *h1940_devices[] __initdata = { | |||
188 | &s3c_device_leds, | 187 | &s3c_device_leds, |
189 | }; | 188 | }; |
190 | 189 | ||
191 | static struct s3c24xx_board h1940_board __initdata = { | ||
192 | .devices = h1940_devices, | ||
193 | .devices_count = ARRAY_SIZE(h1940_devices) | ||
194 | }; | ||
195 | |||
196 | static void __init h1940_map_io(void) | 190 | static void __init h1940_map_io(void) |
197 | { | 191 | { |
198 | s3c24xx_init_io(h1940_iodesc, ARRAY_SIZE(h1940_iodesc)); | 192 | s3c24xx_init_io(h1940_iodesc, ARRAY_SIZE(h1940_iodesc)); |
199 | s3c24xx_init_clocks(0); | 193 | s3c24xx_init_clocks(0); |
200 | s3c24xx_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs)); | 194 | s3c24xx_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs)); |
201 | s3c24xx_set_board(&h1940_board); | ||
202 | 195 | ||
203 | /* setup PM */ | 196 | /* setup PM */ |
204 | 197 | ||
@@ -232,6 +225,8 @@ static void __init h1940_init(void) | |||
232 | | (0x02 << S3C2410_PLLCON_PDIVSHIFT) | 225 | | (0x02 << S3C2410_PLLCON_PDIVSHIFT) |
233 | | (0x03 << S3C2410_PLLCON_SDIVSHIFT); | 226 | | (0x03 << S3C2410_PLLCON_SDIVSHIFT); |
234 | writel(tmp, S3C2410_UPLLCON); | 227 | writel(tmp, S3C2410_UPLLCON); |
228 | |||
229 | platform_add_devices(h1940_devices, ARRAY_SIZE(h1940_devices)); | ||
235 | } | 230 | } |
236 | 231 | ||
237 | MACHINE_START(H1940, "IPAQ-H1940") | 232 | MACHINE_START(H1940, "IPAQ-H1940") |
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c index 261aa4cc0770..412e50c3d28a 100644 --- a/arch/arm/mach-s3c2410/mach-n30.c +++ b/arch/arm/mach-s3c2410/mach-n30.c | |||
@@ -90,17 +90,11 @@ static struct s3c2410_platform_i2c n30_i2ccfg = { | |||
90 | .max_freq = 10*1000, | 90 | .max_freq = 10*1000, |
91 | }; | 91 | }; |
92 | 92 | ||
93 | static struct s3c24xx_board n30_board __initdata = { | ||
94 | .devices = n30_devices, | ||
95 | .devices_count = ARRAY_SIZE(n30_devices) | ||
96 | }; | ||
97 | |||
98 | static void __init n30_map_io(void) | 93 | static void __init n30_map_io(void) |
99 | { | 94 | { |
100 | s3c24xx_init_io(n30_iodesc, ARRAY_SIZE(n30_iodesc)); | 95 | s3c24xx_init_io(n30_iodesc, ARRAY_SIZE(n30_iodesc)); |
101 | s3c24xx_init_clocks(0); | 96 | s3c24xx_init_clocks(0); |
102 | s3c24xx_init_uarts(n30_uartcfgs, ARRAY_SIZE(n30_uartcfgs)); | 97 | s3c24xx_init_uarts(n30_uartcfgs, ARRAY_SIZE(n30_uartcfgs)); |
103 | s3c24xx_set_board(&n30_board); | ||
104 | } | 98 | } |
105 | 99 | ||
106 | static void __init n30_init_irq(void) | 100 | static void __init n30_init_irq(void) |
@@ -120,6 +114,8 @@ static void __init n30_init(void) | |||
120 | s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST | | 114 | s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST | |
121 | S3C2410_MISCCR_USBSUSPND0 | | 115 | S3C2410_MISCCR_USBSUSPND0 | |
122 | S3C2410_MISCCR_USBSUSPND1, 0x0); | 116 | S3C2410_MISCCR_USBSUSPND1, 0x0); |
117 | |||
118 | platform_add_devices(n30_devices, ARRAY_SIZE(n30_devices)); | ||
123 | } | 119 | } |
124 | 120 | ||
125 | MACHINE_START(N30, "Acer-N30") | 121 | MACHINE_START(N30, "Acer-N30") |
diff --git a/arch/arm/mach-s3c2410/mach-otom.c b/arch/arm/mach-s3c2410/mach-otom.c index c78ab75b44f3..1f899fa588df 100644 --- a/arch/arm/mach-s3c2410/mach-otom.c +++ b/arch/arm/mach-s3c2410/mach-otom.c | |||
@@ -100,20 +100,17 @@ static struct platform_device *otom11_devices[] __initdata = { | |||
100 | &otom_device_nor, | 100 | &otom_device_nor, |
101 | }; | 101 | }; |
102 | 102 | ||
103 | static struct s3c24xx_board otom11_board __initdata = { | ||
104 | .devices = otom11_devices, | ||
105 | .devices_count = ARRAY_SIZE(otom11_devices) | ||
106 | }; | ||
107 | |||
108 | |||
109 | static void __init otom11_map_io(void) | 103 | static void __init otom11_map_io(void) |
110 | { | 104 | { |
111 | s3c24xx_init_io(otom11_iodesc, ARRAY_SIZE(otom11_iodesc)); | 105 | s3c24xx_init_io(otom11_iodesc, ARRAY_SIZE(otom11_iodesc)); |
112 | s3c24xx_init_clocks(0); | 106 | s3c24xx_init_clocks(0); |
113 | s3c24xx_init_uarts(otom11_uartcfgs, ARRAY_SIZE(otom11_uartcfgs)); | 107 | s3c24xx_init_uarts(otom11_uartcfgs, ARRAY_SIZE(otom11_uartcfgs)); |
114 | s3c24xx_set_board(&otom11_board); | ||
115 | } | 108 | } |
116 | 109 | ||
110 | static void __init otom11_init(void) | ||
111 | { | ||
112 | platform_add_devices(otom11_devices, ARRAY_SIZE(otom11_devices)); | ||
113 | } | ||
117 | 114 | ||
118 | MACHINE_START(OTOM, "Nex Vision - Otom 1.1") | 115 | MACHINE_START(OTOM, "Nex Vision - Otom 1.1") |
119 | /* Maintainer: Guillaume GOURAT <guillaume.gourat@nexvision.tv> */ | 116 | /* Maintainer: Guillaume GOURAT <guillaume.gourat@nexvision.tv> */ |
@@ -121,6 +118,7 @@ MACHINE_START(OTOM, "Nex Vision - Otom 1.1") | |||
121 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 118 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
122 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 119 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
123 | .map_io = otom11_map_io, | 120 | .map_io = otom11_map_io, |
121 | .init_machine = otom11_init, | ||
124 | .init_irq = s3c24xx_init_irq, | 122 | .init_irq = s3c24xx_init_irq, |
125 | .timer = &s3c24xx_timer, | 123 | .timer = &s3c24xx_timer, |
126 | MACHINE_END | 124 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2410/mach-qt2410.c b/arch/arm/mach-s3c2410/mach-qt2410.c index c6a41593de21..caf6778472d3 100644 --- a/arch/arm/mach-s3c2410/mach-qt2410.c +++ b/arch/arm/mach-s3c2410/mach-qt2410.c | |||
@@ -331,11 +331,6 @@ static struct platform_device *qt2410_devices[] __initdata = { | |||
331 | &qt2410_led, | 331 | &qt2410_led, |
332 | }; | 332 | }; |
333 | 333 | ||
334 | static struct s3c24xx_board qt2410_board __initdata = { | ||
335 | .devices = qt2410_devices, | ||
336 | .devices_count = ARRAY_SIZE(qt2410_devices) | ||
337 | }; | ||
338 | |||
339 | static struct mtd_partition qt2410_nand_part[] = { | 334 | static struct mtd_partition qt2410_nand_part[] = { |
340 | [0] = { | 335 | [0] = { |
341 | .name = "U-Boot", | 336 | .name = "U-Boot", |
@@ -405,7 +400,6 @@ static void __init qt2410_map_io(void) | |||
405 | s3c24xx_init_io(qt2410_iodesc, ARRAY_SIZE(qt2410_iodesc)); | 400 | s3c24xx_init_io(qt2410_iodesc, ARRAY_SIZE(qt2410_iodesc)); |
406 | s3c24xx_init_clocks(12*1000*1000); | 401 | s3c24xx_init_clocks(12*1000*1000); |
407 | s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs)); | 402 | s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs)); |
408 | s3c24xx_set_board(&qt2410_board); | ||
409 | } | 403 | } |
410 | 404 | ||
411 | static void __init qt2410_machine_init(void) | 405 | static void __init qt2410_machine_init(void) |
@@ -432,6 +426,7 @@ static void __init qt2410_machine_init(void) | |||
432 | 426 | ||
433 | s3c2410_gpio_cfgpin(S3C2410_GPB5, S3C2410_GPIO_OUTPUT); | 427 | s3c2410_gpio_cfgpin(S3C2410_GPB5, S3C2410_GPIO_OUTPUT); |
434 | 428 | ||
429 | platform_add_devices(qt2410_devices, ARRAY_SIZE(qt2410_devices)); | ||
435 | s3c2410_pm_init(); | 430 | s3c2410_pm_init(); |
436 | } | 431 | } |
437 | 432 | ||
diff --git a/arch/arm/mach-s3c2410/mach-smdk2410.c b/arch/arm/mach-s3c2410/mach-smdk2410.c index 57b8a80f33d0..5852d300d52f 100644 --- a/arch/arm/mach-s3c2410/mach-smdk2410.c +++ b/arch/arm/mach-s3c2410/mach-smdk2410.c | |||
@@ -94,17 +94,17 @@ static struct platform_device *smdk2410_devices[] __initdata = { | |||
94 | &s3c_device_iis, | 94 | &s3c_device_iis, |
95 | }; | 95 | }; |
96 | 96 | ||
97 | static struct s3c24xx_board smdk2410_board __initdata = { | ||
98 | .devices = smdk2410_devices, | ||
99 | .devices_count = ARRAY_SIZE(smdk2410_devices) | ||
100 | }; | ||
101 | |||
102 | static void __init smdk2410_map_io(void) | 97 | static void __init smdk2410_map_io(void) |
103 | { | 98 | { |
104 | s3c24xx_init_io(smdk2410_iodesc, ARRAY_SIZE(smdk2410_iodesc)); | 99 | s3c24xx_init_io(smdk2410_iodesc, ARRAY_SIZE(smdk2410_iodesc)); |
105 | s3c24xx_init_clocks(0); | 100 | s3c24xx_init_clocks(0); |
106 | s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs)); | 101 | s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs)); |
107 | s3c24xx_set_board(&smdk2410_board); | 102 | } |
103 | |||
104 | static void __init smdk2410_init(void) | ||
105 | { | ||
106 | platform_add_devices(smdk2410_devices, ARRAY_SIZE(smdk2410_devices)); | ||
107 | smdk_machine_init(); | ||
108 | } | 108 | } |
109 | 109 | ||
110 | MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switch | 110 | MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switch |
@@ -115,7 +115,7 @@ MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switc | |||
115 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 115 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
116 | .map_io = smdk2410_map_io, | 116 | .map_io = smdk2410_map_io, |
117 | .init_irq = s3c24xx_init_irq, | 117 | .init_irq = s3c24xx_init_irq, |
118 | .init_machine = smdk_machine_init, | 118 | .init_machine = smdk2410_init, |
119 | .timer = &s3c24xx_timer, | 119 | .timer = &s3c24xx_timer, |
120 | MACHINE_END | 120 | MACHINE_END |
121 | 121 | ||
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c index 9380a1360890..7b624bb00490 100644 --- a/arch/arm/mach-s3c2410/mach-vr1000.c +++ b/arch/arm/mach-s3c2410/mach-vr1000.c | |||
@@ -384,11 +384,6 @@ static struct clk *vr1000_clocks[] = { | |||
384 | &s3c24xx_uclk, | 384 | &s3c24xx_uclk, |
385 | }; | 385 | }; |
386 | 386 | ||
387 | static struct s3c24xx_board vr1000_board __initdata = { | ||
388 | .devices = vr1000_devices, | ||
389 | .devices_count = ARRAY_SIZE(vr1000_devices), | ||
390 | }; | ||
391 | |||
392 | static void vr1000_power_off(void) | 387 | static void vr1000_power_off(void) |
393 | { | 388 | { |
394 | s3c2410_gpio_cfgpin(S3C2410_GPB9, S3C2410_GPB9_OUTP); | 389 | s3c2410_gpio_cfgpin(S3C2410_GPB9, S3C2410_GPB9_OUTP); |
@@ -417,10 +412,12 @@ static void __init vr1000_map_io(void) | |||
417 | s3c24xx_init_io(vr1000_iodesc, ARRAY_SIZE(vr1000_iodesc)); | 412 | s3c24xx_init_io(vr1000_iodesc, ARRAY_SIZE(vr1000_iodesc)); |
418 | s3c24xx_init_clocks(0); | 413 | s3c24xx_init_clocks(0); |
419 | s3c24xx_init_uarts(vr1000_uartcfgs, ARRAY_SIZE(vr1000_uartcfgs)); | 414 | s3c24xx_init_uarts(vr1000_uartcfgs, ARRAY_SIZE(vr1000_uartcfgs)); |
420 | s3c24xx_set_board(&vr1000_board); | ||
421 | usb_simtec_init(); | ||
422 | } | 415 | } |
423 | 416 | ||
417 | static void __init vr1000_init(void) | ||
418 | { | ||
419 | platform_add_devices(vr1000_devices, ARRAY_SIZE(vr1000_devices)); | ||
420 | } | ||
424 | 421 | ||
425 | MACHINE_START(VR1000, "Thorcom-VR1000") | 422 | MACHINE_START(VR1000, "Thorcom-VR1000") |
426 | /* Maintainer: Ben Dooks <ben@simtec.co.uk> */ | 423 | /* Maintainer: Ben Dooks <ben@simtec.co.uk> */ |
@@ -428,6 +425,7 @@ MACHINE_START(VR1000, "Thorcom-VR1000") | |||
428 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 425 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
429 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 426 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
430 | .map_io = vr1000_map_io, | 427 | .map_io = vr1000_map_io, |
428 | .init_machine = vr1000_init, | ||
431 | .init_irq = s3c24xx_init_irq, | 429 | .init_irq = s3c24xx_init_irq, |
432 | .timer = &s3c24xx_timer, | 430 | .timer = &s3c24xx_timer, |
433 | MACHINE_END | 431 | MACHINE_END |