sunxi: board: Set fdtfile to match the DT chosen by SPL
authorSamuel Holland <samuel@sholland.org>
Sat, 24 Oct 2020 15:21:54 +0000 (10:21 -0500)
committerAndre Przywara <andre.przywara@arm.com>
Tue, 17 Nov 2020 00:42:20 +0000 (00:42 +0000)
commit20f3ee31c396aac6b227d6203c5875ed140f9423
tree62647ae9a30d8080c87bc3da66b5c6972db2eb13
parent41530cf6819cc1f454fb87934a7f4523548bfc91
sunxi: board: Set fdtfile to match the DT chosen by SPL

Previously, fdtfile was always the value in CONFIG_DEFAULT_DEVICE_TREE.
This meant that, regardless of the DT chosen by SPL (either by changing
the header in the image or by the selection code at runtime), Linux
always used the default DT.

By using the name from the SPL header (which, because of the previous
commit, always matches the DT used by U-Boot proper), Linux also sees
the same board as U-Boot/SPL, even if the boot script later loads a DT
from disk.

Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
[Andre: remove no longer needed CONFIG_SPL_LOAD_FIT guards]
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
board/sunxi/board.c