X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/b647cf8f1c2af7bbd491fc2e86560401e4c3e05d..8bf289d5fd108975bd6e092075e72634d8034ee5:/target/linux/ar7-2.6/files/arch/mips/ar7/irq.c diff --git a/target/linux/ar7-2.6/files/arch/mips/ar7/irq.c b/target/linux/ar7-2.6/files/arch/mips/ar7/irq.c index 301995227..1a09aedc1 100644 --- a/target/linux/ar7-2.6/files/arch/mips/ar7/irq.c +++ b/target/linux/ar7-2.6/files/arch/mips/ar7/irq.c @@ -33,17 +33,17 @@ #define REG_OFFSET(irq, reg) ((irq) / 32 * 0x4 + reg * 0x10) #define SEC_REG_OFFSET(reg) (EXCEPT_OFFSET + reg * 0x8) -#define SR_OFFSET (SEC_REG_OFFSET(0)) -#define CR_OFFSET(irq) (REG_OFFSET(irq, 1)) -#define SEC_CR_OFFSET (SEC_REG_OFFSET(1)) -#define ESR_OFFSET(irq) (REG_OFFSET(irq, 2)) -#define SEC_ESR_OFFSET (SEC_REG_OFFSET(2)) -#define ECR_OFFSET(irq) (REG_OFFSET(irq, 3)) -#define SEC_ECR_OFFSET (SEC_REG_OFFSET(3)) +#define SEC_SR_OFFSET (SEC_REG_OFFSET(0)) /* 0x80 */ +#define CR_OFFSET(irq) (REG_OFFSET(irq, 1)) /* 0x10 */ +#define SEC_CR_OFFSET (SEC_REG_OFFSET(1)) /* 0x88 */ +#define ESR_OFFSET(irq) (REG_OFFSET(irq, 2)) /* 0x20 */ +#define SEC_ESR_OFFSET (SEC_REG_OFFSET(2)) /* 0x90 */ +#define ECR_OFFSET(irq) (REG_OFFSET(irq, 3)) /* 0x30 */ +#define SEC_ECR_OFFSET (SEC_REG_OFFSET(3)) /* 0x98 */ #define PIR_OFFSET (0x40) #define MSR_OFFSET (0x44) -#define PM_OFFSET(irq) (REG_OFFSET(irq, 5)) -#define TM_OFFSET(irq) (REG_OFFSET(irq, 6)) +#define PM_OFFSET(irq) (REG_OFFSET(irq, 5)) /* 0x50 */ +#define TM_OFFSET(irq) (REG_OFFSET(irq, 6)) /* 0x60 */ #define REG(addr) (*(volatile u32 *)(KSEG1ADDR(AR7_REGS_IRQ) + addr)) @@ -59,6 +59,7 @@ static void ar7_irq_init(int base); static int ar7_irq_base; static struct irq_chip ar7_irq_type = { + .typename = "AR7", .name = "AR7", .unmask = ar7_unmask_irq, .mask = ar7_mask_irq, @@ -117,7 +118,7 @@ static void ar7_mask_secondary_irq(unsigned int irq) } void __init arch_init_irq(void) { - mips_cpu_irq_init(0); + mips_cpu_irq_init(); ar7_irq_init(8); } @@ -174,7 +175,7 @@ static irqreturn_t ar7_secondary_cascade(int interrupt, void *dev) int irq = 0, i; unsigned long status; - status = REG(SR_OFFSET); + status = REG(SEC_SR_OFFSET); if (unlikely(!status)) { spurious_interrupt(); return IRQ_NONE;