at91: move register clocks to soc generic init
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Sun, 24 Apr 2011 10:15:34 +0000 (18:15 +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/setup.c
arch/arm/mach-at91/soc.h

index bdf50974ef4c8d71428fc1aaec4099d0f3078309..8fabf91fe2e509ffb328ee7408372685c8bce5c1 100644 (file)
@@ -346,9 +346,6 @@ static void __init at91cap9_initialize(void)
        pm_power_off = at91cap9_poweroff;
        at91_extern_irq = (1 << AT91CAP9_ID_IRQ0) | (1 << AT91CAP9_ID_IRQ1);
 
-       /* Register the processor-specific clocks */
-       at91cap9_register_clocks();
-
        /* Register GPIO subsystem */
        at91_gpio_init(at91cap9_gpio, 4);
 
@@ -404,5 +401,6 @@ static unsigned int at91cap9_default_irq_priority[NR_AIC_IRQS] __initdata = {
 struct at91_init_soc __initdata at91cap9_soc = {
        .map_io = at91cap9_map_io,
        .default_irq_priority = at91cap9_default_irq_priority,
+       .register_clocks = at91cap9_register_clocks,
        .init = at91cap9_initialize,
 };
index 966129793dc8541471c306d091246bb5c9926fb0..010407802cdc9ad6ddf441acb665b598b74d8a5f 100644 (file)
@@ -317,9 +317,6 @@ static void __init at91rm9200_initialize(void)
                        | (1 << AT91RM9200_ID_IRQ4) | (1 << AT91RM9200_ID_IRQ5)
                        | (1 << AT91RM9200_ID_IRQ6);
 
-       /* Register the processor-specific clocks */
-       at91rm9200_register_clocks();
-
        /* Initialize GPIO subsystem */
        at91_gpio_init(at91rm9200_gpio,
                cpu_is_at91rm9200_bga() ? AT91RM9200_BGA : AT91RM9200_PQFP);
@@ -371,5 +368,6 @@ static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = {
 struct at91_init_soc __initdata at91rm9200_soc = {
        .map_io = at91rm9200_map_io,
        .default_irq_priority = at91rm9200_default_irq_priority,
+       .register_clocks = at91rm9200_register_clocks,
        .init = at91rm9200_initialize,
 };
index 40e123fa9cf56537df61b078fcf37b4fc7761678..1addfef73b6c2f4d8eacd5b5eba9bebe92010cf9 100644 (file)
@@ -357,9 +357,6 @@ static void __init at91sam9260_initialize(void)
        at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1)
                        | (1 << AT91SAM9260_ID_IRQ2);
 
-       /* Register the processor-specific clocks */
-       at91sam9260_register_clocks();
-
        /* Register GPIO subsystem */
        at91_gpio_init(at91sam9260_gpio, 3);
 }
@@ -409,5 +406,6 @@ static unsigned int at91sam9260_default_irq_priority[NR_AIC_IRQS] __initdata = {
 struct at91_init_soc __initdata at91sam9260_soc = {
        .map_io = at91sam9260_map_io,
        .default_irq_priority = at91sam9260_default_irq_priority,
+       .register_clocks = at91sam9260_register_clocks,
        .init = at91sam9260_initialize,
 };
index 963197383870be736ed4f26b0d379150dbdfd891..8f97bd4a5268e9924989e463c61ab503e3f08f58 100644 (file)
@@ -309,9 +309,6 @@ static void __init at91sam9261_initialize(void)
        at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1)
                        | (1 << AT91SAM9261_ID_IRQ2);
 
-       /* Register the processor-specific clocks */
-       at91sam9261_register_clocks();
-
        /* Register GPIO subsystem */
        at91_gpio_init(at91sam9261_gpio, 3);
 }
