aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2440
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2007-04-20 06:19:16 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-04-21 15:53:19 -0400
commit57e5171c9ff817d56344d8473e484d6870ae2bf3 (patch)
tree0c1f0259d0ac0714be0b5bd5600edfcc5cbac717 /arch/arm/mach-s3c2440
parentce89c206ac03dfec700cfa538dcbcc347c0683ce (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-s3c2440')
-rw-r--r--arch/arm/mach-s3c2440/mach-anubis.c13
-rw-r--r--arch/arm/mach-s3c2440/mach-nexcoder.c13
-rw-r--r--arch/arm/mach-s3c2440/mach-osiris.c12
-rw-r--r--arch/arm/mach-s3c2440/mach-rx3715.c8
-rw-r--r--arch/arm/mach-s3c2440/mach-smdk2440.c7
5 files changed, 21 insertions, 32 deletions
diff --git a/arch/arm/mach-s3c2440/mach-anubis.c b/arch/arm/mach-s3c2440/mach-anubis.c
index 0f4e2882aa13..b5d387ef37e1 100644
--- a/arch/arm/mach-s3c2440/mach-anubis.c
+++ b/arch/arm/mach-s3c2440/mach-anubis.c
@@ -281,11 +281,6 @@ static struct clk *anubis_clocks[] = {
281 &s3c24xx_uclk, 281 &s3c24xx_uclk,
282}; 282};
283 283
284static struct s3c24xx_board anubis_board __initdata = {
285 .devices = anubis_devices,
286 .devices_count = ARRAY_SIZE(anubis_devices),
287};
288
289static void __init anubis_map_io(void) 284static void __init anubis_map_io(void)
290{ 285{
291 /* initialise the clocks */ 286 /* initialise the clocks */
@@ -308,18 +303,24 @@ static void __init anubis_map_io(void)
308 s3c24xx_init_io(anubis_iodesc, ARRAY_SIZE(anubis_iodesc)); 303 s3c24xx_init_io(anubis_iodesc, ARRAY_SIZE(anubis_iodesc));
309 s3c24xx_init_clocks(0); 304 s3c24xx_init_clocks(0);
310 s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs)); 305 s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs));
311 s3c24xx_set_board(&anubis_board);
312 306
313 /* ensure that the GPIO is setup */ 307 /* ensure that the GPIO is setup */
314 s3c2410_gpio_setpin(S3C2410_GPA0, 1); 308 s3c2410_gpio_setpin(S3C2410_GPA0, 1);
315} 309}
316 310
311static void __init anubis_init(void)
312{
313 platform_add_devices(anubis_devices, ARRAY_SIZE(anubis_devices));
314}
315
316
317MACHINE_START(ANUBIS, "Simtec-Anubis") 317MACHINE_START(ANUBIS, "Simtec-Anubis")
318 /* Maintainer: Ben Dooks <ben@simtec.co.uk> */ 318 /* Maintainer: Ben Dooks <ben@simtec.co.uk> */
319 .phys_io = S3C2410_PA_UART, 319 .phys_io = S3C2410_PA_UART,
320 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, 320 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
321 .boot_params = S3C2410_SDRAM_PA + 0x100, 321 .boot_params = S3C2410_SDRAM_PA + 0x100,
322 .map_io = anubis_map_io, 322 .map_io = anubis_map_io,
323 .init_machine = anubis_init,
323 .init_irq = s3c24xx_init_irq, 324 .init_irq = s3c24xx_init_irq,
324 .timer = &s3c24xx_timer, 325 .timer = &s3c24xx_timer,
325MACHINE_END 326MACHINE_END
diff --git a/arch/arm/mach-s3c2440/mach-nexcoder.c b/arch/arm/mach-s3c2440/mach-nexcoder.c
index 6d551d88330b..5e61f2166c76 100644
--- a/arch/arm/mach-s3c2440/mach-nexcoder.c
+++ b/arch/arm/mach-s3c2440/mach-nexcoder.c
@@ -116,12 +116,6 @@ static struct platform_device *nexcoder_devices[] __initdata = {
116 &nexcoder_device_nor, 116 &nexcoder_device_nor,
117}; 117};
118 118
119static struct s3c24xx_board nexcoder_board __initdata = {
120 .devices = nexcoder_devices,
121 .devices_count = ARRAY_SIZE(nexcoder_devices),
122};
123
124
125static void __init nexcoder_sensorboard_init(void) 119static void __init nexcoder_sensorboard_init(void)
126{ 120{
127 // Initialize SCCB bus 121 // Initialize SCCB bus
@@ -142,10 +136,14 @@ static void __init nexcoder_map_io(void)
142 s3c24xx_init_io(nexcoder_iodesc, ARRAY_SIZE(nexcoder_iodesc)); 136 s3c24xx_init_io(nexcoder_iodesc, ARRAY_SIZE(nexcoder_iodesc));
143 s3c24xx_init_clocks(0); 137 s3c24xx_init_clocks(0);
144 s3c24xx_init_uarts(nexcoder_uartcfgs, ARRAY_SIZE(nexcoder_uartcfgs)); 138 s3c24xx_init_uarts(nexcoder_uartcfgs, ARRAY_SIZE(nexcoder_uartcfgs));
145 s3c24xx_set_board(&nexcoder_board); 139
146 nexcoder_sensorboard_init(); 140 nexcoder_sensorboard_init();
147} 141}
148 142
143static void __init nexcoder_init(void)
144{
145 platform_add_devices(nexcoder_devices, ARRAY_SIZE(nexcoder_devices));
146};
149 147
150MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440") 148MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440")
151 /* Maintainer: Guillaume GOURAT <guillaume.gourat@nexvision.tv> */ 149 /* Maintainer: Guillaume GOURAT <guillaume.gourat@nexvision.tv> */
@@ -153,6 +151,7 @@ MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440")
153 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, 151 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
154 .boot_params = S3C2410_SDRAM_PA + 0x100, 152 .boot_params = S3C2410_SDRAM_PA + 0x100,
155 .map_io = nexcoder_map_io, 153 .map_io = nexcoder_map_io,
154 .init_machine = nexcoder_init,
156 .init_irq = s3c24xx_init_irq, 155 .init_irq = s3c24xx_init_irq,
157 .timer = &s3c24xx_timer, 156 .timer = &s3c24xx_timer,
158MACHINE_END 157MACHINE_END
diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c
index c9872210ab5a..324f5a237921 100644
--- a/arch/arm/mach-s3c2440/mach-osiris.c
+++ b/arch/arm/mach-s3c2440/mach-osiris.c
@@ -251,11 +251,6 @@ static struct clk *osiris_clocks[] = {
251 &s3c24xx_uclk, 251 &s3c24xx_uclk,
252}; 252};
253 253
254static struct s3c24xx_board osiris_board __initdata = {
255 .devices = osiris_devices,
256 .devices_count = ARRAY_SIZE(osiris_devices),
257};
258
259static void __init osiris_map_io(void) 254static void __init osiris_map_io(void)
260{ 255{
261 unsigned long flags; 256 unsigned long flags;
@@ -280,7 +275,6 @@ static void __init osiris_map_io(void)
280 s3c24xx_init_io(osiris_iodesc, ARRAY_SIZE(osiris_iodesc)); 275 s3c24xx_init_io(osiris_iodesc, ARRAY_SIZE(osiris_iodesc));
281 s3c24xx_init_clocks(0); 276 s3c24xx_init_clocks(0);
282 s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs)); 277 s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs));
283 s3c24xx_set_board(&osiris_board);
284 278
285 /* fix bus configuration (nBE settings wrong on ABLE pre v2.20) */ 279 /* fix bus configuration (nBE settings wrong on ABLE pre v2.20) */
286 280
@@ -292,12 +286,18 @@ static void __init osiris_map_io(void)
292 s3c2410_gpio_setpin(S3C2410_GPA0, 1); 286 s3c2410_gpio_setpin(S3C2410_GPA0, 1);
293} 287}
294 288
289static void __init osiris_init(void)
290{
291 platform_add_devices(osiris_devices, ARRAY_SIZE(osiris_devices));
292};
293
295MACHINE_START(OSIRIS, "Simtec-OSIRIS") 294MACHINE_START(OSIRIS, "Simtec-OSIRIS")
296 /* Maintainer: Ben Dooks <ben@simtec.co.uk> */ 295 /* Maintainer: Ben Dooks <ben@simtec.co.uk> */
297 .phys_io = S3C2410_PA_UART, 296 .phys_io = S3C2410_PA_UART,
298 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, 297 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
299 .boot_params = S3C2410_SDRAM_PA + 0x100, 298 .boot_params = S3C2410_SDRAM_PA + 0x100,
300 .map_io = osiris_map_io, 299 .map_io = osiris_map_io,
300 .init_machine = osiris_init,
301 .init_irq = s3c24xx_init_irq, 301 .init_irq = s3c24xx_init_irq,
302 .timer = &s3c24xx_timer, 302 .timer = &s3c24xx_timer,
303MACHINE_END 303MACHINE_END
diff --git a/arch/arm/mach-s3c2440/mach-rx3715.c b/arch/arm/mach-s3c2440/mach-rx3715.c
index ae1d0a81fd6a..c3cc4bf158f6 100644
--- a/arch/arm/mach-s3c2440/mach-rx3715.c
+++ b/arch/arm/mach-s3c2440/mach-rx3715.c
@@ -202,11 +202,6 @@ static struct platform_device *rx3715_devices[] __initdata = {
202 &s3c_device_nand, 202 &s3c_device_nand,
203}; 203};
204 204
205static struct s3c24xx_board rx3715_board __initdata = {
206 .devices = rx3715_devices,
207 .devices_count = ARRAY_SIZE(rx3715_devices)
208};
209
210static void __init rx3715_map_io(void) 205static void __init rx3715_map_io(void)
211{ 206{
212 s3c_device_nand.dev.platform_data = &rx3715_nand_info; 207 s3c_device_nand.dev.platform_data = &rx3715_nand_info;
@@ -214,7 +209,6 @@ static void __init rx3715_map_io(void)
214 s3c24xx_init_io(rx3715_iodesc, ARRAY_SIZE(rx3715_iodesc)); 209 s3c24xx_init_io(rx3715_iodesc, ARRAY_SIZE(rx3715_iodesc));
215 s3c24xx_init_clocks(16934000); 210 s3c24xx_init_clocks(16934000);
216 s3c24xx_init_uarts(rx3715_uartcfgs, ARRAY_SIZE(rx3715_uartcfgs)); 211 s3c24xx_init_uarts(rx3715_uartcfgs, ARRAY_SIZE(rx3715_uartcfgs));
217 s3c24xx_set_board(&rx3715_board);
218} 212}
219 213
220static void __init rx3715_init_irq(void) 214static void __init rx3715_init_irq(void)
@@ -230,9 +224,9 @@ static void __init rx3715_init_machine(void)
230 s3c2410_pm_init(); 224 s3c2410_pm_init();
231 225
232 s3c24xx_fb_set_platdata(&rx3715_lcdcfg); 226 s3c24xx_fb_set_platdata(&rx3715_lcdcfg);
227 platform_add_devices(rx3715_devices, ARRAY_SIZE(rx3715_devices));
233} 228}
234 229
235
236MACHINE_START(RX3715, "IPAQ-RX3715") 230MACHINE_START(RX3715, "IPAQ-RX3715")
237 /* Maintainer: Ben Dooks <ben@fluff.org> */ 231 /* Maintainer: Ben Dooks <ben@fluff.org> */
238 .phys_io = S3C2410_PA_UART, 232 .phys_io = S3C2410_PA_UART,
diff --git a/arch/arm/mach-s3c2440/mach-smdk2440.c b/arch/arm/mach-s3c2440/mach-smdk2440.c
index c17eb5b1f6b4..e167254e232e 100644
--- a/arch/arm/mach-s3c2440/mach-smdk2440.c
+++ b/arch/arm/mach-s3c2440/mach-smdk2440.c
@@ -174,23 +174,18 @@ static struct platform_device *smdk2440_devices[] __initdata = {
174 &s3c_device_iis, 174 &s3c_device_iis,
175}; 175};
176 176
177static struct s3c24xx_board smdk2440_board __initdata = {
178 .devices = smdk2440_devices,
179 .devices_count = ARRAY_SIZE(smdk2440_devices)
180};
181
182static void __init smdk2440_map_io(void) 177static void __init smdk2440_map_io(void)
183{ 178{
184 s3c24xx_init_io(smdk2440_iodesc, ARRAY_SIZE(smdk2440_iodesc)); 179 s3c24xx_init_io(smdk2440_iodesc, ARRAY_SIZE(smdk2440_iodesc));
185 s3c24xx_init_clocks(16934400); 180 s3c24xx_init_clocks(16934400);
186 s3c24xx_init_uarts(smdk2440_uartcfgs, ARRAY_SIZE(smdk2440_uartcfgs)); 181 s3c24xx_init_uarts(smdk2440_uartcfgs, ARRAY_SIZE(smdk2440_uartcfgs));
187 s3c24xx_set_board(&smdk2440_board);
188} 182}
189 183
190static void __init smdk2440_machine_init(void) 184static void __init smdk2440_machine_init(void)
191{ 185{
192 s3c24xx_fb_set_platdata(&smdk2440_lcd_cfg); 186 s3c24xx_fb_set_platdata(&smdk2440_lcd_cfg);
193 187
188 platform_add_devices(smdk2440_devices, ARRAY_SIZE(smdk2440_devices));
194 smdk_machine_init(); 189 smdk_machine_init();
195} 190}
196 191