diff options
author | Tom Rini <trini@konsulko.com> | 2020-09-07 14:31:00 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-09-07 14:31:00 -0400 |
commit | 314b9b4a38befd120ce1c566d9eea8e0ec9d8336 (patch) | |
tree | 928486047400278e4a08469cd61a94aba690e868 /lib/lmb.c | |
parent | 96d66a9b8ce11aae9f8bef5244b83b4740b37644 (diff) | |
parent | bac9da46c57511e574aa7e763e17fdd6f55db5bb (diff) |
Merge branch 'remove-config-nr-dram-banks-v9-2020-08-26' of https://gitlab.denx.de/u-boot/custodians/u-boot-marvell into next
Diffstat (limited to 'lib/lmb.c')
-rw-r--r-- | lib/lmb.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/lmb.c b/lib/lmb.c index 75082f35599..d126f8dc04a 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -117,22 +117,17 @@ static void lmb_reserve_common(struct lmb *lmb, void *fdt_blob) /* Initialize the struct, add memory and call arch/board reserve functions */ void lmb_init_and_reserve(struct lmb *lmb, struct bd_info *bd, void *fdt_blob) { -#ifdef CONFIG_NR_DRAM_BANKS int i; -#endif lmb_init(lmb); -#ifdef CONFIG_NR_DRAM_BANKS + for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { if (bd->bi_dram[i].size) { lmb_add(lmb, bd->bi_dram[i].start, bd->bi_dram[i].size); } } -#else - if (bd->bi_memsize) - lmb_add(lmb, bd->bi_memstart, bd->bi_memsize); -#endif + lmb_reserve_common(lmb, fdt_blob); } |