@@ -361,5 +358,6 @@ static unsigned int at91sam9261_default_irq_priority[NR_AIC_IRQS] __initdata = {
 struct at91_init_soc __initdata at91sam9261_soc = {
        .map_io = at91sam9261_map_io,
        .default_irq_priority = at91sam9261_default_irq_priority,
+       .register_clocks = at91sam9261_register_clocks,
        .init = at91sam9261_initialize,
 };
index 3860007480b098e3fa7956f5004950200a747450..da13f02acf5176b0008a5a1cb061cab9a8c0766e 100644 (file)
@@ -320,9 +320,6 @@ static void __init at91sam9263_initialize(void)
        pm_power_off = at91sam9263_poweroff;
        at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1);
 
-       /* Register the processor-specific clocks */
-       at91sam9263_register_clocks();
-
        /* Register GPIO subsystem */
        at91_gpio_init(at91sam9263_gpio, 5);
 }
@@ -372,5 +369,6 @@ static unsigned int at91sam9263_default_irq_priority[NR_AIC_IRQS] __initdata = {
 struct at91_init_soc __initdata at91sam9263_soc = {
        .map_io = at91sam9263_map_io,
        .default_irq_priority = at91sam9263_default_irq_priority,
+       .register_clocks = at91sam9263_register_clocks,
        .init = at91sam9263_initialize,
 };
index e48dda1e5d454078793d621bb0e886089ddc7ec3..cbc06451a45f61c836274994276993fbfc698dd8 100644 (file)
@@ -336,9 +336,6 @@ static void __init at91sam9g45_initialize(void)
        pm_power_off = at91sam9g45_poweroff;
        at91_extern_irq = (1 << AT91SAM9G45_ID_IRQ0);
 
-       /* Register the processor-specific clocks */
-       at91sam9g45_register_clocks();
-
        /* Register GPIO subsystem */
        at91_gpio_init(at91sam9g45_gpio, 5);
 }
@@ -388,5 +385,6 @@ static unsigned int at91sam9g45_default_irq_priority[NR_AIC_IRQS] __initdata = {
 struct at91_init_soc __initdata at91sam9g45_soc = {
        .map_io = at91sam9g45_map_io,
        .default_irq_priority = at91sam9g45_default_irq_priority,
+       .register_clocks = at91sam9g45_register_clocks,
        .init = at91sam9g45_initialize,
 };
index 53ac1a72e94ecdf0cfae91ff672b188bac5f19a1..55ee7d0a9bf4beb4db17454402950c56f32085a4 100644 (file)
@@ -306,9 +306,6 @@ static void __init at91sam9rl_initialize(void)
        pm_power_off = at91sam9rl_poweroff;
        at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0);
 
-       /* Register the processor-specific clocks */
-       at91sam9rl_register_clocks();
-
        /* Register GPIO subsystem */
        at91_gpio_init(at91sam9rl_gpio, 4);
 }
@@ -358,5 +355,6 @@ static unsigned int at91sam9rl_default_irq_priority[NR_AIC_IRQS] __initdata = {
 struct at91_init_soc __initdata at91sam9rl_soc = {
        .map_io = at91sam9rl_map_io,
        .default_irq_priority = at91sam9rl_default_irq_priority,
+       .register_clocks = at91sam9rl_register_clocks,
        .init = at91sam9rl_initialize,
 };
index dfbc3fa70d229232f2238576c6b3d8316c9a73b4..43251efd90d408836e0138fd0bcf0a5f04ac25ac 100644 (file)
@@ -251,5 +251,8 @@ void __init at91_initialize(unsigned long main_clock)
        /* Init clock subsystem */
        at91_clock_init(main_clock);
 
+       /* Register the processor-specific clocks */
+       at91_boot_soc.register_clocks();
+
        at91_boot_soc.init();
 }
index 103030ac27fda9112d8c9e076117d0539354f888..21ed8816e6f7021f2e2516256347c5be7890e68b 100644 (file)
@@ -7,6 +7,7 @@
 struct at91_init_soc {
        unsigned int *default_irq_priority;
        void (*map_io)(void);
+       void (*register_clocks)(void);
        void (*init)(void);
 };