From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Mon, 10 Sep 2018 17:49:12 -0400 Subject: [U-Boot] fdt: fix get_next_memory_node() In-Reply-To: <20180909143011.4001-1-marek.vasut+renesas@gmail.com> References: <20180909143011.4001-1-marek.vasut+renesas@gmail.com> Message-ID: <20180910214912.GH4980@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sun, Sep 09, 2018 at 04:30:11PM +0200, Marek Vasut wrote: > The get_next_memory_node() always sets mem to -1 , which is incorrect, > because then every iteration of memory bank parsing will start from the > first memory bank instead of the previous one. > > On systems with 1 memory bank defined in DT and CONFIG_NR_DRAM_BANKS=4 , > like ie. r8a77965-salvator-x , this will result in U-Boot incorrectly > reporting four identical memory banks with the same memory configuration. > > Fix this by setting mem to startoffset value, which restores the behavior > before the fixed patch was applied. > > Signed-off-by: Marek Vasut > Cc: Jens Wiklander > Cc: Simon Glass > Cc: Tom Rini > Fixes: 452bc121027d ("fdt: fix fdtdec_setup_memory_banksize()") > Tested-by: Michal Simek [on ZynqMP} Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: