From 3aa94590e7bf82680ccba5ce65f3946c5b374ac4 Mon Sep 17 00:00:00 2001 From: Paul Burton Date: Sun, 24 May 2015 16:11:28 +0100 Subject: 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 --- arch/mips/jz4740/irq.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'arch/mips/jz4740') 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 */ -- cgit v1.2.3-58-ga151