at91: move clock subsystem init to soc generic init
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Sun, 24 Apr 2011 10:20:28 +0000 (18:20 +0800)
committerArnd Bergmann <arnd@arndb.de>
Thu, 28 Jul 2011 15:07:29 +0000 (15:07 +0000)
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
arch/arm/mach-at91/at91cap9.c
arch/arm/mach-at91/at91rm9200.c
arch/arm/mach-at91/at91sam9260.c
arch/arm/mach-at91/at91sam9261.c
arch/arm/mach-at91/at91sam9263.c
arch/arm/mach-at91/at91sam9g45.c
arch/arm/mach-at91/at91sam9rl.c
arch/arm/mach-at91/generic.h
arch/arm/mach-at91/setup.c
arch/arm/mach-at91/soc.h

index 6287c0dea47a9f331a760e460d6d0659208a8bbf..bdf50974ef4c8d71428fc1aaec4099d0f3078309 100644 (file)
@@ -340,14 +340,12 @@ static void __init at91cap9_map_io(void)
        iotable_init(at91cap9_sram_desc, ARRAY_SIZE(at91cap9_sram_desc));
 }
 
-static void __init at91cap9_initialize(unsigned long main_clock)
+static void __init at91cap9_initialize(void)
+{
        at91_arch_reset = at91cap9_reset;
        pm_power_off = at91cap9_poweroff;
        at91_extern_irq = (1 << AT91CAP9_ID_IRQ0) | (1 << AT91CAP9_ID_IRQ1);
 
-       /* Init clock subsystem */
-       at91_clock_init(main_clock);
-
        /* Register the processor-specific clocks */
        at91cap9_register_clocks();
 
index 36d37bd49cbff3319d38630eb5569b942e1112a5..966129793dc8541471c306d091246bb5c9926fb0 100644 (file)
@@ -309,7 +309,7 @@ static void __init at91rm9200_map_io(void)
        iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc));
 }
 
-static void __init at91rm9200_initialize(unsigned long main_clock)
+static void __init at91rm9200_initialize(void)
 {
        at91_arch_reset = at91rm9200_reset;
        at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1)
@@ -317,9 +317,6 @@ static void __init at91rm9200_initialize(unsigned long main_clock)
                        | (1 << AT91RM9200_ID_IRQ4) | (1 << AT91RM9200_ID_IRQ5)
                        | (1 << AT91RM9200_ID_IRQ6);
 
-       /* Init clock subsystem */
-       at91_clock_init(main_clock);
-
        /* Register the processor-specific clocks */
        at91rm9200_register_clocks();
 
index 8a6b9aa1dd9ce35e812c1588554931446f3bff81..40e123fa9cf56537df61b078fcf37b4fc7761678 100644 (file)
@@ -350,16 +350,13 @@ static void __init at91sam9260_map_io(void)
                iotable_init(at91sam9260_sram_desc, ARRAY_SIZE(at91sam9260_sram_desc));
 }
 
-static void __init at91sam9260_initialize(unsigned long main_clock)
+static void __init at91sam9260_initialize(void)
 {
        at91_arch_reset = at91sam9_alt_reset;
        pm_power_off = at91sam9260_poweroff;
        at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1)
                        | (1 << AT91SAM9260_ID_IRQ2);
 
-       /* Init clock subsystem */
-       at91_clock_init(main_clock);
-
        /* Register the processor-specific clocks */
        at91sam9260_register_clocks();
 
index f6a2b30884e9e5768d85d5097a3d4a07ab9aa8ff..963197383870be736ed4f26b0d379150dbdfd891 100644 (file)
@@ -302,16 +302,13 @@ static void __init at91sam9261_map_io(void)
                iotable_init(at91sam9261_sram_desc, ARRAY_SIZE(at91sam9261_sram_desc));
 }
 
-static void __init at91sam9261_initialize(unsigned long main_clock)
+static void __init at91sam9261_initialize(void)
 {
        at91_arch_reset = at91sam9_alt_reset;
        pm_power_off = at91sam9261_poweroff;
        at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1)
                        | (1 << AT91SAM9261_ID_IRQ2);
 
-       /* Init clock subsystem */
-       at91_clock_init(main_clock);
-
        /* Register the processor-specific clocks */
        at91sam9261_register_clocks();
 
