323-MIPS-BCM63XX-wire-up-BCM6358-s-external-interrupts-4.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. From 4fd286c3e5a5bebab0391cf1937695b3ed6721a3 Mon Sep 17 00:00:00 2001
  2. From: Jonas Gorski <jogo@openwrt.org>
  3. Date: Sun, 30 Nov 2014 20:20:30 +0100
  4. Subject: [PATCH 4/5] MIPS: BCM63XX: wire up BCM6358's external interrupts 4
  5. and 5
  6. Due to the external interrupts being non consecutive, the previous
  7. implementation did not support them. Now that we treat both registers
  8. as separate irq controllers, there is no such limitation anymore and
  9. we can expose them for drivers to use.
  10. Signed-off-by: Jonas Gorski <jogo@openwrt.org>
  11. ---
  12. arch/mips/bcm63xx/irq.c | 5 ++++-
  13. arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 2 ++
  14. arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | 1 +
  15. 3 files changed, 7 insertions(+), 1 deletion(-)
  16. --- a/arch/mips/bcm63xx/irq.c
  17. +++ b/arch/mips/bcm63xx/irq.c
  18. @@ -109,11 +109,14 @@ void __init arch_init_irq(void)
  19. periph_width = 1;
  20. ext_intc_bases[0] += PERF_EXTIRQ_CFG_REG_6358;
  21. - ext_irq_count = 4;
  22. + ext_intc_bases[1] += PERF_EXTIRQ_CFG_REG2_6358;
  23. + ext_irq_count = 6;
  24. ext_irqs[0] = BCM_6358_EXT_IRQ0;
  25. ext_irqs[1] = BCM_6358_EXT_IRQ1;
  26. ext_irqs[2] = BCM_6358_EXT_IRQ2;
  27. ext_irqs[3] = BCM_6358_EXT_IRQ3;
  28. + ext_irqs[4] = BCM_6358_EXT_IRQ4;
  29. + ext_irqs[5] = BCM_6358_EXT_IRQ5;
  30. ext_shift = 4;
  31. break;
  32. case BCM6362_CPU_ID:
  33. --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
  34. +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
  35. @@ -895,6 +895,8 @@ enum bcm63xx_irq {
  36. #define BCM_6358_EXT_IRQ1 (IRQ_INTERNAL_BASE + 26)
  37. #define BCM_6358_EXT_IRQ2 (IRQ_INTERNAL_BASE + 27)
  38. #define BCM_6358_EXT_IRQ3 (IRQ_INTERNAL_BASE + 28)
  39. +#define BCM_6358_EXT_IRQ4 (IRQ_INTERNAL_BASE + 20)
  40. +#define BCM_6358_EXT_IRQ5 (IRQ_INTERNAL_BASE + 21)
  41. /*
  42. * 6362 irqs
  43. --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
  44. +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
  45. @@ -243,6 +243,7 @@
  46. #define PERF_EXTIRQ_CFG_REG_6362 0x18
  47. #define PERF_EXTIRQ_CFG_REG_6368 0x18
  48. +#define PERF_EXTIRQ_CFG_REG2_6358 0x1c
  49. #define PERF_EXTIRQ_CFG_REG2_6368 0x1c
  50. /* for 6348 only */