aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-s3c2410/mach-bast.c4
-rw-r--r--arch/arm/mach-s3c2410/mach-vr1000.c4
-rw-r--r--arch/arm/mach-s3c2440/mach-anubis.c4
-rw-r--r--arch/arm/mach-s3c2440/mach-osiris.c4
-rw-r--r--arch/arm/plat-s3c24xx/clock.c12
-rw-r--r--arch/arm/plat-s3c24xx/cpu.c9
-rw-r--r--include/asm-arm/plat-s3c24xx/clock.h1
-rw-r--r--include/asm-arm/plat-s3c24xx/cpu.h3
8 files changed, 21 insertions, 20 deletions
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c
index 7b81296427eb..0bb2e8b2dd28 100644
--- a/arch/arm/mach-s3c2410/mach-bast.c
+++ b/arch/arm/mach-s3c2410/mach-bast.c
@@ -467,8 +467,6 @@ static struct clk *bast_clocks[] = {
467static struct s3c24xx_board bast_board __initdata = { 467static struct s3c24xx_board bast_board __initdata = {
468 .devices = bast_devices, 468 .devices = bast_devices,
469 .devices_count = ARRAY_SIZE(bast_devices), 469 .devices_count = ARRAY_SIZE(bast_devices),
470 .clocks = bast_clocks,
471 .clocks_count = ARRAY_SIZE(bast_clocks),
472}; 470};
473 471
474static void __init bast_map_io(void) 472static void __init bast_map_io(void)
@@ -486,6 +484,8 @@ static void __init bast_map_io(void)
486 484
487 s3c24xx_uclk.parent = &s3c24xx_clkout1; 485 s3c24xx_uclk.parent = &s3c24xx_clkout1;
488 486
487 s3c24xx_register_clocks(bast_clocks, ARRAY_SIZE(bast_clocks));
488
489 s3c_device_nand.dev.platform_data = &bast_nand_info; 489 s3c_device_nand.dev.platform_data = &bast_nand_info;
490 s3c_device_i2c.dev.platform_data = &bast_i2c_info; 490 s3c_device_i2c.dev.platform_data = &bast_i2c_info;
491 491
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c
index c947c75bcbf0..9380a1360890 100644
--- a/arch/arm/mach-s3c2410/mach-vr1000.c
+++ b/arch/arm/mach-s3c2410/mach-vr1000.c
@@ -387,8 +387,6 @@ static struct clk *vr1000_clocks[] = {
387static struct s3c24xx_board vr1000_board __initdata = { 387static struct s3c24xx_board vr1000_board __initdata = {
388 .devices = vr1000_devices, 388 .devices = vr1000_devices,
389 .devices_count = ARRAY_SIZE(vr1000_devices), 389 .devices_count = ARRAY_SIZE(vr1000_devices),
390 .clocks = vr1000_clocks,
391 .clocks_count = ARRAY_SIZE(vr1000_clocks),
392}; 390};
393 391
394static void vr1000_power_off(void) 392static void vr1000_power_off(void)
@@ -412,6 +410,8 @@ static void __init vr1000_map_io(void)
412 410
413 s3c24xx_uclk.parent = &s3c24xx_clkout1; 411 s3c24xx_uclk.parent = &s3c24xx_clkout1;
414 412
413 s3c24xx_register_clocks(vr1000_clocks, ARRAY_SIZE(vr1000_clocks));
414
415 pm_power_off = vr1000_power_off; 415 pm_power_off = vr1000_power_off;
416 416
417 s3c24xx_init_io(vr1000_iodesc, ARRAY_SIZE(vr1000_iodesc)); 417 s3c24xx_init_io(vr1000_iodesc, ARRAY_SIZE(vr1000_iodesc));
diff --git a/arch/arm/mach-s3c2440/mach-anubis.c b/arch/arm/mach-s3c2440/mach-anubis.c
index 3f0288eb1ed5..0f4e2882aa13 100644
--- a/arch/arm/mach-s3c2440/mach-anubis.c
+++ b/arch/arm/mach-s3c2440/mach-anubis.c
@@ -284,8 +284,6 @@ static struct clk *anubis_clocks[] = {
284static struct s3c24xx_board anubis_board __initdata = { 284static struct s3c24xx_board anubis_board __initdata = {
285 .devices = anubis_devices, 285 .devices = anubis_devices,
286 .devices_count = ARRAY_SIZE(anubis_devices), 286 .devices_count = ARRAY_SIZE(anubis_devices),
287 .clocks = anubis_clocks,
288 .clocks_count = ARRAY_SIZE(anubis_clocks),
289}; 287};
290 288
291static void __init anubis_map_io(void) 289static void __init anubis_map_io(void)
@@ -303,6 +301,8 @@ static void __init anubis_map_io(void)
303 301
304 s3c24xx_uclk.parent = &s3c24xx_clkout1; 302 s3c24xx_uclk.parent = &s3c24xx_clkout1;
305 303
304 s3c24xx_register_clocks(anubis_clocks, ARRAY_SIZE(anubis_clocks));
305
306 s3c_device_nand.dev.platform_data = &anubis_nand_info; 306 s3c_device_nand.dev.platform_data = &anubis_nand_info;
307 307
308 s3c24xx_init_io(anubis_iodesc, ARRAY_SIZE(anubis_iodesc)); 308 s3c24xx_init_io(anubis_iodesc, ARRAY_SIZE(anubis_iodesc));
diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c
index 2ed8e51f20c8..c9872210ab5a 100644
--- a/arch/arm/mach-s3c2440/mach-osiris.c
+++ b/arch/arm/mach-s3c2440/mach-osiris.c
@@ -254,8 +254,6 @@ static struct clk *osiris_clocks[] = {
254static struct s3c24xx_board osiris_board __initdata = { 254static struct s3c24xx_board osiris_board __initdata = {
255 .devices = osiris_devices, 255 .devices = osiris_devices,
256 .devices_count = ARRAY_SIZE(osiris_devices), 256 .devices_count = ARRAY_SIZE(osiris_devices),
257 .clocks = osiris_clocks,
258 .clocks_count = ARRAY_SIZE(osiris_clocks),
259}; 257};
260 258
261static void __init osiris_map_io(void) 259static void __init osiris_map_io(void)
@@ -275,6 +273,8 @@ static void __init osiris_map_io(void)
275 273
276 s3c24xx_uclk.parent = &s3c24xx_clkout1; 274 s3c24xx_uclk.parent = &s3c24xx_clkout1;
277 275
276 s3c24xx_register_clocks(osiris_clocks, ARRAY_SIZE(osiris_clocks));
277
278 s3c_device_nand.dev.platform_data = &osiris_nand_info; 278 s3c_device_nand.dev.platform_data = &osiris_nand_info;
279 279
280 s3c24xx_init_io(osiris_iodesc, ARRAY_SIZE(osiris_iodesc)); 280 s3c24xx_init_io(osiris_iodesc, ARRAY_SIZE(osiris_iodesc));
diff --git a/arch/arm/plat-s3c24xx/clock.c b/arch/arm/plat-s3c24xx/clock.c
index d3dc03a7383a..79cda0faec86 100644
--- a/arch/arm/plat-s3c24xx/clock.c
+++ b/arch/arm/plat-s3c24xx/clock.c
@@ -404,6 +404,18 @@ int s3c24xx_register_clock(struct clk *clk)
404 return 0; 404 return 0;
405} 405}
406 406
407int s3c24xx_register_clocks(struct clk **clks, int nr_clks)
408{
409 int fails = 0;
410
411 for (; nr_clks > 0; nr_clks--, clks++) {
412 if (s3c24xx_register_clock(*clks) < 0)
413 fails++;
414 }
415
416 return fails;
417}
418
407/* initalise all the clocks */ 419/* initalise all the clocks */
408 420
409int __init s3c24xx_setup_clocks(unsigned long xtal, 421int __init s3c24xx_setup_clocks(unsigned long xtal,
diff --git a/arch/arm/plat-s3c24xx/cpu.c b/arch/arm/plat-s3c24xx/cpu.c
index 6a2d1070e5a0..3e314a296255 100644
--- a/arch/arm/plat-s3c24xx/cpu.c
+++ b/arch/arm/plat-s3c24xx/cpu.c
@@ -187,16 +187,7 @@ static struct s3c24xx_board *board;
187 187
188void s3c24xx_set_board(struct s3c24xx_board *b) 188void s3c24xx_set_board(struct s3c24xx_board *b)
189{ 189{
190 int i;
191
192 board = b; 190 board = b;
193
194 if (b->clocks_count != 0) {
195 struct clk **ptr = b->clocks;
196
197 for (i = b->clocks_count; i > 0; i--, ptr++)
198 s3c24xx_register_clock(*ptr);
199 }
200} 191}
201 192
202/* cpu information */ 193/* cpu information */
diff --git a/include/asm-arm/plat-s3c24xx/clock.h b/include/asm-arm/plat-s3c24xx/clock.h
index f6135dbb9fa9..235b753cd877 100644
--- a/include/asm-arm/plat-s3c24xx/clock.h
+++ b/include/asm-arm/plat-s3c24xx/clock.h
@@ -56,6 +56,7 @@ extern struct mutex clocks_mutex;
56extern int s3c2410_clkcon_enable(struct clk *clk, int enable); 56extern int s3c2410_clkcon_enable(struct clk *clk, int enable);
57 57
58extern int s3c24xx_register_clock(struct clk *clk); 58extern int s3c24xx_register_clock(struct clk *clk);
59extern int s3c24xx_register_clocks(struct clk **clk, int nr_clks);
59 60
60extern int s3c24xx_setup_clocks(unsigned long xtal, 61extern int s3c24xx_setup_clocks(unsigned long xtal,
61 unsigned long fclk, 62 unsigned long fclk,
diff --git a/include/asm-arm/plat-s3c24xx/cpu.h b/include/asm-arm/plat-s3c24xx/cpu.h
index 15dd18810905..8c17ca4348f1 100644
--- a/include/asm-arm/plat-s3c24xx/cpu.h
+++ b/include/asm-arm/plat-s3c24xx/cpu.h
@@ -49,9 +49,6 @@ extern void s3c24xx_init_uartdevs(char *name,
49struct s3c24xx_board { 49struct s3c24xx_board {
50 struct platform_device **devices; 50 struct platform_device **devices;
51 unsigned int devices_count; 51 unsigned int devices_count;
52
53 struct clk **clocks;
54 unsigned int clocks_count;
55}; 52};
56 53
57extern void s3c24xx_set_board(struct s3c24xx_board *board); 54extern void s3c24xx_set_board(struct s3c24xx_board *board);