Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca668a2d authored by Jonas Gorski's avatar Jonas Gorski Committed by Ralf Baechle
Browse files

MIPS: BMIPS: Accept UHI interface for passing a dtb



Detect and use passed dtb address using the UHI interface. This allows for
booting with a vmlinux.bin appended dtb instead of using a built-in one.

Signed-off-by: default avatarJonas Gorski <jogo@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: devicetree@vger.kernel.org
Cc: John Crispin <blogic@openwrt.org>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Cc: Andrew Bresticker <abrestic@chromium.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: James Hartley <James.Hartley@imgtec.com>
Patchwork: https://patchwork.linux-mips.org/patch/9742/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 0e12f4a3
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -149,6 +149,8 @@ void __init plat_mem_setup(void)
	/* intended to somewhat resemble ARM; see Documentation/arm/Booting */
	/* intended to somewhat resemble ARM; see Documentation/arm/Booting */
	if (fw_arg0 == 0 && fw_arg1 == 0xffffffff)
	if (fw_arg0 == 0 && fw_arg1 == 0xffffffff)
		dtb = phys_to_virt(fw_arg2);
		dtb = phys_to_virt(fw_arg2);
	else if (fw_arg0 == -2) /* UHI interface */
		dtb = (void *)fw_arg1;
	else if (__dtb_start != __dtb_end)
	else if (__dtb_start != __dtb_end)
		dtb = (void *)__dtb_start;
		dtb = (void *)__dtb_start;
	else
	else