summaryrefslogtreecommitdiffstats
path: root/arch/mips/bmips
diff options
context:
space:
mode:
authorJonas Gorski2016-06-20 11:27:37 +0200
committerRalf Baechle2016-08-02 14:00:16 +0200
commit15f37e1588920e010f20b53f04af94e91b8ee714 (patch)
tree09a5b4558b6915dadd2c4a3878feb37765514e1d /arch/mips/bmips
parentMIPS: ZBOOT: copy appended dtb to the end of the kernel (diff)
downloadkernel-qcow2-linux-15f37e1588920e010f20b53f04af94e91b8ee714.tar.gz
kernel-qcow2-linux-15f37e1588920e010f20b53f04af94e91b8ee714.tar.xz
kernel-qcow2-linux-15f37e1588920e010f20b53f04af94e91b8ee714.zip
MIPS: store the appended dtb address in a variable
Instead of rewriting the arguments to match the UHI spec, store the address of a appended or UHI supplied dtb in fw_supplied_dtb. That way the original bootloader arugments are kept intact while still making the use of an appended dtb invisible for mach code. Mach code can still find out if it is an appended dtb by comparing fw_arg1 with fw_supplied_dtb. Signed-off-by: Jonas Gorski <jogo@openwrt.org> Cc: Kevin Cernekee <cernekee@gmail.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: John Crispin <john@phrozen.org> Cc: Paul Burton <paul.burton@imgtec.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: Alban Bedel <albeu@free.fr> Cc: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us> Cc: Antony Pavlov <antonynpavlov@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13699/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/bmips')
-rw-r--r--arch/mips/bmips/setup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/bmips/setup.c b/arch/mips/bmips/setup.c
index f146d1219bde..6776042679dd 100644
--- a/arch/mips/bmips/setup.c
+++ b/arch/mips/bmips/setup.c
@@ -162,8 +162,8 @@ void __init plat_mem_setup(void)
/* intended to somewhat resemble ARM; see Documentation/arm/Booting */
if (fw_arg0 == 0 && fw_arg1 == 0xffffffff)
dtb = phys_to_virt(fw_arg2);
- else if (fw_arg0 == -2) /* UHI interface */
- dtb = (void *)fw_arg1;
+ else if (fw_passed_dtb) /* UHI interface */
+ dtb = (void *)fw_passed_dtb;
else if (__dtb_start != __dtb_end)
dtb = (void *)__dtb_start;
else