diff options
author | Stefan Roese <sr@denx.de> | 2009-05-11 15:50:12 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-06-12 20:39:47 +0200 |
commit | c790b04d230363d03939dc008bcc80f3ba4de1ae (patch) | |
tree | c3e0873b01e2f6f38648177f31358c623825f01d /lib_m68k/board.c | |
parent | d873133f2ba9bd613d5f6552c31cc70fb13f15d3 (diff) | |
download | u-boot-imx-c790b04d230363d03939dc008bcc80f3ba4de1ae.zip u-boot-imx-c790b04d230363d03939dc008bcc80f3ba4de1ae.tar.gz u-boot-imx-c790b04d230363d03939dc008bcc80f3ba4de1ae.tar.bz2 |
lib_arch/board.c: Move malloc initialization before flash_init()
This patch moves the malloc initialization before calling flash_init().
Upcoming changes to the NOR FLASH common CFI driver with optional
MTD infrastructure and MTD concatenation support will call malloc().
And nothing really speaks against enabling malloc just a little earlier
in the boot stage. Some architectures already enable malloc before
calling flash_init() so they don't need any changes here.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Scott McNutt <smcnutt@psyent.com>
Cc: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Daniel Hellstrom <daniel@gaisler.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: John Rigby <jcrigby@gmail.com>
Diffstat (limited to 'lib_m68k/board.c')
-rw-r--r-- | lib_m68k/board.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib_m68k/board.c b/lib_m68k/board.c index db45b00..584d1ff 100644 --- a/lib_m68k/board.c +++ b/lib_m68k/board.c @@ -519,6 +519,10 @@ void board_init_r (gd_t *id, ulong dest_addr) */ trap_init (CONFIG_SYS_SDRAM_BASE); + /* initialize malloc() area */ + mem_malloc_init (); + malloc_bin_reloc (); + #if !defined(CONFIG_SYS_NO_FLASH) puts ("FLASH: "); @@ -563,10 +567,6 @@ void board_init_r (gd_t *id, ulong dest_addr) WATCHDOG_RESET (); - /* initialize malloc() area */ - mem_malloc_init (); - malloc_bin_reloc (); - #ifdef CONFIG_SPI # if !defined(CONFIG_ENV_IS_IN_EEPROM) spi_init_f (); |