summaryrefslogtreecommitdiffstats
path: root/arch/mips/mti-sead3/sead3-setup.c
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2016-08-26 16:17:34 +0200
committerRalf Baechle <ralf@linux-mips.org>2016-10-05 01:31:20 +0200
commitb6d5e47e67292542a41c3fe367bacb364eb4e601 (patch)
tree009d252825c827993b2b6fb67b21827cb1fc20a4 /arch/mips/mti-sead3/sead3-setup.c
parentMIPS: SEAD3: Split obj-y entries across lines (diff)
downloadlinux-b6d5e47e67292542a41c3fe367bacb364eb4e601.tar.xz
linux-b6d5e47e67292542a41c3fe367bacb364eb4e601.zip
MIPS: SEAD3: Probe interrupt controllers using DT
Probe the CPU interrupt controller & optional Global Interrupt Controller (GIC) using devicetree rather than platform code. Because the bootloader on SEAD3 does not provide a device tree to the kernel & the device tree is always built in, we patch out the GIC node during boot if we detect that a GIC is not present in the system. The appropriate IRQ domain is discovered by platform code setting up device IRQ numbers temporarily. It will be removed by further patches which move the devices towards being probed via device tree. No behavioural change is intended by this patch. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Matt Redfearn <matt.redfearn@imgtec.com> Cc: Kefeng Wang <wangkefeng.wang@huawei.com> Cc: Jacek Anaszewski <j.anaszewski@samsung.com> Cc: Rob Herring <robh+dt@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14047/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to '')
-rw-r--r--arch/mips/mti-sead3/sead3-setup.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/mips/mti-sead3/sead3-setup.c b/arch/mips/mti-sead3/sead3-setup.c
index edfcaf06680d..c4fc0c6d2654 100644
--- a/arch/mips/mti-sead3/sead3-setup.c
+++ b/arch/mips/mti-sead3/sead3-setup.c
@@ -13,6 +13,7 @@
#include <asm/prom.h>
#include <asm/fw/fw.h>
+#include <asm/mach-sead3/sead3-dtshim.h>
#include <asm/mips-boards/generic.h>
const char *get_system_type(void)
@@ -89,20 +90,16 @@ void __init *plat_get_fdt(void)
void __init plat_mem_setup(void)
{
+ void *fdt = plat_get_fdt();
+
/* allow command line/bootloader env to override memory size in DT */
parse_memsize_param();
- /*
- * Load the builtin devicetree. This causes the chosen node to be
- * parsed resulting in our memory appearing
- */
- __dt_setup_arch(__dtb_start);
+ fdt = sead3_dt_shim(fdt);
+ __dt_setup_arch(fdt);
}
void __init device_tree_init(void)
{
- if (!initial_boot_params)
- return;
-
unflatten_and_copy_device_tree();
}