]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
fdt: prevent clearing memory node if there are no banks
authorAndre Przywara <osp@andrep.de>
Sat, 20 Jun 2015 23:29:54 +0000 (00:29 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 9 Sep 2015 11:34:19 +0000 (13:34 +0200)
commitd156993d21f9fa306ab77ae9ac06e3b177b8f7a0
tree5055f07def8e62eb2f495c85bae3dec981618106
parent629bc5bdafed351bc5b06b48e581562645ab1d57
fdt: prevent clearing memory node if there are no banks

Avoid clearing the reg property in the memory DT node if no memory
banks have been specified for a board (CONFIG_NR_DRAM_BANKS == 0).
This allows boards to let U-Boot skip the DT memory tinkering in case
other firmware has already setup the node properly before.
This should be safe as all callers of fdt_fixup_memory_banks that use
a computed <banks> value put at least 1 in there.
Add some documentation comments to the header file.

Signed-off-by: Andre Przywara <osp@andrep.de>
Acked-by: Simon Glass <sjg@chromium.org>
common/fdt_support.c
include/fdt_support.h