Last change
on this file since 63defa58 was
63defa58,
checked in by Jennifer Averett <jennifer.averett@…>, on 04/04/12 at 13:39:46
|
PR 1993 - Convert MIPS to PIC IRQ model
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * TX3904 Interrupt Vectoring |
---|
5 | */ |
---|
6 | |
---|
7 | /* |
---|
8 | * COPYRIGHT (c) 1989-2012. |
---|
9 | * On-Line Applications Research Corporation (OAR). |
---|
10 | * |
---|
11 | * The license and distribution terms for this file may be |
---|
12 | * found in the file LICENSE in this distribution or at |
---|
13 | * http://www.rtems.com/license/LICENSE. |
---|
14 | * |
---|
15 | * $Id$ |
---|
16 | */ |
---|
17 | |
---|
18 | #include <rtems.h> |
---|
19 | #include <stdlib.h> |
---|
20 | #include <bsp/irq.h> |
---|
21 | #include <rtems/bspIo.h> /* for printk */ |
---|
22 | #include <bsp/irq-generic.h> |
---|
23 | |
---|
24 | void mips_vector_isr_handlers( CPU_Interrupt_frame *frame ); |
---|
25 | |
---|
26 | void mips_vector_isr_handlers( CPU_Interrupt_frame *frame ) |
---|
27 | { |
---|
28 | unsigned int sr; |
---|
29 | unsigned int cause; |
---|
30 | |
---|
31 | mips_get_sr( sr ); |
---|
32 | mips_get_cause( cause ); |
---|
33 | |
---|
34 | cause &= (sr & SR_IMASK); |
---|
35 | cause >>= CAUSE_IPSHIFT; |
---|
36 | |
---|
37 | if ( cause & 0x80 ) /* IP[5] ==> INT0 */ |
---|
38 | bsp_interrupt_handler_dispatch( TX3904_IRQ_INT0 ); |
---|
39 | |
---|
40 | if ( cause & 0x40 ) { /* (IP[4] == 1) ==> IP[0-3] are valid */ |
---|
41 | unsigned int v = (cause >> 2) & 0x0f; |
---|
42 | bsp_interrupt_handler_dispatch( MIPS_INTERRUPT_BASE + v ); |
---|
43 | } |
---|
44 | |
---|
45 | if ( cause & 0x02 ) /* SW[0] */ |
---|
46 | bsp_interrupt_handler_dispatch( TX3904_IRQ_SOFTWARE_1 ); |
---|
47 | |
---|
48 | if ( cause & 0x01 ) /* IP[1] */ |
---|
49 | bsp_interrupt_handler_dispatch( TX3904_IRQ_SOFTWARE_2 ); |
---|
50 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.