aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/patches-4.4/122-MIPS-store-the-appended-dtb-address-in-a-variable.patch
diff options
context:
space:
mode:
authorDaniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>2016-07-17 08:30:42 -0700
committerHauke Mehrtens <hauke@hauke-m.de>2016-09-12 22:36:55 +0200
commit993ad293597ac3e46574e2ccd074432824305a91 (patch)
tree06550379eea3d62814543bfebd70d4386a884532 /target/linux/lantiq/patches-4.4/122-MIPS-store-the-appended-dtb-address-in-a-variable.patch
parentd27bce8d28eb129af0abd9c80a7756301b7d588a (diff)
downloadupstream-993ad293597ac3e46574e2ccd074432824305a91.tar.gz
upstream-993ad293597ac3e46574e2ccd074432824305a91.tar.bz2
upstream-993ad293597ac3e46574e2ccd074432824305a91.zip
kernel: Backport pending appended DTB handling patches
Backport patches from upstream Linux kernel which are making the kernel stores the appended dtb not in the same resisters as defined in the UHI specification, use a separate variable on MIPS. Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us> [some modifications] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'target/linux/lantiq/patches-4.4/122-MIPS-store-the-appended-dtb-address-in-a-variable.patch')
-rw-r--r--target/linux/lantiq/patches-4.4/122-MIPS-store-the-appended-dtb-address-in-a-variable.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/target/linux/lantiq/patches-4.4/122-MIPS-store-the-appended-dtb-address-in-a-variable.patch b/target/linux/lantiq/patches-4.4/122-MIPS-store-the-appended-dtb-address-in-a-variable.patch
new file mode 100644
index 0000000000..a6641bf723
--- /dev/null
+++ b/target/linux/lantiq/patches-4.4/122-MIPS-store-the-appended-dtb-address-in-a-variable.patch
@@ -0,0 +1,49 @@
+From 15f37e1588920e010f20b53f04af94e91b8ee714 Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jogo@openwrt.org>
+Date: Mon, 20 Jun 2016 11:27:37 +0200
+Subject: [PATCH] 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>
+---
+ arch/mips/ath79/setup.c | 4 ++--
+ arch/mips/bmips/setup.c | 4 ++--
+ arch/mips/include/asm/bootinfo.h | 4 ++++
+ arch/mips/kernel/head.S | 21 ++++++++++++++-------
+ arch/mips/kernel/setup.c | 4 ++++
+ arch/mips/lantiq/prom.c | 4 ++--
+ arch/mips/pic32/pic32mzda/init.c | 4 ++--
+ 7 files changed, 30 insertions(+), 15 deletions(-)
+
+--- a/arch/mips/lantiq/prom.c
++++ b/arch/mips/lantiq/prom.c
+@@ -74,8 +74,8 @@ void __init plat_mem_setup(void)
+
+ set_io_port_base((unsigned long) KSEG1);
+
+- if (fw_arg0 == -2) /* UHI interface */
+- dtb = (void *)fw_arg1;
++ if (fw_passed_dtb) /* UHI interface */
++ dtb = (void *)fw_passed_dtb;
+ else if (__dtb_start != __dtb_end)
+ dtb = (void *)__dtb_start;
+ else