diff options
author | Stefano Babic <sbabic@denx.de> | 2014-08-08 08:18:40 (GMT) |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2014-08-08 08:18:40 (GMT) |
commit | c23154aab5825fec81d5500c53eaa686646c76b5 (patch) | |
tree | 32b0aafae49f664a65ced50981492bb031f006b8 /common/board_r.c | |
parent | cb07d74e2e0c0a41533b6bcd551af9bf2ebcf2bc (diff) | |
parent | 9d195a546179bc732aba9eacccf0a9a3db591288 (diff) | |
download | u-boot-fsl-qoriq-c23154aab5825fec81d5500c53eaa686646c76b5.tar.xz |
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'common/board_r.c')
-rw-r--r-- | common/board_r.c | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/common/board_r.c b/common/board_r.c index 602a239..8e7a3ac 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -259,6 +259,10 @@ static int initr_malloc(void) { ulong malloc_start; +#ifdef CONFIG_SYS_MALLOC_F_LEN + debug("Pre-reloc malloc() used %#lx bytes (%ld KB)\n", gd->malloc_ptr, + gd->malloc_ptr / 1024); +#endif /* The malloc area is immediately below the monitor copy in DRAM */ malloc_start = gd->relocaddr - TOTAL_MALLOC_LEN; mem_malloc_init((ulong)map_sysmem(malloc_start, TOTAL_MALLOC_LEN), @@ -269,27 +273,10 @@ static int initr_malloc(void) #ifdef CONFIG_DM static int initr_dm(void) { - int ret; - - ret = dm_init(); - if (ret) { - debug("dm_init() failed: %d\n", ret); - return ret; - } - ret = dm_scan_platdata(); - if (ret) { - debug("dm_scan_platdata() failed: %d\n", ret); - return ret; - } -#ifdef CONFIG_OF_CONTROL - ret = dm_scan_fdt(gd->fdt_blob); - if (ret) { - debug("dm_scan_fdt() failed: %d\n", ret); - return ret; - } -#endif - - return 0; + /* Save the pre-reloc driver model and start a new one */ + gd->dm_root_f = gd->dm_root; + gd->dm_root = NULL; + return dm_init_and_scan(false); } #endif @@ -588,15 +575,12 @@ static int initr_status_led(void) #if defined(CONFIG_CMD_SCSI) static int initr_scsi(void) { - /* Not supported properly on ARM yet */ -#ifndef CONFIG_ARM puts("SCSI: "); scsi_init(); -#endif return 0; } -#endif /* CONFIG_CMD_NET */ +#endif #if defined(CONFIG_CMD_DOC) static int initr_doc(void) |