From: James S. <jsi...@us...> - 2001-10-31 18:29:12
|
Update of /cvsroot/linux-mips/linux/arch/mips/philips/nino In directory usw-pr-cvs1:/tmp/cvs-serv10055 Modified Files: int-handler.S irq.c kgdb.c power.c prom.c setup.c time.c Removed Files: rtc.c Log Message: Your daily dose of Nino updates. Index: int-handler.S =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/philips/nino/int-handler.S,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- int-handler.S 2001/10/26 22:30:51 1.2 +++ int-handler.S 2001/10/31 18:29:07 1.3 @@ -1,9 +1,14 @@ /* - * int-handler.S: Interrupt exception dispatch code for Philips Nino + * arch/mips/philips/nino/int-handler.S * - * Copyright (C) 2001 Steven J. Hill (sj...@re...) + * Copyright (C) 2001 Steven J. Hill (sj...@re...) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Interrupt exception dispatch code for Philips Nino */ - #include <asm/asm.h> #include <asm/mipsregs.h> #include <asm/regdef.h> @@ -12,27 +17,17 @@ /* * Here is the table of interrupts for the Philips Nino * which uses the Philips PR31700/Toshiba TMPR3912 core. - * - * MIPS IRQ PR31700 IRQ Source - * -------- ----------- ------ - * 0 1 Sound, LCD, telecom - * 1 2 UARTA & UARTB - * 2 3 MFIO (positive edge) - * 3 4 MFIO (negative edge) - * 4 5 Timers, power management - * 5 6 High priority interrupts - * - * We handle the IRQ according to the priorities below: - * - * Highest ---- High priority interrupts - * UARTA & UARTB - * Timers, power management - * Sound, LCD, telecom - * Multi-function IO (positive edge) - * Lowest ---- Multi-function IO (negative edge) * - * then we just return, if multiple IRQs are pending then - * we will just take another exception, big deal. + * MIPS IRQ Description + * -------- -------------------------------- + * 0 SW0 interrupt (unused) + * 1 SW1 interrupt (unused) + * 2 + * 3 + * 4 PR31700 low priority interrupts + * 5 + * 6 PR31700 high priority interrupts + * 7 */ .text @@ -43,40 +38,29 @@ SAVE_ALL CLI .set at - mfc0 s0, CP0_CAUSE # get irq mask + mfc0 s0, CP0_CAUSE # determine cause - /* Check for IRQ4 */ - andi a0, s0, C_IRQ4 + andi a0, s0, CAUSEF_IP6 beq a0, zero, 1f - andi a0, s0, C_IRQ2 # delay slot, check for IRQ2 - - /* High priority interrupt */ + andi a0, s0, CAUSEF_IP4 # delay slot move a0, sp - jal irq4_dispatch + jal irq6_dispatch nop # delay slot - j ret_from_irq nop # delay slot 1: - /* Check for IRQ2 */ beq a0, zero, 1f nop # delay slot - - /* UART interrupt of some sort */ move a0, sp - jal irq2_dispatch + jal irq4_dispatch nop # delay slot - j ret_from_irq nop # delay slot 1: /* We should never get here */ move a0, sp - jal irq_bad - nop - - j ret_from_irq + j irq_bad nop END(ninoIRQ) Index: irq.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/philips/nino/irq.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- irq.c 2001/10/29 17:37:01 1.4 +++ irq.c 2001/10/31 18:29:07 1.5 @@ -1,7 +1,13 @@ /* - * include/arch/mips/philips/nino/irq.c + * arch/mips/philips/nino/irq.c * - * Copyright (C) 2001 Steven J. Hill (sj...@re...) + * Copyright (C) 2001 Steven J. Hill (sj...@re...) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Interrupt service routines for Philips Nino */ #include <linux/init.h> #include <linux/sched.h> @@ -13,7 +19,7 @@ extern asmlinkage void do_IRQ(int irq, struct pt_regs *regs); -static void enable_irq4(unsigned int irq) +static void enable_irq6(unsigned int irq) { if(irq == 0) { IntEnable5 |= INT5_PERIODICINT; @@ -21,14 +27,14 @@ } } -static unsigned int startup_irq4(unsigned int irq) +static unsigned int startup_irq6(unsigned int irq) { - enable_irq4(irq); + enable_irq6(irq); return 0; /* Never anything pending */ } -static void disable_irq4(unsigned int irq) +static void disable_irq6(unsigned int irq) { if(irq == 0) { IntEnable6 &= ~INT6_PERIODICINT; @@ -37,27 +43,27 @@ } } -#define shutdown_irq4 disable_irq4 -#define mask_and_ack_irq4 disable_irq4 +#define shutdown_irq6 disable_irq6 +#define mask_and_ack_irq6 disable_irq6 -static void end_irq4(unsigned int irq) +static void end_irq6(unsigned int irq) { if(!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) - enable_irq4(irq); + enable_irq6(irq); } -static struct hw_interrupt_type irq4_type = { +static struct hw_interrupt_type irq6_type = { "MIPS", - startup_irq4, - shutdown_irq4, - enable_irq4, - disable_irq4, - mask_and_ack_irq4, - end_irq4, + startup_irq6, + shutdown_irq6, + enable_irq6, + disable_irq6, + mask_and_ack_irq6, + end_irq6, NULL }; -void irq4_dispatch(struct pt_regs *regs) +void irq6_dispatch(struct pt_regs *regs) { int irq = -1; @@ -68,8 +74,7 @@ /* if irq == -1, then the interrupt has already been cleared */ if(irq == -1) { - printk("IRQ6 Status Register = 0x%08lx\n", IntStatus6); - goto end; + panic("No handler installed for MIPS IRQ6\n"); } done: @@ -79,68 +84,59 @@ return; } -static void enable_irq2(unsigned int irq) +static void enable_irq4(unsigned int irq) { set_cp0_status(STATUSF_IP4); - if(irq == 2 || irq == 3) { + if(irq == 2) { IntClear2 = 0xffffffff; - IntEnable2 = 0xfffff000; + IntEnable2 |= 0x07c00000; } } -static unsigned int startup_irq2(unsigned int irq) +static unsigned int startup_irq4(unsigned int irq) { - enable_irq2(irq); + enable_irq4(irq); return 0; /* Never anything pending */ } -static void disable_irq2(unsigned int irq) +static void disable_irq4(unsigned int irq) { clear_cp0_status(STATUSF_IP4); } -#define shutdown_irq2 disable_irq2 -#define mask_and_ack_irq2 disable_irq2 +#define shutdown_irq4 disable_irq4 +#define mask_and_ack_irq4 disable_irq4 -static void end_irq2(unsigned int irq) +static void end_irq4(unsigned int irq) { if(!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) - enable_irq2(irq); + enable_irq4(irq); } -static struct hw_interrupt_type irq2_type = { +static struct hw_interrupt_type irq4_type = { "MIPS", - startup_irq2, - shutdown_irq2, - enable_irq2, - disable_irq2, - mask_and_ack_irq2, - end_irq2, + startup_irq4, + shutdown_irq4, + enable_irq4, + disable_irq4, + mask_and_ack_irq4, + end_irq4, NULL }; -void irq2_dispatch(struct pt_regs *regs) +void irq4_dispatch(struct pt_regs *regs) { int irq = -1; - if(IntStatus2 & 0xfffff000) { + if(IntStatus2 & 0x07c00000) { irq = 2; goto done; } - if(IntStatus2 & 0xfffff000) { - irq = 3; - goto done; - } /* if irq == -1, then the interrupt has already been cleared */ if (irq == -1) { - printk("EEK\n"); - IntClear1 = 0xffffffff; - IntClear3 = 0xffffffff; - IntClear4 = 0xffffffff; - IntClear5 = 0xffffffff; - goto end; + panic("No handler installed for MIPS IRQ4\n"); } done: @@ -190,10 +186,10 @@ /* Initialize IRQ action handlers */ for (i = 0; i < 16; i++) { hw_irq_controller *handler = NULL; - if (i == 0) + if (i == 0 || i == 3) + handler = &irq6_type; + else if (i == 2) handler = &irq4_type; - else if (i > 1 && i < 4) - handler = &irq2_type; else handler = NULL; @@ -209,8 +205,8 @@ /* Enable high priority interrupts */ IntEnable6 = (INT6_GLOBALEN | 0xffff); - /* Enable interrupts */ - change_cp0_status(ST0_IM, IE_IRQ2 | IE_IRQ4); + /* Enable all interrupts */ + change_cp0_status(ST0_IM, ALLINTS); } void (*irq_setup)(void); Index: kgdb.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/philips/nino/kgdb.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- kgdb.c 2001/06/22 02:29:32 1.1.1.1 +++ kgdb.c 2001/10/31 18:29:07 1.2 @@ -1,5 +1,5 @@ /* - * linux/arch/mips/philips/nino/kgdb.c + * arch/mips/philips/nino/kgdb.c * * Copyright (C) 2001 Steven J. Hill (sj...@re...) * @@ -7,7 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * - * Kernel debugging on the Philips Nino. + * Kernel debugging for the Philips Nino */ #include <asm/system.h> #include <asm/tx3912.h> Index: power.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/philips/nino/power.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- power.c 2001/06/22 02:29:32 1.1.1.1 +++ power.c 2001/10/31 18:29:07 1.2 @@ -1,5 +1,5 @@ /* - * linux/arch/mips/philips/nino/power.c + * arch/mips/philips/nino/power.c * * Copyright (C) 2000 Jim Pick <ji...@ji...> * Copyright (C) 2001 Steven J. Hill (sj...@re...) @@ -8,7 +8,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * - * Power management routines on the Philips Nino. + * Power management routines for the Philips Nino */ #include <asm/tx3912.h> Index: prom.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/philips/nino/prom.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- prom.c 2001/10/29 17:37:01 1.2 +++ prom.c 2001/10/31 18:29:08 1.3 @@ -1,5 +1,5 @@ /* - * linux/arch/mips/philips/nino/prom.c + * arch/mips/philips/nino/prom.c * * Copyright (C) 2001 Steven J. Hill (sj...@re...) * @@ -7,7 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * - * Early initialization code for the Philips Nino. + * Early initialization code for the Philips Nino */ #include <linux/config.h> #include <linux/init.h> Index: setup.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/philips/nino/setup.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- setup.c 2001/10/29 17:37:01 1.3 +++ setup.c 2001/10/31 18:29:08 1.4 @@ -1,5 +1,5 @@ /* - * linux/arch/mips/philips/nino/setup.c + * arch/mips/philips/nino/setup.c * * Copyright (C) 2001 Steven J. Hill (sj...@re...) * @@ -7,7 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * - * Interrupt and exception initialization for Philips Nino. + * Interrupt and exception initialization for Philips Nino */ #include <linux/init.h> #include <linux/interrupt.h> Index: time.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/philips/nino/time.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- time.c 2001/10/29 17:37:01 1.3 +++ time.c 2001/10/31 18:29:08 1.4 @@ -1,5 +1,5 @@ /* - * linux/arch/mips/philips/nino/time.c + * arch/mips/philips/nino/time.c * * Copyright (C) 1999 Harald Koerfgen * Copyright (C) 2000 Pavel Machek (pa...@su...) @@ -9,7 +9,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * - * Time handling functinos for Philips Nino. + * Time handling functinos for Philips Nino */ #include <linux/errno.h> #include <linux/init.h> --- rtc.c DELETED --- |