diff options
author | John Crispin <john@openwrt.org> | 2016-03-20 14:41:54 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2016-03-20 14:41:54 +0000 |
commit | d6d0597cdf2f8fc7ba305a920c20a7fb912d8401 (patch) | |
tree | 8c15f4a8db38d1c30678c3f9bbdff3279809d24d /target/linux/lantiq/patches-4.4/0120-MIPS-lantiq-add-support-for-device-tree-file-from-bo.patch | |
parent | 217a64375547a6a5f2aba81bd1dcb0b99148c2ba (diff) | |
download | upstream-d6d0597cdf2f8fc7ba305a920c20a7fb912d8401.tar.gz upstream-d6d0597cdf2f8fc7ba305a920c20a7fb912d8401.tar.bz2 upstream-d6d0597cdf2f8fc7ba305a920c20a7fb912d8401.zip |
lantiq: use upstream mechanism to append device tree file
Instead of using our patch-dtb program just place the device tree
behind the kernel binary and then let the in kernel mechanism fetch it.
This also adds support for having the device tree file in the boot
loader.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
SVN-Revision: 49050
Diffstat (limited to 'target/linux/lantiq/patches-4.4/0120-MIPS-lantiq-add-support-for-device-tree-file-from-bo.patch')
-rw-r--r-- | target/linux/lantiq/patches-4.4/0120-MIPS-lantiq-add-support-for-device-tree-file-from-bo.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/target/linux/lantiq/patches-4.4/0120-MIPS-lantiq-add-support-for-device-tree-file-from-bo.patch b/target/linux/lantiq/patches-4.4/0120-MIPS-lantiq-add-support-for-device-tree-file-from-bo.patch new file mode 100644 index 0000000000..3c6fa238b2 --- /dev/null +++ b/target/linux/lantiq/patches-4.4/0120-MIPS-lantiq-add-support-for-device-tree-file-from-bo.patch @@ -0,0 +1,48 @@ +From a32285ed4ba970b868b7fb49b716d776f4410ef6 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens <hauke@hauke-m.de> +Date: Sat, 19 Mar 2016 16:52:46 +0100 +Subject: [PATCH] MIPS: lantiq: add support for device tree file from boot + loader + +This fetches the device tree file like it is specified in the MIPS UHI +interface if one was found. This is also used when the device tree file +was appended to the kernel image with cat. +This code is copied from arch/mips/bmips/setup.c. + +Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> +--- + arch/mips/lantiq/prom.c | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +--- a/arch/mips/lantiq/prom.c ++++ b/arch/mips/lantiq/prom.c +@@ -65,6 +65,8 @@ static void __init prom_init_cmdline(voi + + void __init plat_mem_setup(void) + { ++ void *dtb; ++ + ioport_resource.start = IOPORT_RESOURCE_START; + ioport_resource.end = IOPORT_RESOURCE_END; + iomem_resource.start = IOMEM_RESOURCE_START; +@@ -72,11 +74,18 @@ void __init plat_mem_setup(void) + + set_io_port_base((unsigned long) KSEG1); + ++ if (fw_arg0 == -2) /* UHI interface */ ++ dtb = (void *)fw_arg1; ++ else if (__dtb_start != __dtb_end) ++ dtb = (void *)__dtb_start; ++ else ++ panic("no dtb found"); ++ + /* +- * Load the builtin devicetree. This causes the chosen node to be ++ * Load the devicetree. This causes the chosen node to be + * parsed resulting in our memory appearing + */ +- __dt_setup_arch(__dtb_start); ++ __dt_setup_arch(dtb); + } + + void __init device_tree_init(void) |