From 15f37e1588920e010f20b53f04af94e91b8ee714 Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Mon, 20 Jun 2016 11:27:37 +0200 Subject: 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 Cc: Kevin Cernekee Cc: Florian Fainelli Cc: John Crispin Cc: Paul Burton Cc: James Hogan Cc: Alban Bedel Cc: Daniel Gimpelevich Cc: Antony Pavlov Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13699/ Signed-off-by: Ralf Baechle --- arch/mips/ath79/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/mips/ath79') diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c index 7adab18..2ec9100 100644 --- a/arch/mips/ath79/setup.c +++ b/arch/mips/ath79/setup.c @@ -204,8 +204,8 @@ void __init plat_mem_setup(void) fdt_start = fw_getenvl("fdt_start"); if (fdt_start) __dt_setup_arch((void *)KSEG0ADDR(fdt_start)); - else if (fw_arg0 == -2) - __dt_setup_arch((void *)KSEG0ADDR(fw_arg1)); + else if (fw_passed_dtb) + __dt_setup_arch((void *)KSEG0ADDR(fw_passed_dtb)); if (mips_machtype != ATH79_MACH_GENERIC_OF) { ath79_reset_base = ioremap_nocache(AR71XX_RESET_BASE, -- cgit v1.1