Dear Meenakshi, > -----Original Message----- > From: Meenakshi Aggarwal <[email protected]> > Sent: Friday, April 5, 2019 7:57 PM > To: [email protected]; Prabhakar Kushwaha > <[email protected]> > Cc: Meenakshi Aggarwal <[email protected]> > Subject: [PATCH] drivers: net: mc: Report extra memory to Linux > > MC firmware need to be aligned to 512M, so minimum 512MB DDR is > reserved. > But MC support to work with 128MB or 256MB DDR memory also, in this case, > rest of the memory is not usable. > So reporting this extra memory to Linux through dtb memory fixup. > > Signed-off-by: Meenakshi Aggarwal <[email protected]> > --- > board/freescale/ls1088a/ls1088a.c | 31 > ++++++++++++++++++++++++++++--- > board/freescale/ls2080ardb/ls2080ardb.c | 32 > +++++++++++++++++++++++++++++--- > board/freescale/lx2160a/lx2160a.c | 31 > ++++++++++++++++++++++++++++--- > drivers/net/fsl-mc/mc.c | 10 ++++++++++ > include/fsl-mc/fsl_mc.h | 1 + > 5 files changed, 96 insertions(+), 9 deletions(-) > > diff --git a/board/freescale/ls1088a/ls1088a.c > b/board/freescale/ls1088a/ls1088a.c > index 6d11a13..96f0871 100644 > --- a/board/freescale/ls1088a/ls1088a.c > +++ b/board/freescale/ls1088a/ls1088a.c > @@ -738,11 +738,26 @@ void fsl_fdt_fixup_flash(void *fdt) int > ft_board_setup(void *blob, bd_t *bd) { > int i; > - u64 base[CONFIG_NR_DRAM_BANKS]; > - u64 size[CONFIG_NR_DRAM_BANKS]; > + bool mc_memory_bank = false; > + > + u64 *base; > + u64 *size; > + u64 mc_memory_base = 0; > + u64 mc_memory_size = 0; > + u16 total_memory_banks; > > ft_cpu_setup(blob, bd); > > + fdt_fixup_mc_ddr(&mc_memory_base, &mc_memory_size); > + > + if (mc_memory_base != 0) > + mc_memory_bank = true; > + > + total_memory_banks = CONFIG_NR_DRAM_BANKS + > mc_memory_bank; > +
mc_memory_bank has been assigned as "true" and you are adding it to total_memory_banks. You cannot assume "true"as 1 Please fix it. --pk _______________________________________________ U-Boot mailing list [email protected] https://lists.denx.de/listinfo/u-boot

