From: Paul Burton Date: Sun, 24 May 2015 15:11:28 +0000 (+0100) Subject: MIPS: JZ4740: read intc base address from DT X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3aa94590e7bf82680ccba5ce65f3946c5b374ac4;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git MIPS: JZ4740: read intc base address from DT Read the base address of the SoC interrupt controller from the device tree rather than relying upon the JZ4740_INTC_BASE_ADDR macro, in order to remove the dependency on the asm/mach-jz4740/base.h header. Signed-off-by: Paul Burton Cc: Lars-Peter Clausen Cc: Thomas Gleixner Cc: Jason Cooper Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: Brian Norris Patchwork: https://patchwork.linux-mips.org/patch/10145/ Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/jz4740/irq.c b/arch/mips/jz4740/irq.c index 7ad6688f371b..8b7df9a581c2 100644 --- a/arch/mips/jz4740/irq.c +++ b/arch/mips/jz4740/irq.c @@ -18,14 +18,13 @@ #include #include #include +#include #include #include #include #include #include - -#include #include #include "irq.h" @@ -114,7 +113,11 @@ static int __init ingenic_intc_of_init(struct device_node *node, goto out_unmap_irq; intc->num_chips = num_chips; - intc->base = ioremap(JZ4740_INTC_BASE_ADDR, 0x14); + intc->base = of_iomap(node, 0); + if (!intc->base) { + err = -ENODEV; + goto out_unmap_irq; + } for (i = 0; i < num_chips; i++) { /* Mask all irqs */