Changeset 233af8c5 in mainline
- Timestamp:
- 2006-10-03T22:49:10Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e2cc9a0
- Parents:
- 0b414b5
- Location:
- kernel
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/include/drivers/fhc.h
r0b414b5 r233af8c5 46 46 47 47 extern fhc_t *fhc_init(ofw_tree_node_t *node); 48 extern void fhc_enable_interrupt(fhc_t *fhc, int in o);49 extern void fhc_clear_interrupt(fhc_t *fhc, int in o);48 extern void fhc_enable_interrupt(fhc_t *fhc, int inr); 49 extern void fhc_clear_interrupt(fhc_t *fhc, int inr); 50 50 51 51 #endif -
kernel/arch/sparc64/src/drivers/fhc.c
r0b414b5 r233af8c5 55 55 * and get the complete mapping. 56 56 */ 57 #define FHC_UART_IN O0x3957 #define FHC_UART_INR 0x39 58 58 59 59 #define FHC_UART_IMAP 0x0 … … 91 91 } 92 92 93 void fhc_enable_interrupt(fhc_t *fhc, int in o)93 void fhc_enable_interrupt(fhc_t *fhc, int inr) 94 94 { 95 switch (in o) {96 case FHC_UART_IN O:95 switch (inr) { 96 case FHC_UART_INR: 97 97 fhc->uart_imap[FHC_UART_ICLR] = 0x0; 98 98 fhc->uart_imap[FHC_UART_IMAP] = 0x80000000; 99 99 break; 100 100 default: 101 panic("Unexpected IN O (%d)\n", ino);101 panic("Unexpected INR (%d)\n", inr); 102 102 break; 103 103 } 104 104 } 105 105 106 void fhc_clear_interrupt(fhc_t *fhc, int in o)106 void fhc_clear_interrupt(fhc_t *fhc, int inr) 107 107 { 108 108 ASSERT(fhc->uart_imap); 109 109 110 switch (in o) {111 case FHC_UART_IN O:110 switch (inr) { 111 case FHC_UART_INR: 112 112 fhc->uart_imap[FHC_UART_ICLR] = 0; 113 113 break; 114 114 default: 115 panic("Unexpected IN O (%d)\n", ino);115 panic("Unexpected INR (%d)\n", inr); 116 116 break; 117 117 } -
kernel/genarch/include/ofw/ofw_tree.h
r0b414b5 r233af8c5 116 116 uint32_t intr; 117 117 uint32_t controller_handle; 118 uint32_t controller_in o;118 uint32_t controller_inr; 119 119 } __attribute__ ((packed)); 120 120 typedef struct ofw_ebus_intr_map ofw_ebus_intr_map_t; … … 166 166 extern bool ofw_pci_reg_absolutize(ofw_tree_node_t *node, ofw_pci_reg_t *reg, ofw_pci_reg_t *out); 167 167 168 extern bool ofw_fhc_map_interrupts(ofw_tree_node_t *node, ofw_fhc_reg_t *reg, uint32_t interrupt, int *in o);169 extern bool ofw_ebus_map_interrupts(ofw_tree_node_t *node, ofw_ebus_reg_t *reg, uint32_t interrupt, int *in o);168 extern bool ofw_fhc_map_interrupts(ofw_tree_node_t *node, ofw_fhc_reg_t *reg, uint32_t interrupt, int *inr); 169 extern bool ofw_ebus_map_interrupts(ofw_tree_node_t *node, ofw_ebus_reg_t *reg, uint32_t interrupt, int *inr); 170 170 171 171 #endif -
kernel/genarch/src/ofw/ebus.c
r0b414b5 r233af8c5 75 75 } 76 76 77 bool ofw_ebus_map_interrupts(ofw_tree_node_t *node, ofw_ebus_reg_t *reg, uint32_t interrupt, int *in o)77 bool ofw_ebus_map_interrupts(ofw_tree_node_t *node, ofw_ebus_reg_t *reg, uint32_t interrupt, int *inr) 78 78 { 79 79 ofw_tree_property_t *prop; … … 112 112 /* 113 113 * We found the device that functions as an interrupt controller 114 * for the interrupt. We also found mapping from interrupt to IN O.114 * for the interrupt. We also found mapping from interrupt to INR. 115 115 */ 116 116 117 117 controller = ofw_tree_find_node_by_handle(ofw_tree_lookup("/"), intr_map[i].controller_handle); 118 118 119 *in o = intr_map[i].controller_ino;119 *inr = intr_map[i].controller_inr; 120 120 return true; 121 121 } -
kernel/genarch/src/ofw/fhc.c
r0b414b5 r233af8c5 110 110 } 111 111 112 bool ofw_fhc_map_interrupts(ofw_tree_node_t *node, ofw_fhc_reg_t *reg, uint32_t interrupt, int *in o)112 bool ofw_fhc_map_interrupts(ofw_tree_node_t *node, ofw_fhc_reg_t *reg, uint32_t interrupt, int *inr) 113 113 { 114 114 fhc_t *fhc = NULL; … … 126 126 fhc_enable_interrupt(fhc, interrupt); 127 127 128 *in o= interrupt;128 *inr = interrupt; 129 129 return true; 130 130 }
Note:
See TracChangeset
for help on using the changeset viewer.