mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-15 19:51:37 +00:00
fdt_support: Use CONFIG_NR_DRAM_BANKS if necessary
If CONFIG_NR_DRAM_BANKS is bigger than the default
value (4) define MEMORY_BANKS_MAX as CONFIG_NR_DRAM_BANKS.
Fixes: 2a1f4f1758
("Revert "fdt_support: Use CONFIG_NR_DRAM_BANKS if defined"")
Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
This commit is contained in:
parent
0bdea7c430
commit
6b6f216f92
1 changed files with 4 additions and 0 deletions
|
@ -409,7 +409,11 @@ static int fdt_pack_reg(const void *fdt, void *buf, u64 *address, u64 *size,
|
|||
return p - (char *)buf;
|
||||
}
|
||||
|
||||
#if CONFIG_NR_DRAM_BANKS > 4
|
||||
#define MEMORY_BANKS_MAX CONFIG_NR_DRAM_BANKS
|
||||
#else
|
||||
#define MEMORY_BANKS_MAX 4
|
||||
#endif
|
||||
int fdt_fixup_memory_banks(void *blob, u64 start[], u64 size[], int banks)
|
||||
{
|
||||
int err, nodeoffset;
|
||||
|
|
Loading…
Add table
Reference in a new issue