index 7245a8e112e5cf30ae2c82af1ecc154099c3571d..3860007480b098e3fa7956f5004950200a747450 100644 (file)
@@ -314,15 +314,12 @@ static void __init at91sam9263_map_io(void)
        iotable_init(at91sam9263_sram_desc, ARRAY_SIZE(at91sam9263_sram_desc));
 }
 
-static void __init at91sam9263_initialize(unsigned long main_clock)
+static void __init at91sam9263_initialize(void)
 {
        at91_arch_reset = at91sam9_alt_reset;
        pm_power_off = at91sam9263_poweroff;
        at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1);
 
-       /* Init clock subsystem */
-       at91_clock_init(main_clock);
-
        /* Register the processor-specific clocks */
        at91sam9263_register_clocks();
 
index 57a472633cda4151856feeda1aa9c277cb09be1c..e48dda1e5d454078793d621bb0e886089ddc7ec3 100644 (file)
@@ -330,15 +330,12 @@ static void __init at91sam9g45_map_io(void)
        iotable_init(at91sam9g45_sram_desc, ARRAY_SIZE(at91sam9g45_sram_desc));
 }
 
-static void __init at91sam9g45_initialize(unsigned long main_clock)
+static void __init at91sam9g45_initialize(void)
 {
        at91_arch_reset = at91sam9g45_reset;
        pm_power_off = at91sam9g45_poweroff;
        at91_extern_irq = (1 << AT91SAM9G45_ID_IRQ0);
 
-       /* Init clock subsystem */
-       at91_clock_init(main_clock);
-
        /* Register the processor-specific clocks */
        at91sam9g45_register_clocks();
 
index b83098c1db124f6c843ee6d45883da48fc25737d..53ac1a72e94ecdf0cfae91ff672b188bac5f19a1 100644 (file)
@@ -300,15 +300,12 @@ static void __init at91sam9rl_map_io(void)
        iotable_init(at91sam9rl_sram_desc, ARRAY_SIZE(at91sam9rl_sram_desc));
 }
 
-static void __init at91sam9rl_initialize(unsigned long main_clock)
+static void __init at91sam9rl_initialize(void)
 {
        at91_arch_reset = at91sam9_alt_reset;
        pm_power_off = at91sam9rl_poweroff;
        at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0);
 
-       /* Init clock subsystem */
-       at91_clock_init(main_clock);
-
        /* Register the processor-specific clocks */
        at91sam9rl_register_clocks();
 
index ce113900258efdd1a5fe761ac38160913146721b..a9d6ed4dbbc881a2dddbbad4e1cdf33bbfb2ea1a 100644 (file)
@@ -31,7 +31,6 @@ extern struct sys_timer at91sam926x_timer;
 extern struct sys_timer at91x40_timer;
 
  /* Clocks */
-extern int __init at91_clock_init(unsigned long main_clock);
 /*
  * function to specify the clock of the default console. As we do not
  * 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);
 extern void __init at91sam9rl_set_console_clock(int id);
 extern void __init at91sam9g45_set_console_clock(int id);
 extern void __init at91cap9_set_console_clock(int id);
+#ifdef CONFIG_AT91_PMC_UNIT
+extern int __init at91_clock_init(unsigned long main_clock);
+#else
+static int inline at91_clock_init(unsigned long main_clock) { return 0; }
+#endif
 struct device;
 
  /* Power Management */
index 9ea41838f5dba7422f4646944164935bdb528d52..dfbc3fa70d229232f2238576c6b3d8316c9a73b4 100644 (file)
@@ -248,5 +248,8 @@ void __init at91_map_io(void)
 
 void __init at91_initialize(unsigned long main_clock)
 {
-       at91_boot_soc.init(main_clock);
+       /* Init clock subsystem */
+       at91_clock_init(main_clock);
+
+       at91_boot_soc.init();
 }
index 9de7be4037c49aa90a90f76b40adc8337a7dd2c8..103030ac27fda9112d8c9e076117d0539354f888 100644 (file)
@@ -7,7 +7,7 @@
 struct at91_init_soc {
        unsigned int *default_irq_priority;
        void (*map_io)(void);
-       void (*init)(unsigned long main_clock);
+       void (*init)(void);
 };
 
 extern struct at91_init_soc at91_boot_soc;