diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-04-24 06:20:28 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-07-28 11:07:29 -0400 |
commit | 465393749da3a3229f6067246c7e8f97f7cc833d (patch) | |
tree | f2a8fa3d4c03fd09aed307e6d71805169c71003a /arch | |
parent | 8c3583b634d5705d8f604c0d9392bc273d19c256 (diff) |
at91: move clock subsystem init to soc generic init
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-at91/at91cap9.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91rm9200.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9260.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9261.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9263.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9g45.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9rl.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-at91/generic.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-at91/setup.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-at91/soc.h | 2 |
10 files changed, 18 insertions, 31 deletions
diff --git a/arch/arm/mach-at91/at91cap9.c b/arch/arm/mach-at91/at91cap9.c index 6287c0dea47a..bdf50974ef4c 100644 --- a/arch/arm/mach-at91/at91cap9.c +++ b/arch/arm/mach-at91/at91cap9.c | |||
@@ -340,14 +340,12 @@ static void __init at91cap9_map_io(void) | |||
340 | iotable_init(at91cap9_sram_desc, ARRAY_SIZE(at91cap9_sram_desc)); | 340 | iotable_init(at91cap9_sram_desc, ARRAY_SIZE(at91cap9_sram_desc)); |
341 | } | 341 | } |
342 | 342 | ||
343 | static void __init at91cap9_initialize(unsigned long main_clock) | 343 | static void __init at91cap9_initialize(void) |
344 | { | ||
344 | at91_arch_reset = at91cap9_reset; | 345 | at91_arch_reset = at91cap9_reset; |
345 | pm_power_off = at91cap9_poweroff; | 346 | pm_power_off = at91cap9_poweroff; |
346 | at91_extern_irq = (1 << AT91CAP9_ID_IRQ0) | (1 << AT91CAP9_ID_IRQ1); | 347 | at91_extern_irq = (1 << AT91CAP9_ID_IRQ0) | (1 << AT91CAP9_ID_IRQ1); |
347 | 348 | ||
348 | /* Init clock subsystem */ | ||
349 | at91_clock_init(main_clock); | ||
350 | |||
351 | /* Register the processor-specific clocks */ | 349 | /* Register the processor-specific clocks */ |
352 | at91cap9_register_clocks(); | 350 | at91cap9_register_clocks(); |
353 | 351 | ||
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index 36d37bd49cbf..966129793dc8 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c | |||
@@ -309,7 +309,7 @@ static void __init at91rm9200_map_io(void) | |||
309 | iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc)); | 309 | iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc)); |
310 | } | 310 | } |
311 | 311 | ||
312 | static void __init at91rm9200_initialize(unsigned long main_clock) | 312 | static void __init at91rm9200_initialize(void) |
313 | { | 313 | { |
314 | at91_arch_reset = at91rm9200_reset; | 314 | at91_arch_reset = at91rm9200_reset; |
315 | at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1) | 315 | at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1) |
@@ -317,9 +317,6 @@ static void __init at91rm9200_initialize(unsigned long main_clock) | |||
317 | | (1 << AT91RM9200_ID_IRQ4) | (1 << AT91RM9200_ID_IRQ5) | 317 | | (1 << AT91RM9200_ID_IRQ4) | (1 << AT91RM9200_ID_IRQ5) |
318 | | (1 << AT91RM9200_ID_IRQ6); | 318 | | (1 << AT91RM9200_ID_IRQ6); |
319 | 319 | ||
320 | /* Init clock subsystem */ | ||
321 | at91_clock_init(main_clock); | ||
322 | |||
323 | /* Register the processor-specific clocks */ | 320 | /* Register the processor-specific clocks */ |
324 | at91rm9200_register_clocks(); | 321 | at91rm9200_register_clocks(); |
325 | 322 | ||
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c index 8a6b9aa1dd9c..40e123fa9cf5 100644 --- a/arch/arm/mach-at91/at91sam9260.c +++ b/arch/arm/mach-at91/at91sam9260.c | |||
@@ -350,16 +350,13 @@ static void __init at91sam9260_map_io(void) | |||
350 | iotable_init(at91sam9260_sram_desc, ARRAY_SIZE(at91sam9260_sram_desc)); | 350 | iotable_init(at91sam9260_sram_desc, ARRAY_SIZE(at91sam9260_sram_desc)); |
351 | } | 351 | } |
352 | 352 | ||
353 | static void __init at91sam9260_initialize(unsigned long main_clock) | 353 | static void __init at91sam9260_initialize(void) |
354 | { | 354 | { |
355 | at91_arch_reset = at91sam9_alt_reset; | 355 | at91_arch_reset = at91sam9_alt_reset; |
356 | pm_power_off = at91sam9260_poweroff; | 356 | pm_power_off = at91sam9260_poweroff; |
357 | at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1) | 357 | at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1) |
358 | | (1 << AT91SAM9260_ID_IRQ2); | 358 | | (1 << AT91SAM9260_ID_IRQ2); |
359 | 359 | ||
360 | /* Init clock subsystem */ | ||
361 | at91_clock_init(main_clock); | ||
362 | |||
363 | /* Register the processor-specific clocks */ | 360 | /* Register the processor-specific clocks */ |
364 | at91sam9260_register_clocks(); | 361 | at91sam9260_register_clocks(); |
365 | 362 | ||
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c index f6a2b30884e9..963197383870 100644 --- a/arch/arm/mach-at91/at91sam9261.c +++ b/arch/arm/mach-at91/at91sam9261.c | |||
@@ -302,16 +302,13 @@ static void __init at91sam9261_map_io(void) | |||
302 | iotable_init(at91sam9261_sram_desc, ARRAY_SIZE(at91sam9261_sram_desc)); | 302 | iotable_init(at91sam9261_sram_desc, ARRAY_SIZE(at91sam9261_sram_desc)); |
303 | } | 303 | } |
304 | 304 | ||
305 | static void __init at91sam9261_initialize(unsigned long main_clock) | 305 | static void __init at91sam9261_initialize(void) |
306 | { | 306 | { |
307 | at91_arch_reset = at91sam9_alt_reset; | 307 | at91_arch_reset = at91sam9_alt_reset; |
308 | pm_power_off = at91sam9261_poweroff; | 308 | pm_power_off = at91sam9261_poweroff; |
309 | at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1) | 309 | at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1) |
310 | | (1 << AT91SAM9261_ID_IRQ2); | 310 | | (1 << AT91SAM9261_ID_IRQ2); |
311 | 311 | ||
312 | /* Init clock subsystem */ | ||
313 | at91_clock_init(main_clock); | ||
314 | |||
315 | /* Register the processor-specific clocks */ | 312 | /* Register the processor-specific clocks */ |
316 | at91sam9261_register_clocks(); | 313 | at91sam9261_register_clocks(); |
317 | 314 | ||
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c index 7245a8e112e5..3860007480b0 100644 --- a/arch/arm/mach-at91/at91sam9263.c +++ b/arch/arm/mach-at91/at91sam9263.c | |||
@@ -314,15 +314,12 @@ static void __init at91sam9263_map_io(void) | |||
314 | iotable_init(at91sam9263_sram_desc, ARRAY_SIZE(at91sam9263_sram_desc)); | 314 | iotable_init(at91sam9263_sram_desc, ARRAY_SIZE(at91sam9263_sram_desc)); |
315 | } | 315 | } |
316 | 316 | ||
317 | static void __init at91sam9263_initialize(unsigned long main_clock) | 317 | static void __init at91sam9263_initialize(void) |
318 | { | 318 | { |
319 | at91_arch_reset = at91sam9_alt_reset; | 319 | at91_arch_reset = at91sam9_alt_reset; |
320 | pm_power_off = at91sam9263_poweroff; | 320 | pm_power_off = at91sam9263_poweroff; |
321 | at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1); | 321 | at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1); |
322 | 322 | ||
323 | /* Init clock subsystem */ | ||
324 | at91_clock_init(main_clock); | ||
325 | |||
326 | /* Register the processor-specific clocks */ | 323 | /* Register the processor-specific clocks */ |
327 | at91sam9263_register_clocks(); | 324 | at91sam9263_register_clocks(); |
328 | 325 | ||
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c index 57a472633cda..e48dda1e5d45 100644 --- a/arch/arm/mach-at91/at91sam9g45.c +++ b/arch/arm/mach-at91/at91sam9g45.c | |||
@@ -330,15 +330,12 @@ static void __init at91sam9g45_map_io(void) | |||
330 | iotable_init(at91sam9g45_sram_desc, ARRAY_SIZE(at91sam9g45_sram_desc)); | 330 | iotable_init(at91sam9g45_sram_desc, ARRAY_SIZE(at91sam9g45_sram_desc)); |
331 | } | 331 | } |
332 | 332 | ||
333 | static void __init at91sam9g45_initialize(unsigned long main_clock) | 333 | static void __init at91sam9g45_initialize(void) |
334 | { | 334 | { |
335 | at91_arch_reset = at91sam9g45_reset; | 335 | at91_arch_reset = at91sam9g45_reset; |
336 | pm_power_off = at91sam9g45_poweroff; | 336 | pm_power_off = at91sam9g45_poweroff; |
337 | at91_extern_irq = (1 << AT91SAM9G45_ID_IRQ0); | 337 | at91_extern_irq = (1 << AT91SAM9G45_ID_IRQ0); |
338 | 338 | ||
339 | /* Init clock subsystem */ | ||
340 | at91_clock_init(main_clock); | ||
341 | |||
342 | /* Register the processor-specific clocks */ | 339 | /* Register the processor-specific clocks */ |
343 | at91sam9g45_register_clocks(); | 340 | at91sam9g45_register_clocks(); |
344 | 341 | ||
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c index b83098c1db12..53ac1a72e94e 100644 --- a/arch/arm/mach-at91/at91sam9rl.c +++ b/arch/arm/mach-at91/at91sam9rl.c | |||
@@ -300,15 +300,12 @@ static void __init at91sam9rl_map_io(void) | |||
300 | iotable_init(at91sam9rl_sram_desc, ARRAY_SIZE(at91sam9rl_sram_desc)); | 300 | iotable_init(at91sam9rl_sram_desc, ARRAY_SIZE(at91sam9rl_sram_desc)); |
301 | } | 301 | } |
302 | 302 | ||
303 | static void __init at91sam9rl_initialize(unsigned long main_clock) | 303 | static void __init at91sam9rl_initialize(void) |
304 | { | 304 | { |
305 | at91_arch_reset = at91sam9_alt_reset; | 305 | at91_arch_reset = at91sam9_alt_reset; |
306 | pm_power_off = at91sam9rl_poweroff; | 306 | pm_power_off = at91sam9rl_poweroff; |
307 | at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0); | 307 | at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0); |
308 | 308 | ||
309 | /* Init clock subsystem */ | ||
310 | at91_clock_init(main_clock); | ||
311 | |||
312 | /* Register the processor-specific clocks */ | 309 | /* Register the processor-specific clocks */ |
313 | at91sam9rl_register_clocks(); | 310 | at91sam9rl_register_clocks(); |
314 | 311 | ||
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index ce113900258e..a9d6ed4dbbc8 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h | |||
@@ -31,7 +31,6 @@ extern struct sys_timer at91sam926x_timer; | |||
31 | extern struct sys_timer at91x40_timer; | 31 | extern struct sys_timer at91x40_timer; |
32 | 32 | ||
33 | /* Clocks */ | 33 | /* Clocks */ |
34 | extern int __init at91_clock_init(unsigned long main_clock); | ||
35 | /* | 34 | /* |
36 | * function to specify the clock of the default console. As we do not | 35 | * function to specify the clock of the default console. As we do not |
37 | * use the device/driver bus, the dev_name is not intialize. So we need | 36 | * use the device/driver bus, the dev_name is not intialize. So we need |
@@ -44,6 +43,11 @@ extern void __init at91sam9263_set_console_clock(int id); | |||
44 | extern void __init at91sam9rl_set_console_clock(int id); | 43 | extern void __init at91sam9rl_set_console_clock(int id); |
45 | extern void __init at91sam9g45_set_console_clock(int id); | 44 | extern void __init at91sam9g45_set_console_clock(int id); |
46 | extern void __init at91cap9_set_console_clock(int id); | 45 | extern void __init at91cap9_set_console_clock(int id); |
46 | #ifdef CONFIG_AT91_PMC_UNIT | ||
47 | extern int __init at91_clock_init(unsigned long main_clock); | ||
48 | #else | ||
49 | static int inline at91_clock_init(unsigned long main_clock) { return 0; } | ||
50 | #endif | ||
47 | struct device; | 51 | struct device; |
48 | 52 | ||
49 | /* Power Management */ | 53 | /* Power Management */ |
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index 9ea41838f5db..dfbc3fa70d22 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c | |||
@@ -248,5 +248,8 @@ void __init at91_map_io(void) | |||
248 | 248 | ||
249 | void __init at91_initialize(unsigned long main_clock) | 249 | void __init at91_initialize(unsigned long main_clock) |
250 | { | 250 | { |
251 | at91_boot_soc.init(main_clock); | 251 | /* Init clock subsystem */ |
252 | at91_clock_init(main_clock); | ||
253 | |||
254 | at91_boot_soc.init(); | ||
252 | } | 255 | } |
diff --git a/arch/arm/mach-at91/soc.h b/arch/arm/mach-at91/soc.h index 9de7be4037c4..103030ac27fd 100644 --- a/arch/arm/mach-at91/soc.h +++ b/arch/arm/mach-at91/soc.h | |||
@@ -7,7 +7,7 @@ | |||
7 | struct at91_init_soc { | 7 | struct at91_init_soc { |
8 | unsigned int *default_irq_priority; | 8 | unsigned int *default_irq_priority; |
9 | void (*map_io)(void); | 9 | void (*map_io)(void); |
10 | void (*init)(unsigned long main_clock); | 10 | void (*init)(void); |
11 | }; | 11 | }; |
12 | 12 | ||
13 | extern struct at91_init_soc at91_boot_soc; | 13 | extern struct at91_init_soc at91_boot_soc; |