]> git.baikalelectronics.ru Git - uboot.git/commit
lib: fdt: Fix fdtdec_setup_mem..() conversion to livetree API
authorMarek Vasut <marek.vasut@gmail.com>
Sat, 12 Sep 2020 10:42:52 +0000 (12:42 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 16 Sep 2020 20:54:00 +0000 (16:54 -0400)
commit308b1cb88b1a4a6cad275a157e4d81cfa7b83e3a
treed066c5a91273a63c908b14b177c9d568072fe83d
parentba2fa08dd86e4a22820c434e4053371cd53ae118
lib: fdt: Fix fdtdec_setup_mem..() conversion to livetree API

Repair incorrectly negated condition in the original patch which broke
DT memory node parsing on everything which has more than one DT memory
node, e.g. R-Car3.

In case multiple valid memory nodes are present in the DT, the original
patch would complete parsing cycle for the first memory node, then move
on to the next one, identify it as a valid, and end the parsing. The fix
is to invert the condition, to make the code behave as it did before the
livetree conversion, so it would continue parsing the subsequent memory
nodes as well.

Fixes: 99f9531552 ("lib: fdt: Convert fdtdes_setup_mem..() to livetree API")
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Tested-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
lib/fdtdec.c