H25575
s 00105/00000/00000
d D 1.1 02/03/13 20:31:03 patch 2 1
cC
cF1
cK59089
cO-rw-rw-r--
e
s 00000/00000/00000
d D 1.0 02/03/13 20:31:03 patch 1 0
c BitKeeper file /home/marcelo/bk/linux-2.4/arch/mips/cobalt/int-handler.S
cBtorvalds@athlon.transmeta.com|ChangeSet|20020205173056|16047|c1d11a41ed024864
cHplucky.distro.conectiva
cK58731
cParch/mips/cobalt/int-handler.S
cR2bceb139a2eb002b
cV4
cX0x821
cZ-03:00
e
u
U
f e 0
f x 0x821
t
T
I 2
/*
 * Cobalt interrupt handler
 *
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 *
 * Copyright (C) 1995, 1996, 1997 by Ralf Baechle
 * Copyright (C) 2001 by Liam Davies (ldavies@agile.tv)
 *
 */

#include <linux/config.h>
#include <asm/asm.h>
#include <asm/mipsregs.h>
#include <asm/cobalt/cobalt.h>
#include <asm/regdef.h>
#include <asm/stackframe.h>

/*
 * cobalt_handle_int: Interrupt handler for Cobalt boards
 */
		.text
		.set	noreorder
		.set	noat
		.align	5
		NESTED(cobalt_handle_int, PT_SIZE, sp)
		SAVE_ALL
		CLI
		.set	at
	
		/* 
		 * Get pending Interrupts
		 */
		mfc0	s0,CP0_CAUSE	# get irq mask

		andi	a0,s0,CAUSEF_IP2	/* Check for Galileo timer */
		beq	a0,zero,1f
		 andi	a0,s0,CAUSEF_IP6	/* Check for Via chip */

		/* Galileo interrupt */
		jal	galileo_irq
		 move	a0,sp
		j	ret_from_irq
		 nop

1:
		beq	a0,zero,1f		/* Check IP6 */
		 andi	a0,s0,CAUSEF_IP3

		/* Via interrupt */
		jal	via_irq
		 move	a0,sp
		j	ret_from_irq
		 nop

1:	
		beq	a0,zero,1f		/* Check IP3 */
		 andi	a0,s0,CAUSEF_IP4

		/* Ethernet 0 interrupt */
		li	a0,4
		jal     do_IRQ
		 move	a1,sp

		j	ret_from_irq
		 nop

1:	
		beq	a0,zero,1f		/* Check IP4 */
		 andi	a0,s0,CAUSEF_IP5

		/* Ethernet 1 interrupt */
		li	a0,13
		jal     do_IRQ
		 move	a1,sp

		j	ret_from_irq
		 nop
1:	
		beq	a0,zero,1f		/* Check IP5 */
		 andi	a0,s0,CAUSEF_IP7

		/* Serial interrupt */
		li	a0,7
		jal     do_IRQ
		 move	a1,sp

		j	ret_from_irq
		 nop
1:	
		beq	a0,zero,1f		/* Check IP7 */
		  nop

		/* PCI interrupt */
		li	a0,9
		jal     do_IRQ
		 move	a1,sp

1:
		j	ret_from_irq
		 nop

		END(cobalt_handle_int)
	
E 2
I 1
E 1
