diff options
-rw-r--r-- | board/atmel/atstk1000/flash.c | 4 | ||||
-rw-r--r-- | lib_avr32/board.c | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/board/atmel/atstk1000/flash.c b/board/atmel/atstk1000/flash.c index 958f4dc..93d790f 100644 --- a/board/atmel/atstk1000/flash.c +++ b/board/atmel/atstk1000/flash.c @@ -55,10 +55,6 @@ unsigned long flash_init(void) unsigned long addr; unsigned int i; - gd->bd->bi_flashstart = CFG_FLASH_BASE; - gd->bd->bi_flashsize = CFG_FLASH_SIZE; - gd->bd->bi_flashoffset = _edata - _text; - flash_info[0].size = CFG_FLASH_SIZE; flash_info[0].sector_count = 135; 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(); |