diff options
-rw-r--r-- | arch/m68k/include/asm/m520xsim.h | 15 | ||||
-rw-r--r-- | arch/m68k/include/asm/m532xsim.h | 18 | ||||
-rw-r--r-- | arch/m68knommu/kernel/irq.c | 3 | ||||
-rw-r--r-- | arch/m68knommu/platform/coldfire/Makefile | 2 | ||||
-rw-r--r-- | arch/m68knommu/platform/coldfire/intc-simr.c | 24 |
5 files changed, 44 insertions, 18 deletions
diff --git a/arch/m68k/include/asm/m520xsim.h b/arch/m68k/include/asm/m520xsim.h index e79b9bc76a12..91de39c8d865 100644 --- a/arch/m68k/include/asm/m520xsim.h +++ b/arch/m68k/include/asm/m520xsim.h | |||
@@ -11,9 +11,8 @@ | |||
11 | #define m520xsim_h | 11 | #define m520xsim_h |
12 | /****************************************************************************/ | 12 | /****************************************************************************/ |
13 | 13 | ||
14 | |||
15 | /* | 14 | /* |
16 | * Define the 5282 SIM register set addresses. | 15 | * Define the 520x SIM register set addresses. |
17 | */ | 16 | */ |
18 | #define MCFICM_INTC0 0x48000 /* Base for Interrupt Ctrl 0 */ | 17 | #define MCFICM_INTC0 0x48000 /* Base for Interrupt Ctrl 0 */ |
19 | #define MCFINTC_IPRH 0x00 /* Interrupt pending 32-63 */ | 18 | #define MCFINTC_IPRH 0x00 /* Interrupt pending 32-63 */ |
@@ -26,6 +25,18 @@ | |||
26 | #define MCFINTC_CIMR 0x1d /* Clear interrupt mask 0-63 */ | 25 | #define MCFINTC_CIMR 0x1d /* Clear interrupt mask 0-63 */ |
27 | #define MCFINTC_ICR0 0x40 /* Base ICR register */ | 26 | #define MCFINTC_ICR0 0x40 /* Base ICR register */ |
28 | 27 | ||
28 | /* | ||
29 | * The common interrupt controller code just wants to know the absolute | ||
30 | * address to the SIMR and CIMR registers (not offsets into IPSBAR). | ||
31 | * The 520x family only has a single INTC unit. | ||
32 | */ | ||
33 | #define MCFINTC0_SIMR (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_SIMR) | ||
34 | #define MCFINTC0_CIMR (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_CIMR) | ||
35 | #define MCFINTC0_ICR0 (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0) | ||
36 | #define MCFINTC1_SIMR (0) | ||
37 | #define MCFINTC1_CIMR (0) | ||
38 | #define MCFINTC1_ICR0 (0) | ||
39 | |||
29 | #define MCFINT_VECBASE 64 | 40 | #define MCFINT_VECBASE 64 |
30 | #define MCFINT_UART0 26 /* Interrupt number for UART0 */ | 41 | #define MCFINT_UART0 26 /* Interrupt number for UART0 */ |
31 | #define MCFINT_UART1 27 /* Interrupt number for UART1 */ | 42 | #define MCFINT_UART1 27 /* Interrupt number for UART1 */ |
diff --git a/arch/m68k/include/asm/m532xsim.h b/arch/m68k/include/asm/m532xsim.h index 3e80810b3784..41c57e0f445a 100644 --- a/arch/m68k/include/asm/m532xsim.h +++ b/arch/m68k/include/asm/m532xsim.h | |||
@@ -58,10 +58,12 @@ | |||
58 | 58 | ||
59 | #define MCFSIM_IMR_MASKALL 0xFFFFFFFF /* All SIM intr sources */ | 59 | #define MCFSIM_IMR_MASKALL 0xFFFFFFFF /* All SIM intr sources */ |
60 | 60 | ||
61 | #define MCFSIM_IMR_SIMR0 0xFC04801C | 61 | #define MCFINTC0_SIMR 0xFC04801C |
62 | #define MCFSIM_IMR_SIMR1 0xFC04C01C | 62 | #define MCFINTC0_CIMR 0xFC04801D |
63 | #define MCFSIM_IMR_CIMR0 0xFC04801D | 63 | #define MCFINTC0_ICR0 0xFC048040 |
64 | #define MCFSIM_IMR_CIMR1 0xFC04C01D | 64 | #define MCFINTC1_SIMR 0xFC04C01C |
65 | #define MCFINTC1_CIMR 0xFC04C01D | ||
66 | #define MCFINTC1_ICR0 0xFC04C040 | ||
65 | 67 | ||
66 | #define MCFSIM_ICR_TIMER1 (0xFC048040+32) | 68 | #define MCFSIM_ICR_TIMER1 (0xFC048040+32) |
67 | #define MCFSIM_ICR_TIMER2 (0xFC048040+33) | 69 | #define MCFSIM_ICR_TIMER2 (0xFC048040+33) |
@@ -87,16 +89,16 @@ | |||
87 | 89 | ||
88 | 90 | ||
89 | #define mcf_enable_irq0(irq) \ | 91 | #define mcf_enable_irq0(irq) \ |
90 | *((volatile unsigned char*) (MCFSIM_IMR_CIMR0)) = (irq); | 92 | *((volatile unsigned char *) (MCFINTC0_CIMR)) = (irq); |
91 | 93 | ||
92 | #define mcf_enable_irq1(irq) \ | 94 | #define mcf_enable_irq1(irq) \ |
93 | *((volatile unsigned char*) (MCFSIM_IMR_CIMR1)) = (irq); | 95 | *((volatile unsigned char *) (MCFINTC1_CIMR)) = (irq); |
94 | 96 | ||
95 | #define mcf_disable_irq0(irq) \ | 97 | #define mcf_disable_irq0(irq) \ |
96 | *((volatile unsigned char*) (MCFSIM_IMR_SIMR0)) = (irq); | 98 | *((volatile unsigned char *) (MCFINTC0_SIMR)) = (irq); |
97 | 99 | ||
98 | #define mcf_disable_irq1(irq) \ | 100 | #define mcf_disable_irq1(irq) \ |
99 | *((volatile unsigned char*) (MCFSIM_IMR_SIMR1)) = (irq); | 101 | *((volatile unsigned char *) (MCFINTC1_SIMR)) = (irq); |
100 | 102 | ||
101 | /* | 103 | /* |
102 | * Define the Cache register flags. | 104 | * Define the Cache register flags. |
diff --git a/arch/m68knommu/kernel/irq.c b/arch/m68knommu/kernel/irq.c index f9965d7ee7c5..93d567bbf33d 100644 --- a/arch/m68knommu/kernel/irq.c +++ b/arch/m68knommu/kernel/irq.c | |||
@@ -30,7 +30,8 @@ asmlinkage void do_IRQ(int irq, struct pt_regs *regs) | |||
30 | } | 30 | } |
31 | 31 | ||
32 | #if !defined(CONFIG_M520x) && !defined(CONFIG_M523x) && \ | 32 | #if !defined(CONFIG_M520x) && !defined(CONFIG_M523x) && \ |
33 | !defined(CONFIG_M527x) && !defined(CONFIG_M528x) | 33 | !defined(CONFIG_M527x) && !defined(CONFIG_M528x) && \ |
34 | !defined(CONFIG_M532x) | ||
34 | 35 | ||
35 | static struct irq_chip m_irq_chip = { | 36 | static struct irq_chip m_irq_chip = { |
36 | .name = "M68K-INTC", | 37 | .name = "M68K-INTC", |
diff --git a/arch/m68knommu/platform/coldfire/Makefile b/arch/m68knommu/platform/coldfire/Makefile index bce9a62d3a13..6c5f699cf145 100644 --- a/arch/m68knommu/platform/coldfire/Makefile +++ b/arch/m68knommu/platform/coldfire/Makefile | |||
@@ -24,7 +24,7 @@ obj-$(CONFIG_M527x) += pit.o intc-2.o | |||
24 | obj-$(CONFIG_M5272) += timers.o | 24 | obj-$(CONFIG_M5272) += timers.o |
25 | obj-$(CONFIG_M528x) += pit.o intc-2.o | 25 | obj-$(CONFIG_M528x) += pit.o intc-2.o |
26 | obj-$(CONFIG_M5307) += timers.o | 26 | obj-$(CONFIG_M5307) += timers.o |
27 | obj-$(CONFIG_M532x) += timers.o | 27 | obj-$(CONFIG_M532x) += timers.o intc-simr.o |
28 | obj-$(CONFIG_M5407) += timers.o | 28 | obj-$(CONFIG_M5407) += timers.o |
29 | 29 | ||
30 | obj-y += pinmux.o gpio.o | 30 | obj-y += pinmux.o gpio.o |
diff --git a/arch/m68knommu/platform/coldfire/intc-simr.c b/arch/m68knommu/platform/coldfire/intc-simr.c index 3b614a3508fc..86fc2047d7ac 100644 --- a/arch/m68knommu/platform/coldfire/intc-simr.c +++ b/arch/m68knommu/platform/coldfire/intc-simr.c | |||
@@ -20,20 +20,32 @@ | |||
20 | 20 | ||
21 | static void intc_irq_mask(unsigned int irq) | 21 | static void intc_irq_mask(unsigned int irq) |
22 | { | 22 | { |
23 | if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECBASE + 63)) | 23 | if (irq >= MCFINT_VECBASE) { |
24 | __raw_writeb(irq - MCFINT_VECBASE, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_SIMR); | 24 | if (irq < MCFINT_VECBASE + 64) |
25 | __raw_writeb(irq - MCFINT_VECBASE, MCFINTC0_SIMR); | ||
26 | else if ((irq < MCFINT_VECBASE + 128) && MCFINTC1_SIMR) | ||
27 | __raw_writeb(irq - MCFINT_VECBASE - 64, MCFINTC1_SIMR); | ||
28 | } | ||
25 | } | 29 | } |
26 | 30 | ||
27 | static void intc_irq_unmask(unsigned int irq) | 31 | static void intc_irq_unmask(unsigned int irq) |
28 | { | 32 | { |
29 | if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECBASE + 63)) | 33 | if (irq >= MCFINT_VECBASE) { |
30 | __raw_writeb(irq - MCFINT_VECBASE, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_CIMR); | 34 | if (irq < MCFINT_VECBASE + 64) |
35 | __raw_writeb(irq - MCFINT_VECBASE, MCFINTC0_CIMR); | ||
36 | else if ((irq < MCFINT_VECBASE + 128) && MCFINTC1_CIMR) | ||
37 | __raw_writeb(irq - MCFINT_VECBASE - 64, MCFINTC1_CIMR); | ||
38 | } | ||
31 | } | 39 | } |
32 | 40 | ||
33 | static int intc_irq_set_type(unsigned int irq, unsigned int type) | 41 | static int intc_irq_set_type(unsigned int irq, unsigned int type) |
34 | { | 42 | { |
35 | if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECBASE + 63)) | 43 | if (irq >= MCFINT_VECBASE) { |
36 | __raw_writeb(5, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0 + irq - MCFINT_VECBASE); | 44 | if (irq < MCFINT_VECBASE + 64) |
45 | __raw_writeb(5, MCFINTC0_ICR0 + irq - MCFINT_VECBASE); | ||
46 | else if ((irq < MCFINT_VECBASE) && MCFINTC1_ICR0) | ||
47 | __raw_writeb(5, MCFINTC1_ICR0 + irq - MCFINT_VECBASE - 64); | ||
48 | } | ||
37 | return 0; | 49 | return 0; |
38 | } | 50 | } |
39 | 51 | ||