summaryrefslogtreecommitdiff
path: root/target/linux/brcm63xx/patches-3.9/315-MIPS-BCM63XX-append-cpu-number-to-irq_-stat-mask.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/brcm63xx/patches-3.9/315-MIPS-BCM63XX-append-cpu-number-to-irq_-stat-mask.patch')
-rw-r--r--target/linux/brcm63xx/patches-3.9/315-MIPS-BCM63XX-append-cpu-number-to-irq_-stat-mask.patch69
1 files changed, 45 insertions, 24 deletions
diff --git a/target/linux/brcm63xx/patches-3.9/315-MIPS-BCM63XX-append-cpu-number-to-irq_-stat-mask.patch b/target/linux/brcm63xx/patches-3.9/315-MIPS-BCM63XX-append-cpu-number-to-irq_-stat-mask.patch
index 98cd637..b8ec372 100644
--- a/target/linux/brcm63xx/patches-3.9/315-MIPS-BCM63XX-append-cpu-number-to-irq_-stat-mask.patch
+++ b/target/linux/brcm63xx/patches-3.9/315-MIPS-BCM63XX-append-cpu-number-to-irq_-stat-mask.patch
@@ -1,22 +1,33 @@
-From 6ec70ebfccd31ae3668d99b5703e5c9ce38384b4 Mon Sep 17 00:00:00 2001
+From 46442450ffb95a869894b0dfd1e5b4f973d4b4ee Mon Sep 17 00:00:00 2001
From: Jonas Gorski <jogo@openwrt.org>
Date: Thu, 25 Apr 2013 00:24:06 +0200
-Subject: [PATCH 06/13] MIPS: BCM63XX: append cpu number to irq_{stat,mask}*
+Subject: [PATCH 07/14] MIPS: BCM63XX: append cpu number to irq_{stat,mask}*
-For SMP affinity support we need to discrimnate between the registers
-for both CPUs.
+The SMP capable irq controllers have two interupt output pins which are
+controlled through separate registers.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
---
- arch/mips/bcm63xx/irq.c | 78 ++++++++++-----------
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | 16 ++---
- 2 files changed, 47 insertions(+), 47 deletions(-)
+ arch/mips/bcm63xx/irq.c | 86 ++++++++++-----------
+ arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | 16 ++--
+ 2 files changed, 51 insertions(+), 51 deletions(-)
--- a/arch/mips/bcm63xx/irq.c
+++ b/arch/mips/bcm63xx/irq.c
@@ -28,8 +28,8 @@ static void __internal_irq_unmask_64(uns
#ifndef BCMCPU_RUNTIME_DETECT
+ #ifdef CONFIG_BCM63XX_CPU_3368
+-#define irq_stat_reg PERF_IRQSTAT_3368_REG
+-#define irq_mask_reg PERF_IRQMASK_3368_REG
++#define irq_stat_reg0 PERF_IRQSTAT_3368_REG
++#define irq_mask_reg0 PERF_IRQMASK_3368_REG
+ #define irq_bits 32
+ #define is_ext_irq_cascaded 0
+ #define ext_irq_start 0
+@@ -39,8 +39,8 @@ static void __internal_irq_unmask_64(uns
+ #define ext_irq_cfg_reg2 0
+ #endif
#ifdef CONFIG_BCM63XX_CPU_6328
-#define irq_stat_reg PERF_IRQSTAT_6328_REG
-#define irq_mask_reg PERF_IRQMASK_6328_REG
@@ -25,7 +36,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
#define irq_bits 64
#define is_ext_irq_cascaded 1
#define ext_irq_start (BCM_6328_EXT_IRQ0 - IRQ_INTERNAL_BASE)
-@@ -39,8 +39,8 @@ static void __internal_irq_unmask_64(uns
+@@ -50,8 +50,8 @@ static void __internal_irq_unmask_64(uns
#define ext_irq_cfg_reg2 0
#endif
#ifdef CONFIG_BCM63XX_CPU_6338
@@ -36,7 +47,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
#define irq_bits 32
#define is_ext_irq_cascaded 0
#define ext_irq_start 0
-@@ -50,8 +50,8 @@ static void __internal_irq_unmask_64(uns
+@@ -61,8 +61,8 @@ static void __internal_irq_unmask_64(uns
#define ext_irq_cfg_reg2 0
#endif
#ifdef CONFIG_BCM63XX_CPU_6345
@@ -47,7 +58,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
#define irq_bits 32
#define is_ext_irq_cascaded 0
#define ext_irq_start 0
-@@ -61,8 +61,8 @@ static void __internal_irq_unmask_64(uns
+@@ -72,8 +72,8 @@ static void __internal_irq_unmask_64(uns
#define ext_irq_cfg_reg2 0
#endif
#ifdef CONFIG_BCM63XX_CPU_6348
@@ -58,7 +69,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
#define irq_bits 32
#define is_ext_irq_cascaded 0
#define ext_irq_start 0
-@@ -72,8 +72,8 @@ static void __internal_irq_unmask_64(uns
+@@ -83,8 +83,8 @@ static void __internal_irq_unmask_64(uns
#define ext_irq_cfg_reg2 0
#endif
#ifdef CONFIG_BCM63XX_CPU_6358
@@ -69,7 +80,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
#define irq_bits 32
#define is_ext_irq_cascaded 1
#define ext_irq_start (BCM_6358_EXT_IRQ0 - IRQ_INTERNAL_BASE)
-@@ -83,8 +83,8 @@ static void __internal_irq_unmask_64(uns
+@@ -94,8 +94,8 @@ static void __internal_irq_unmask_64(uns
#define ext_irq_cfg_reg2 0
#endif
#ifdef CONFIG_BCM63XX_CPU_6362
@@ -80,7 +91,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
#define irq_bits 64
#define is_ext_irq_cascaded 1
#define ext_irq_start (BCM_6362_EXT_IRQ0 - IRQ_INTERNAL_BASE)
-@@ -94,8 +94,8 @@ static void __internal_irq_unmask_64(uns
+@@ -105,8 +105,8 @@ static void __internal_irq_unmask_64(uns
#define ext_irq_cfg_reg2 0
#endif
#ifdef CONFIG_BCM63XX_CPU_6368
@@ -91,7 +102,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
#define irq_bits 64
#define is_ext_irq_cascaded 1
#define ext_irq_start (BCM_6368_EXT_IRQ0 - IRQ_INTERNAL_BASE)
-@@ -115,15 +115,15 @@ static void __internal_irq_unmask_64(uns
+@@ -126,15 +126,15 @@ static void __internal_irq_unmask_64(uns
#define internal_irq_unmask __internal_irq_unmask_64
#endif
@@ -110,7 +121,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
static void (*dispatch_internal)(void);
static int is_ext_irq_cascaded;
static unsigned int ext_irq_count;
-@@ -136,13 +136,13 @@ static void bcm63xx_init_irq(void)
+@@ -147,20 +147,20 @@ static void bcm63xx_init_irq(void)
{
int irq_bits;
@@ -120,6 +131,15 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
+ irq_mask_addr0 = bcm63xx_regset_address(RSET_PERF);
switch (bcm63xx_get_cpu_id()) {
+ case BCM3368_CPU_ID:
+- irq_stat_addr += PERF_IRQSTAT_3368_REG;
+- irq_mask_addr += PERF_IRQMASK_3368_REG;
++ irq_stat_addr0 += PERF_IRQSTAT_3368_REG;
++ irq_mask_addr0 += PERF_IRQMASK_3368_REG;
+ irq_bits = 32;
+ ext_irq_count = 4;
+ ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_3368;
+ break;
case BCM6328_CPU_ID:
- irq_stat_addr += PERF_IRQSTAT_6328_REG;
- irq_mask_addr += PERF_IRQMASK_6328_REG;
@@ -128,7 +148,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
irq_bits = 64;
ext_irq_count = 4;
is_ext_irq_cascaded = 1;
-@@ -151,29 +151,29 @@ static void bcm63xx_init_irq(void)
+@@ -169,29 +169,29 @@ static void bcm63xx_init_irq(void)
ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6328;
break;
case BCM6338_CPU_ID:
@@ -166,7 +186,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
irq_bits = 32;
ext_irq_count = 4;
is_ext_irq_cascaded = 1;
-@@ -182,8 +182,8 @@ static void bcm63xx_init_irq(void)
+@@ -200,8 +200,8 @@ static void bcm63xx_init_irq(void)
ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6358;
break;
case BCM6362_CPU_ID:
@@ -177,7 +197,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
irq_bits = 64;
ext_irq_count = 4;
is_ext_irq_cascaded = 1;
-@@ -192,8 +192,8 @@ static void bcm63xx_init_irq(void)
+@@ -210,8 +210,8 @@ static void bcm63xx_init_irq(void)
ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6362;
break;
case BCM6368_CPU_ID:
@@ -188,7 +208,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
irq_bits = 64;
ext_irq_count = 6;
is_ext_irq_cascaded = 1;
-@@ -253,8 +253,8 @@ void __dispatch_internal_##width(void)
+@@ -271,8 +271,8 @@ void __dispatch_internal_##width(void)
for (src = 0, tgt = (width / 32); src < (width / 32); src++) { \
u32 val; \
\
@@ -199,7 +219,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
pending[--tgt] = val; \
\
if (val) \
-@@ -281,9 +281,9 @@ static void __internal_irq_mask_##width(
+@@ -299,9 +299,9 @@ static void __internal_irq_mask_##width(
unsigned reg = (irq / 32) ^ (width/32 - 1); \
unsigned bit = irq & 0x1f; \
\
@@ -211,7 +231,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
} \
\
static void __internal_irq_unmask_##width(unsigned int irq) \
-@@ -292,9 +292,9 @@ static void __internal_irq_unmask_##widt
+@@ -310,9 +310,9 @@ static void __internal_irq_unmask_##widt
unsigned reg = (irq / 32) ^ (width/32 - 1); \
unsigned bit = irq & 0x1f; \
\
@@ -225,10 +245,10 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
BUILD_IPIC_INTERNAL(32);
--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-@@ -181,22 +181,22 @@
- #define SYS_PLL_SOFT_RESET 0x1
+@@ -215,23 +215,23 @@
/* Interrupt Mask register */
+ #define PERF_IRQMASK_3368_REG 0xc
-#define PERF_IRQMASK_6328_REG 0x20
+#define PERF_IRQMASK_6328_REG(x) (0x20 + (x) * 0x10)
#define PERF_IRQMASK_6338_REG 0xc
@@ -242,6 +262,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
+#define PERF_IRQMASK_6368_REG(x) (0x20 + (x) * 0x10)
/* Interrupt Status register */
+ #define PERF_IRQSTAT_3368_REG 0x10
-#define PERF_IRQSTAT_6328_REG 0x28
+#define PERF_IRQSTAT_6328_REG(x) (0x28 + (x) * 0x10)
#define PERF_IRQSTAT_6338_REG 0x10
@@ -255,4 +276,4 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
+#define PERF_IRQSTAT_6368_REG(x) (0x28 + (x) * 0x10)
/* External Interrupt Configuration register */
- #define PERF_EXTIRQ_CFG_REG_6328 0x18
+ #define PERF_EXTIRQ_CFG_REG_3368 0x14