summaryrefslogtreecommitdiff
path: root/arch/microblaze
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2012-07-04 13:12:37 +0200
committerMichal Simek <monstr@monstr.eu>2012-09-11 09:24:58 +0200
commit2380b8f529ae95cc51fa475e83101e40f4191a43 (patch)
treee5148174ae1255a921a514537ac40fab4d5145cf /arch/microblaze
parentbcbb046bd5cba6acb07aa99cad728726be8359e6 (diff)
downloadu-boot-imx-2380b8f529ae95cc51fa475e83101e40f4191a43.zip
u-boot-imx-2380b8f529ae95cc51fa475e83101e40f4191a43.tar.gz
u-boot-imx-2380b8f529ae95cc51fa475e83101e40f4191a43.tar.bz2
microblaze: Clean microblaze initialization
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>
Diffstat (limited to 'arch/microblaze')
-rw-r--r--arch/microblaze/cpu/start.S2
-rw-r--r--arch/microblaze/include/asm/processor.h3
-rw-r--r--arch/microblaze/lib/board.c17
3 files changed, 7 insertions, 15 deletions
diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S
index 8a2f634..8564c4e 100644
--- a/arch/microblaze/cpu/start.S
+++ b/arch/microblaze/cpu/start.S
@@ -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
/*
diff --git a/arch/microblaze/include/asm/processor.h b/arch/microblaze/include/asm/processor.h
index 2295d0a..2c4d5ff 100644
--- a/arch/microblaze/include/asm/processor.h
+++ b/arch/microblaze/include/asm/processor.h
@@ -28,4 +28,7 @@
extern char __end[];
extern char __text_start[];
+/* Microblaze board initialization function */
+void board_init(void);
+
#endif /* __ASM_MICROBLAZE_PROCESSOR_H */
diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c
index fde109f..b450367 100644
--- a/arch/microblaze/lib/board.c
+++ b/arch/microblaze/lib/board.c
@@ -39,13 +39,6 @@
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);