m68knommu: clean up init code in ColdFire 532x startup
authorGreg Ungerer <gerg@uclinux.org>
Sat, 24 Dec 2011 03:06:33 +0000 (13:06 +1000)
committerGreg Ungerer <gerg@uclinux.org>
Sun, 4 Mar 2012 23:43:10 +0000 (09:43 +1000)
We can move all the init calls in the initcall code into the more general
arch setup code (which is config_BSP() here). That makes the 532x consistent
with other ColdFire CPUs setup code. It means we can get rid of the initcall
setup here all together. Also make sure we set the arch mach_reset function
pointer to get the local arch reset code called on reset.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
arch/m68k/platform/532x/config.c

index 8c0dd5c..56b21fd 100644 (file)
@@ -83,6 +83,12 @@ void __init config_BSP(char *commandp, int size)
 #endif
 
        mach_sched_init = hw_timer_init;
+       mach_reset = m532x_cpu_reset;
+       m532x_uarts_init();
+       m532x_fec_init();
+#ifdef CONFIG_SPI_COLDFIRE_QSPI
+       m532x_qspi_init();
+#endif
 
 #ifdef CONFIG_BDM_DISABLE
        /*
@@ -95,20 +101,6 @@ void __init config_BSP(char *commandp, int size)
 }
 
 /***************************************************************************/
-
-static int __init init_BSP(void)
-{
-       m532x_uarts_init();
-       m532x_fec_init();
-#ifdef CONFIG_SPI_COLDFIRE_QSPI
-       m532x_qspi_init();
-#endif
-       return 0;
-}
-
-arch_initcall(init_BSP);
-
-/***************************************************************************/
 /* Board initialization */
 /***************************************************************************/
 /*