aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/i8259.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/i8259.c')
-rw-r--r--arch/mips/kernel/i8259.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/mips/kernel/i8259.c b/arch/mips/kernel/i8259.c
index b33ba6cd7f5b..2345160e63fc 100644
--- a/arch/mips/kernel/i8259.c
+++ b/arch/mips/kernel/i8259.c
@@ -28,7 +28,7 @@
28 * moves to arch independent land 28 * moves to arch independent land
29 */ 29 */
30 30
31static int i8259A_auto_eoi; 31static int i8259A_auto_eoi = -1;
32DEFINE_SPINLOCK(i8259A_lock); 32DEFINE_SPINLOCK(i8259A_lock);
33/* some platforms call this... */ 33/* some platforms call this... */
34void mask_and_ack_8259A(unsigned int); 34void mask_and_ack_8259A(unsigned int);
@@ -216,7 +216,8 @@ spurious_8259A_irq:
216 216
217static int i8259A_resume(struct sys_device *dev) 217static int i8259A_resume(struct sys_device *dev)
218{ 218{
219 init_8259A(i8259A_auto_eoi); 219 if (i8259A_auto_eoi >= 0)
220 init_8259A(i8259A_auto_eoi);
220 return 0; 221 return 0;
221} 222}
222 223
@@ -226,8 +227,10 @@ static int i8259A_shutdown(struct sys_device *dev)
226 * the kernel initialization code can get it 227 * the kernel initialization code can get it
227 * out of. 228 * out of.
228 */ 229 */
229 outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */ 230 if (i8259A_auto_eoi >= 0) {
230 outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-1 */ 231 outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */
232 outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-1 */
233 }
231 return 0; 234 return 0;
232} 235}
233 236
@@ -252,7 +255,7 @@ static int __init i8259A_init_sysfs(void)
252 255
253device_initcall(i8259A_init_sysfs); 256device_initcall(i8259A_init_sysfs);
254 257
255void __init init_8259A(int auto_eoi) 258void init_8259A(int auto_eoi)
256{ 259{
257 unsigned long flags; 260 unsigned long flags;
258 261
@@ -325,8 +328,8 @@ void __init init_i8259_irqs (void)
325{ 328{
326 int i; 329 int i;
327 330
328 request_resource(&ioport_resource, &pic1_io_resource); 331 insert_resource(&ioport_resource, &pic1_io_resource);
329 request_resource(&ioport_resource, &pic2_io_resource); 332 insert_resource(&ioport_resource, &pic2_io_resource);
330 333
331 init_8259A(0); 334 init_8259A(0);
332 335