patch-2.4.22 linux-2.4.22/arch/mips/dec/kn02-irq.c
Next file: linux-2.4.22/arch/mips/dec/prom/Makefile
Previous file: linux-2.4.22/arch/mips/dec/ioasic-irq.c
Back to the patch index
Back to the overall index
- Lines: 70
- Date:
2003-08-25 04:44:39.000000000 -0700
- Orig file:
linux-2.4.21/arch/mips/dec/kn02-irq.c
- Orig date:
2002-11-28 15:53:10.000000000 -0800
diff -urN linux-2.4.21/arch/mips/dec/kn02-irq.c linux-2.4.22/arch/mips/dec/kn02-irq.c
@@ -4,7 +4,7 @@
* DECstation 5000/200 (KN02) Control and Status Register
* interrupts.
*
- * Copyright (c) 2002 Maciej W. Rozycki
+ * Copyright (c) 2002, 2003 Maciej W. Rozycki
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -37,7 +37,7 @@
static inline void unmask_kn02_irq(unsigned int irq)
{
- volatile u32 *csr = (volatile u32 *)KN02_CSR_ADDR;
+ volatile u32 *csr = (volatile u32 *)KN02_CSR_BASE;
cached_kn02_csr |= (1 << (irq - kn02_irq_base + 16));
*csr = cached_kn02_csr;
@@ -45,7 +45,7 @@
static inline void mask_kn02_irq(unsigned int irq)
{
- volatile u32 *csr = (volatile u32 *)KN02_CSR_ADDR;
+ volatile u32 *csr = (volatile u32 *)KN02_CSR_BASE;
cached_kn02_csr &= ~(1 << (irq - kn02_irq_base + 16));
*csr = cached_kn02_csr;
@@ -92,29 +92,29 @@
enable_kn02_irq(irq);
}
-#define set_kn02_affinity NULL
-
static struct hw_interrupt_type kn02_irq_type = {
- "KN02-CSR",
- startup_kn02_irq,
- shutdown_kn02_irq,
- enable_kn02_irq,
- disable_kn02_irq,
- ack_kn02_irq,
- end_kn02_irq,
- set_kn02_affinity,
+ .typename = "KN02-CSR",
+ .startup = startup_kn02_irq,
+ .shutdown = shutdown_kn02_irq,
+ .enable = enable_kn02_irq,
+ .disable = disable_kn02_irq,
+ .ack = ack_kn02_irq,
+ .end = end_kn02_irq,
};
void __init init_kn02_irqs(int base)
{
- volatile u32 *csr = (volatile u32 *)KN02_CSR_ADDR;
+ volatile u32 *csr = (volatile u32 *)KN02_CSR_BASE;
+ unsigned long flags;
int i;
- /* Mask interrupts and preset write-only bits. */
- cached_kn02_csr = (*csr & ~0xff0000) | 0xff;
+ /* Mask interrupts. */
+ spin_lock_irqsave(&kn02_lock, flags);
+ cached_kn02_csr &= ~KN03_CSR_IOINTEN;
*csr = cached_kn02_csr;
iob();
+ spin_unlock_irqrestore(&kn02_lock, flags);
for (i = base; i < base + KN02_IRQ_LINES; i++) {
irq_desc[i].status = IRQ_DISABLED;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)