Rev 1787 | Rev 1861 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1787 | Rev 1849 | ||
---|---|---|---|
Line 31... | Line 31... | ||
31 | */ |
31 | */ |
32 | /** @file |
32 | /** @file |
33 | */ |
33 | */ |
34 | 34 | ||
35 | #include <arch/interrupt.h> |
35 | #include <arch/interrupt.h> |
- | 36 | #include <arch/trap/interrupt.h> |
|
36 | #include <interrupt.h> |
37 | #include <interrupt.h> |
- | 38 | #include <arch/drivers/fhc.h> |
|
37 | #include <arch/types.h> |
39 | #include <arch/types.h> |
38 | #include <debug.h> |
40 | #include <debug.h> |
39 | #include <ipc/sysipc.h> |
41 | #include <ipc/sysipc.h> |
- | 42 | #include <arch/asm.h> |
|
- | 43 | #include <arch/barrier.h> |
|
- | 44 | ||
- | 45 | #include <genarch/kbd/z8530.h> |
|
40 | 46 | ||
41 | /** Register Interrupt Level Handler. |
47 | /** Register Interrupt Level Handler. |
42 | * |
48 | * |
43 | * @param n Interrupt Level (1 - 15). |
49 | * @param n Interrupt Level (1 - 15). |
44 | * @param name Short descriptive string. |
50 | * @param name Short descriptive string. |
Line 56... | Line 62... | ||
56 | { |
62 | { |
57 | panic("not implemented\n"); |
63 | panic("not implemented\n"); |
58 | /* TODO */ |
64 | /* TODO */ |
59 | } |
65 | } |
60 | 66 | ||
- | 67 | void interrupt(void) |
|
- | 68 | { |
|
- | 69 | uint64_t intrcv; |
|
- | 70 | uint64_t data0; |
|
- | 71 | ||
- | 72 | intrcv = asi_u64_read(ASI_INTR_RECEIVE, 0); |
|
- | 73 | data0 = asi_u64_read(ASI_UDB_INTR_R, ASI_UDB_INTR_R_DATA_0); |
|
- | 74 | ||
- | 75 | switch (data0) { |
|
- | 76 | #ifdef CONFIG_Z8530 |
|
- | 77 | case Z8530_INTRCV_DATA0: |
|
- | 78 | /* |
|
- | 79 | * So far, we know we got this interrupt through the FHC. |
|
- | 80 | * Since we don't have enough information about the FHC and |
|
- | 81 | * because the interrupt looks like level sensitive, |
|
- | 82 | * we cannot handle it by scheduling one of the level |
|
- | 83 | * interrupt traps. Call the interrupt handler directly. |
|
- | 84 | */ |
|
- | 85 | fhc_uart_reset(); |
|
- | 86 | z8530_interrupt(); |
|
- | 87 | break; |
|
- | 88 | #endif |
|
- | 89 | } |
|
- | 90 | ||
- | 91 | membar(); |
|
- | 92 | asi_u64_write(ASI_INTR_RECEIVE, 0, 0); |
|
- | 93 | } |
|
- | 94 | ||
61 | /** @} |
95 | /** @} |
62 | */ |
96 | */ |
63 | - |