Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752102AbbEXPV6 (ORCPT ); Sun, 24 May 2015 11:21:58 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:7178 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751425AbbEXPVy (ORCPT ); Sun, 24 May 2015 11:21:54 -0400 From: Paul Burton To: CC: Paul Burton , Lars-Peter Clausen , Thomas Gleixner , Jason Cooper , Ralf Baechle , , Brian Norris Subject: [PATCH v5 18/37] MIPS: JZ4740: read intc base address from DT Date: Sun, 24 May 2015 16:11:28 +0100 Message-ID: <1432480307-23789-19-git-send-email-paul.burton@imgtec.com> X-Mailer: git-send-email 2.4.1 In-Reply-To: <1432480307-23789-1-git-send-email-paul.burton@imgtec.com> References: <1432480307-23789-1-git-send-email-paul.burton@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.168.159.140] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1745 Lines: 63 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: Ralf Baechle Cc: linux-mips@linux-mips.org --- Changes in v5: None Changes in v4: None Changes in v3: - New patch. Changes in v2: None arch/mips/jz4740/irq.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/mips/jz4740/irq.c b/arch/mips/jz4740/irq.c index 7ad6688..8b7df9a 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 */ -- 2.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/