]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
microblaze: Clean microblaze initialization
authorMichal Simek <monstr@monstr.eu>
Wed, 4 Jul 2012 11:12:37 +0000 (13:12 +0200)
committerMichal Simek <monstr@monstr.eu>
Tue, 11 Sep 2012 07:24:58 +0000 (09:24 +0200)
Move board specific function to board_init function in board/ folder
Remove externs from generic board.c
Use board_init_f function in board.c file.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Acked-by: Stephan Linz <linz@li-pro.net>
arch/microblaze/cpu/start.S
arch/microblaze/include/asm/processor.h
arch/microblaze/lib/board.c
board/xilinx/microblaze-generic/microblaze-generic.c

index 8a2f634a99cd0b414df5a78c93dec0294c1c736a..8564c4e30ab5e70c6d1008c1cfcd3c8f14dfca9a 100644 (file)
@@ -149,7 +149,7 @@ clear_bss:
        cmp     r6, r5, r4 /* check if we have reach the end */
        bnei    r6, 2b
 3:     /* jumping to board_init */
-       brai    board_init
+       brai    board_init_f
 1:     bri     1b
 
 /*
index 2295d0a460ebd5cb73ef3f2ca8372f44ce8e9981..2c4d5ffc5cbbb8e779272109dd37510754ae7353 100644 (file)
@@ -28,4 +28,7 @@
 extern char __end[];
 extern char __text_start[];
 
+/* Microblaze board initialization function */
+void board_init(void);
+
 #endif /* __ASM_MICROBLAZE_PROCESSOR_H */
index fde109f56bb54b179c055b46d3d7b8ecfe5c8aef..b450367c312a8d763b33f7f76430ba363524021d 100644 (file)
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#ifdef CONFIG_SYS_GPIO_0
-extern int gpio_init (void);
-#endif
-#ifdef CONFIG_SYS_FSL_2
-extern void fsl_init2 (void);
-#endif
-
 /*
  * All attempts to come up with a "common" initialization sequence
  * that works for all boards and architectures failed: some of the
@@ -67,20 +60,14 @@ init_fnc_t *init_sequence[] = {
 #endif
        serial_init,
        console_init_f,
-#ifdef CONFIG_SYS_GPIO_0
-       gpio_init,
-#endif
        interrupts_init,
        timer_init,
-#ifdef CONFIG_SYS_FSL_2
-       fsl_init2,
-#endif
        NULL,
 };
 
 unsigned long monitor_flash_len;
 
-void board_init (void)
+void board_init_f(ulong not_used)
 {
        bd_t *bd;
        init_fnc_t **init_fnc_ptr;
@@ -189,6 +176,8 @@ void board_init (void)
        /* Initialize the console (after the relocation and devices init) */
        console_init_r();
 
+       board_init();
+
        /* Initialize from environment */
        load_addr = getenv_ulong("loadaddr", 16, load_addr);
 
index a1e2bfee872b8e84a62a80de1d7b8660b660996f..b75e62c715d8e930fdd885629cd33da3313cd010 100644 (file)
@@ -28,6 +28,7 @@
 #include <common.h>
 #include <config.h>
 #include <netdev.h>
+#include <asm/processor.h>
 #include <asm/microblaze_intc.h>
 #include <asm/asm.h>
 
@@ -69,6 +70,14 @@ int fsl_init2 (void) {
 }
 #endif
 
+void board_init(void)
+{
+       gpio_init();
+#ifdef CONFIG_SYS_FSL_2
+       fsl_init2();
+#endif
+}
+
 int board_eth_init(bd_t *bis)
 {
        int ret = 0;