diff options
author | Greg Ungerer <gerg@uclinux.org> | 2011-06-23 01:52:25 -0400 |
---|---|---|
committer | Greg Ungerer <gerg@uclinux.org> | 2011-07-24 21:20:41 -0400 |
commit | 622e9472dd723d5c7dc034510faae4b113e5bbc2 (patch) | |
tree | 468728239c79b081a9e7739e627728462eb9579e /arch/m68k/platform | |
parent | f4a5437333e405e967be660430e58fc2355c62c8 (diff) |
m68knommu: correctly use trap_init
Currently trap_init() is an empty function for m68knommu. Instead
the vectors are being setup as part of the IRQ initialization.
This is inconsistent with m68k and other architectures.
Change the local init_vectors() to be trap_init(), and init the
vectors at the correct time during startup. This will help merge of
m68k and m68knommu trap code in the furture.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68k/platform')
-rw-r--r-- | arch/m68k/platform/5272/intc.c | 2 | ||||
-rw-r--r-- | arch/m68k/platform/68328/ints.c | 7 | ||||
-rw-r--r-- | arch/m68k/platform/68360/ints.c | 8 | ||||
-rw-r--r-- | arch/m68k/platform/coldfire/intc-2.c | 2 | ||||
-rw-r--r-- | arch/m68k/platform/coldfire/intc-simr.c | 2 | ||||
-rw-r--r-- | arch/m68k/platform/coldfire/intc.c | 1 | ||||
-rw-r--r-- | arch/m68k/platform/coldfire/vectors.c | 10 |
7 files changed, 13 insertions, 19 deletions
diff --git a/arch/m68k/platform/5272/intc.c b/arch/m68k/platform/5272/intc.c index 7e715dfe281..7160e618b0a 100644 --- a/arch/m68k/platform/5272/intc.c +++ b/arch/m68k/platform/5272/intc.c | |||
@@ -162,8 +162,6 @@ void __init init_IRQ(void) | |||
162 | { | 162 | { |
163 | int irq, edge; | 163 | int irq, edge; |
164 | 164 | ||
165 | init_vectors(); | ||
166 | |||
167 | /* Mask all interrupt sources */ | 165 | /* Mask all interrupt sources */ |
168 | writel(0x88888888, MCF_MBAR + MCFSIM_ICR1); | 166 | writel(0x88888888, MCF_MBAR + MCFSIM_ICR1); |
169 | writel(0x88888888, MCF_MBAR + MCFSIM_ICR2); | 167 | writel(0x88888888, MCF_MBAR + MCFSIM_ICR2); |
diff --git a/arch/m68k/platform/68328/ints.c b/arch/m68k/platform/68328/ints.c index a90288cf744..22acb60b541 100644 --- a/arch/m68k/platform/68328/ints.c +++ b/arch/m68k/platform/68328/ints.c | |||
@@ -155,7 +155,7 @@ static struct irq_chip intc_irq_chip = { | |||
155 | * This function should be called during kernel startup to initialize | 155 | * This function should be called during kernel startup to initialize |
156 | * the machine vector table. | 156 | * the machine vector table. |
157 | */ | 157 | */ |
158 | void __init init_IRQ(void) | 158 | void __init trap_init(void) |
159 | { | 159 | { |
160 | int i; | 160 | int i; |
161 | 161 | ||
@@ -172,6 +172,11 @@ void __init init_IRQ(void) | |||
172 | _ramvec[69] = (e_vector) inthandler5; | 172 | _ramvec[69] = (e_vector) inthandler5; |
173 | _ramvec[70] = (e_vector) inthandler6; | 173 | _ramvec[70] = (e_vector) inthandler6; |
174 | _ramvec[71] = (e_vector) inthandler7; | 174 | _ramvec[71] = (e_vector) inthandler7; |
175 | } | ||
176 | |||
177 | void __init init_IRQ(void) | ||
178 | { | ||
179 | int i; | ||
175 | 180 | ||
176 | IVR = 0x40; /* Set DragonBall IVR (interrupt base) to 64 */ | 181 | IVR = 0x40; /* Set DragonBall IVR (interrupt base) to 64 */ |
177 | 182 | ||
diff --git a/arch/m68k/platform/68360/ints.c b/arch/m68k/platform/68360/ints.c index 4af0f4e30f7..44443820d20 100644 --- a/arch/m68k/platform/68360/ints.c +++ b/arch/m68k/platform/68360/ints.c | |||
@@ -63,9 +63,8 @@ static struct irq_chip intc_irq_chip = { | |||
63 | * This function should be called during kernel startup to initialize | 63 | * This function should be called during kernel startup to initialize |
64 | * the vector table. | 64 | * the vector table. |
65 | */ | 65 | */ |
66 | void init_IRQ(void) | 66 | void __init trap_init(void) |
67 | { | 67 | { |
68 | int i; | ||
69 | int vba = (CPM_VECTOR_BASE<<4); | 68 | int vba = (CPM_VECTOR_BASE<<4); |
70 | 69 | ||
71 | /* set up the vectors */ | 70 | /* set up the vectors */ |
@@ -130,6 +129,11 @@ void init_IRQ(void) | |||
130 | 129 | ||
131 | /* turn off all CPM interrupts */ | 130 | /* turn off all CPM interrupts */ |
132 | pquicc->intr_cimr = 0x00000000; | 131 | pquicc->intr_cimr = 0x00000000; |
132 | } | ||
133 | |||
134 | void init_IRQ(void) | ||
135 | { | ||
136 | int i; | ||
133 | 137 | ||
134 | for (i = 0; (i < NR_IRQS); i++) { | 138 | for (i = 0; (i < NR_IRQS); i++) { |
135 | irq_set_chip(i, &intc_irq_chip); | 139 | irq_set_chip(i, &intc_irq_chip); |
diff --git a/arch/m68k/platform/coldfire/intc-2.c b/arch/m68k/platform/coldfire/intc-2.c index 74b55cfbc3c..995093357c5 100644 --- a/arch/m68k/platform/coldfire/intc-2.c +++ b/arch/m68k/platform/coldfire/intc-2.c | |||
@@ -194,8 +194,6 @@ void __init init_IRQ(void) | |||
194 | { | 194 | { |
195 | int irq; | 195 | int irq; |
196 | 196 | ||
197 | init_vectors(); | ||
198 | |||
199 | /* Mask all interrupt sources */ | 197 | /* Mask all interrupt sources */ |
200 | __raw_writel(0x1, MCFICM_INTC0 + MCFINTC_IMRL); | 198 | __raw_writel(0x1, MCFICM_INTC0 + MCFINTC_IMRL); |
201 | #ifdef MCFICM_INTC1 | 199 | #ifdef MCFICM_INTC1 |
diff --git a/arch/m68k/platform/coldfire/intc-simr.c b/arch/m68k/platform/coldfire/intc-simr.c index d6a4d9d53e4..650d52e2927 100644 --- a/arch/m68k/platform/coldfire/intc-simr.c +++ b/arch/m68k/platform/coldfire/intc-simr.c | |||
@@ -171,8 +171,6 @@ void __init init_IRQ(void) | |||
171 | { | 171 | { |
172 | int irq, eirq; | 172 | int irq, eirq; |
173 | 173 | ||
174 | init_vectors(); | ||
175 | |||
176 | /* Mask all interrupt sources */ | 174 | /* Mask all interrupt sources */ |
177 | __raw_writeb(0xff, MCFINTC0_SIMR); | 175 | __raw_writeb(0xff, MCFINTC0_SIMR); |
178 | if (MCFINTC1_SIMR) | 176 | if (MCFINTC1_SIMR) |
diff --git a/arch/m68k/platform/coldfire/intc.c b/arch/m68k/platform/coldfire/intc.c index 0bbb414856e..5c0c150b406 100644 --- a/arch/m68k/platform/coldfire/intc.c +++ b/arch/m68k/platform/coldfire/intc.c | |||
@@ -139,7 +139,6 @@ void __init init_IRQ(void) | |||
139 | { | 139 | { |
140 | int irq; | 140 | int irq; |
141 | 141 | ||
142 | init_vectors(); | ||
143 | mcf_maskimr(0xffffffff); | 142 | mcf_maskimr(0xffffffff); |
144 | 143 | ||
145 | for (irq = 0; (irq < NR_IRQS); irq++) { | 144 | for (irq = 0; (irq < NR_IRQS); irq++) { |
diff --git a/arch/m68k/platform/coldfire/vectors.c b/arch/m68k/platform/coldfire/vectors.c index a21d3f870b7..3a7cc524ecd 100644 --- a/arch/m68k/platform/coldfire/vectors.c +++ b/arch/m68k/platform/coldfire/vectors.c | |||
@@ -35,21 +35,13 @@ asmlinkage void dbginterrupt_c(struct frame *fp) | |||
35 | 35 | ||
36 | extern e_vector *_ramvec; | 36 | extern e_vector *_ramvec; |
37 | 37 | ||
38 | void set_evector(int vecnum, void (*handler)(void)) | ||
39 | { | ||
40 | if (vecnum >= 0 && vecnum <= 255) | ||
41 | _ramvec[vecnum] = handler; | ||
42 | } | ||
43 | |||
44 | /***************************************************************************/ | ||
45 | |||
46 | /* Assembler routines */ | 38 | /* Assembler routines */ |
47 | asmlinkage void buserr(void); | 39 | asmlinkage void buserr(void); |
48 | asmlinkage void trap(void); | 40 | asmlinkage void trap(void); |
49 | asmlinkage void system_call(void); | 41 | asmlinkage void system_call(void); |
50 | asmlinkage void inthandler(void); | 42 | asmlinkage void inthandler(void); |
51 | 43 | ||
52 | void __init init_vectors(void) | 44 | void __init trap_init(void) |
53 | { | 45 | { |
54 | int i; | 46 | int i; |
55 | 47 | ||