]> git.baikalelectronics.ru Git - uboot.git/commit
riscv: Only enable OF_BOARD_FIXUP for S-Mode
authorSean Anderson <seanga2@gmail.com>
Sat, 5 Sep 2020 13:22:11 +0000 (09:22 -0400)
committerAndes <uboot@andestech.com>
Mon, 26 Oct 2020 01:27:19 +0000 (09:27 +0800)
commitbcd78dec2f8a40bec121eafb5aa87df616ebb729
tree55b8674a030245b9e03d0cb3e2c2d69f123feb63
parent3b2f4916a4a68a4af2a96afcb2ddfe6cfc91fb3f
riscv: Only enable OF_BOARD_FIXUP for S-Mode

It is unsafe to enable OF_BOARD_FIXUP only based on OF_SEPARATE.
OF_SEPARATE may indicate that the user wishes U-Boot to use a different
device tree than one obtained via OF_PRIOR_STAGE. However, OF_SEPARATE may
also indicate that the device tree which would be obtained via
OF_PRIOR_STAGE is invalid, nonexistant, or otherwise unusable. In this
latter case, enabling OF_BOARD_FIXUP will result in corruption of the
device tree. To remedy this, only enable OF_BOARD_FIXUP if U-Boot is
configured for S-Mode.

Fixes: e01f8fd3ef16f478cffc332171fae0e045ce62fe
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Leo Liang <ycliang@andestech.com>
arch/riscv/Kconfig