interrupt cleanup
PATCH 2/3 interrupt cleanup
Tidy up the Cobalt interrupt handling code.
--
include/asm-mips/cobalt/cobalt.h +13 -10
@@ -25,15 +25,17 @@/* * CPU IRQs are 16 ... 23 */ -#define COBALT_TIMER_IRQ 18 -#define COBALT_SCC_IRQ 19/* pre-production has 85C30 */ -#define COBALT_RAQ_SCSI_IRQ 19 -#define COBALT_ETH0_IRQ 19 -#define COBALT_QUBE1_ETH0_IRQ 20 -#define COBALT_ETH1_IRQ 20 -#define COBALT_SERIAL_IRQ 21 -#define COBALT_SCSI_IRQ 21 -#define COBALT_VIA_IRQ 22/* Chained to VIA ISA bridge */ +#define COBALT_CPU_IRQ 16 + +#define COBALT_GALILEO_IRQ (COBALT_CPU_IRQ + 2) +#define COBALT_SCC_IRQ (COBALT_CPU_IRQ + 3)/* pre-production has 85C30 */ +#define COBALT_RAQ_SCSI_IRQ (COBALT_CPU_IRQ + 3) +#define COBALT_ETH0_IRQ (COBALT_CPU_IRQ + 3) +#define COBALT_QUBE1_ETH0_IRQ (COBALT_CPU_IRQ + 4) +#define COBALT_ETH1_IRQ (COBALT_CPU_IRQ + 4) +#define COBALT_SERIAL_IRQ (COBALT_CPU_IRQ + 5) +#define COBALT_SCSI_IRQ (COBALT_CPU_IRQ + 5) +#define COBALT_VIA_IRQ (COBALT_CPU_IRQ + 6)/* Chained to VIA ISA bridge */ /* * PCI configuration space manifest constants. These are wired into
@@ -84,7 +86,8 @@ *(volatile unsigned int *)GALILEO_REG (port) = (val); \ } while (0) -#define GALILEO_T0EXP 0x0100 +#define GALILEO_INTR_T0EXP (1 << 8) +#define GALILEO_ENTC0 0x01#define GALILEO_SELTC0 0x02
arch/mips/cobalt/setup.c +8 -7
@@ -50,16 +50,17 @@static void __init cobalt_timer_setup (struct irqaction *irq) { -/* Load timer value for 1KHz */ +/* Load timer value for 1KHz (TCLK is 50MHz) */ GALILEO_OUTL (50 *1000 *1000 /1000 ,GT_TC0_OFS ); -/* Register our timer interrupt */ -setup_irq (COBALT_TIMER_IRQ , irq); +/* Enable timer */ +GALILEO_OUTL (GALILEO_ENTC0 |GALILEO_SELTC0 ,GT_TC_CONTROL_OFS ); -/* Enable timer ints */ -GALILEO_OUTL ((GALILEO_ENTC0 |GALILEO_SELTC0 ),GT_TC_CONTROL_OFS ); -/* Unmask timer int */ -GALILEO_OUTL (GALILEO_T0EXP ,GT_INTRMASK_OFS ); +/* Register interrupt */ +setup_irq (COBALT_GALILEO_IRQ , irq); + +/* Enable interrupt */ +GALILEO_OUTL (GALILEO_INTR_T0EXP |GALILEO_INL (GT_INTRMASK_OFS ),GT_INTRMASK_OFS ); }extern struct pci_ops gt64111_pci_ops;
arch/mips/cobalt/irq.c +54 -34
113 lines not on this page · raw message
Quoted 1 line · Peter Horton
Tidy up the Cobalt interrupt handling code.
Applied also,
Ralf