* This function will initialize hardware interrupt */
| 42 | * This function will initialize hardware interrupt |
| 43 | */ |
| 44 | void rt_hw_interrupt_init(void) |
| 45 | { |
| 46 | rt_int32_t idx; |
| 47 | rt_int32_t i; |
| 48 | rt_uint32_t c0_status = 0; |
| 49 | |
| 50 | for (i=0; i < GS232_INTC_CELLS; i++) |
| 51 | { |
| 52 | /* Disable */ |
| 53 | (gs232_hw0_icregs+i)->int_en = 0x0; |
| 54 | /* Trigger active low */ |
| 55 | (gs232_hw0_icregs+i)->int_pol = -1; /* Must be done here */ |
| 56 | /* Make all interrupts level triggered */ |
| 57 | (gs232_hw0_icregs+i)->int_edge = 0x00000000; |
| 58 | /* Mask all interrupts */ |
| 59 | (gs232_hw0_icregs+i)->int_clr = 0xffffffff; |
| 60 | mips_unmask_cpu_irq(i + 2); |
| 61 | } |
| 62 | |
| 63 | rt_memset(irq_handle_table, 0x00, sizeof(irq_handle_table)); |
| 64 | for (idx = 0; idx < MAX_INTR; idx ++) |
| 65 | { |
| 66 | irq_handle_table[idx].handler = rt_hw_interrupt_handler; |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * This function will mask a interrupt. |
nothing calls this directly
no test coverage detected