From 7b624ad254b97e5a25dca2304a398b64aeedaffe Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Sat, 6 Oct 2007 18:55:35 +0200 Subject: AVR32: Initialize bi_flash* in board_init_r The ATSTK1000-specific flash driver intializes bi_flashstart, bi_flashsize and bi_flashoffset, but other flash drivers, like the CFI driver, don't. Initialize these in board_init_r instead so that things will still be set up correctly when we switch to the CFI driver. Signed-off-by: Haavard Skinnemoen --- lib_avr32/board.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lib_avr32/board.c') diff --git a/lib_avr32/board.c b/lib_avr32/board.c index 8b9ca38..11d864f 100644 --- a/lib_avr32/board.c +++ b/lib_avr32/board.c @@ -310,10 +310,20 @@ void board_init_r(gd_t *new_gd, ulong dest_addr) malloc_bin_reloc(); dma_alloc_init(); board_init_info(); - flash_init(); + + bd->bi_flashstart = 0; + bd->bi_flashsize = 0; + bd->bi_flashoffset = 0; + +#ifndef CFG_NO_FLASH + bd->bi_flashstart = CFG_FLASH_BASE; + bd->bi_flashsize = flash_init(); + bd->bi_flashoffset = (unsigned long)_edata - (unsigned long)_text; if (bd->bi_flashsize) display_flash_config(); +#endif + if (bd->bi_dram[0].size) display_dram_config(); -- cgit v1.1