summaryrefslogtreecommitdiff
path: root/lib_avr32/board.c
diff options
context:
space:
mode:
authorHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2009-02-23 10:27:15 +0100
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2009-02-23 10:27:15 +0100
commitea393eb1d6a786fc2e895f90abb5f7e7541aef45 (patch)
treef8e264ecda76805863f9336d8c3712767984f373 /lib_avr32/board.c
parent32688e572ff96715b41420e9a7f280db6c399b65 (diff)
parentcb5473205206c7f14cbb1e747f28ec75b48826e2 (diff)
Merge branch 'cleanups' into next
Diffstat (limited to 'lib_avr32/board.c')
-rw-r--r--lib_avr32/board.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib_avr32/board.c b/lib_avr32/board.c
index 2a98bd41f6d..959375a48f1 100644
--- a/lib_avr32/board.c
+++ b/lib_avr32/board.c
@@ -48,6 +48,14 @@ static unsigned long mem_malloc_start = 0;
static unsigned long mem_malloc_end = 0;
static unsigned long mem_malloc_brk = 0;
+/* Weak aliases for optional board functions */
+static int __do_nothing(void)
+{
+ return 0;
+}
+int board_postclk_init(void) __attribute__((weak, alias("__do_nothing")));
+int board_early_init_r(void) __attribute__((weak, alias("__do_nothing")));
+
/* The malloc area is right below the monitor image in RAM */
static void mem_malloc_init(void)
{
@@ -188,6 +196,7 @@ void board_init_f(ulong board_type)
/* Perform initialization sequence */
board_early_init_f();
cpu_init();
+ board_postclk_init();
env_init();
init_baudrate();
serial_init();
@@ -275,6 +284,8 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
gd->flags |= GD_FLG_RELOC;
gd->reloc_off = dest_addr - CONFIG_SYS_MONITOR_BASE;
+ board_early_init_r();
+
monitor_flash_len = _edata - _text;
/*
@@ -311,7 +322,6 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
mem_malloc_init();
malloc_bin_reloc();
dma_alloc_init();
- board_init_info();
enable_interrupts();