Hi Ramon, > If CONFIG_NR_DRAM_BANKS is bigger than the default > value (4) define MEMORY_BANKS_MAX as CONFIG_NR_DRAM_BANKS.
Also the Odroid XU3 uses 8 banks (but this is the fault of the board as it has 4x512MiB probably). I would also prefer to have the CONFIG_NR_DRAM_BANKS set to 4 (as it was) and provide patch to convert it to Kconfig. > > Fixes: 2a1f4f1758b5 ("Revert "fdt_support: Use CONFIG_NR_DRAM_BANKS > if defined"") Signed-off-by: Ramon Fried <ramon.fr...@gmail.com> > --- > common/fdt_support.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/common/fdt_support.c b/common/fdt_support.c > index 34d2bd59c4..d84f5dbade 100644 > --- a/common/fdt_support.c > +++ b/common/fdt_support.c > @@ -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; Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
pgpOdsSppLGrl.pgp
Description: OpenPGP digital signature
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot