linux-mips
[Top] [All Lists]

[PATCH 1/3] MIPS: BCM63XX: add external irq support for BCM6345

To: linux-mips@linux-mips.org
Subject: [PATCH 1/3] MIPS: BCM63XX: add external irq support for BCM6345
From: Jonas Gorski <jonas.gorski@gmail.com>
Date: Fri, 13 Jul 2012 10:46:03 +0200
Cc: Ralf Baechle <ralf@linux-mips.org>, Florian Fainelli <florian@openwrt.org>, Maxime Bizon <mbizon@freebox.fr>, Kevin Cernekee <cernekee@gmail.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=qTJAs01VSMmr5k+FyJOoO25VGprtdyTTVdKB4fsS6DI=; b=tzoRxTEQOkVhFVdcXoI1adSu1A324wirdesk7uL/qgYk+ESeO5OEJkfraKmpzL2kkY Yi9d40sX8E81rOeKWWWtqQ0jMg66DOGdr/7kMCwmC6KZ1uyFQCHT+9KPqoyZ+9vFk7k2 33ZMMzmCu+OPcRwgK0yTW7Q+Ux/jGDuF8PP3m5Za8NvI50AMxZK3YJyAuvW5cfu8YMBX OVtfPywLatJ5H1xc5JoFysMvBkrJvNJYhNUhf/BjhuPQJCucJzvTCxJCDsPUWGpvVrLV vUkMMaI0CIquHYlcE66XdRaIi4waCCocuqRXMEXeE98414wt+H8CziurTmXlOHQLN6d2 i32A==
In-reply-to: <1342169165-18382-1-git-send-email-jonas.gorski@gmail.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1342169165-18382-1-git-send-email-jonas.gorski@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
From: Maxime Bizon <mbizon@freebox.fr>

Add the missing definitions for BCM6345.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
---
 arch/mips/bcm63xx/irq.c                           |    8 ++++++--
 arch/mips/bcm63xx/setup.c                         |    3 +++
 arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h |    1 +
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/mips/bcm63xx/irq.c b/arch/mips/bcm63xx/irq.c
index 18e051a..d40169f 100644
--- a/arch/mips/bcm63xx/irq.c
+++ b/arch/mips/bcm63xx/irq.c
@@ -56,8 +56,8 @@ static void __internal_irq_unmask_64(unsigned int irq) 
__maybe_unused;
 #define is_ext_irq_cascaded    0
 #define ext_irq_start          0
 #define ext_irq_end            0
-#define ext_irq_count          0
-#define ext_irq_cfg_reg1       0
+#define ext_irq_count          4
+#define ext_irq_cfg_reg1       PERF_EXTIRQ_CFG_REG_6345
 #define ext_irq_cfg_reg2       0
 #endif
 #ifdef CONFIG_BCM63XX_CPU_6348
@@ -143,11 +143,15 @@ static void bcm63xx_init_irq(void)
                irq_stat_addr += PERF_IRQSTAT_6338_REG;
                irq_mask_addr += PERF_IRQMASK_6338_REG;
                irq_bits = 32;
+               ext_irq_count = 4;
+               ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6338;
                break;
        case BCM6345_CPU_ID:
                irq_stat_addr += PERF_IRQSTAT_6345_REG;
                irq_mask_addr += PERF_IRQMASK_6345_REG;
                irq_bits = 32;
+               ext_irq_count = 4;
+               ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6345;
                break;
        case BCM6348_CPU_ID:
                irq_stat_addr += PERF_IRQSTAT_6348_REG;
diff --git a/arch/mips/bcm63xx/setup.c b/arch/mips/bcm63xx/setup.c
index 0e74a13..bd83836 100644
--- a/arch/mips/bcm63xx/setup.c
+++ b/arch/mips/bcm63xx/setup.c
@@ -74,6 +74,9 @@ void bcm63xx_machine_reboot(void)
        case BCM6338_CPU_ID:
                perf_regs[0] = PERF_EXTIRQ_CFG_REG_6338;
                break;
+       case BCM6345_CPU_ID:
+               perf_regs[0] = PERF_EXTIRQ_CFG_REG_6345;
+               break;
        case BCM6348_CPU_ID:
                perf_regs[0] = PERF_EXTIRQ_CFG_REG_6348;
                break;
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h 
b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
index 4ccc2a7..75f162d 100644
--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
@@ -161,6 +161,7 @@
 /* External Interrupt Configuration register */
 #define PERF_EXTIRQ_CFG_REG_6328       0x18
 #define PERF_EXTIRQ_CFG_REG_6338       0x14
+#define PERF_EXTIRQ_CFG_REG_6345       0x14
 #define PERF_EXTIRQ_CFG_REG_6348       0x14
 #define PERF_EXTIRQ_CFG_REG_6358       0x14
 #define PERF_EXTIRQ_CFG_REG_6368       0x18
-- 
1.7.2.5


<Prev in Thread] Current Thread [Next in Thread>