Changeset 984a9ba in mainline for uspace/drv/intctl
- Timestamp:
- 2018-07-05T09:34:09Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 63d46341
- Parents:
- 76f566d
- Location:
- uspace/drv/intctl
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/intctl/apic/apic.c
r76f566d r984a9ba 160 160 /** Handle one connection to APIC. 161 161 * 162 * @param iid Hash of the request that opened the connection.163 162 * @param icall Call data of the request that opened the connection. 164 * @param arg 165 * /166 static void apic_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg) 167 { 168 cap_call_handle_t chandle; 163 * @param arg Local argument. 164 * 165 */ 166 static void apic_connection(ipc_call_t *icall, void *arg) 167 { 169 168 ipc_call_t call; 170 169 apic_t *apic; … … 173 172 * Answer the first IPC_M_CONNECT_ME_TO call. 174 173 */ 175 async_answer_0(icall _handle, EOK);176 177 apic = (apic_t *) ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *)arg));174 async_answer_0(icall, EOK); 175 176 apic = (apic_t *) ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *) arg)); 178 177 179 178 while (true) { 180 chandle =async_get_call(&call);179 async_get_call(&call); 181 180 182 181 if (!IPC_GET_IMETHOD(call)) { 183 182 /* The other side has hung up. */ 184 async_answer_0( chandle, EOK);183 async_answer_0(&call, EOK); 185 184 return; 186 185 } … … 188 187 switch (IPC_GET_IMETHOD(call)) { 189 188 case IRC_ENABLE_INTERRUPT: 190 async_answer_0( chandle, apic_enable_irq(apic,189 async_answer_0(&call, apic_enable_irq(apic, 191 190 IPC_GET_ARG1(call))); 192 191 break; 193 192 case IRC_DISABLE_INTERRUPT: 194 193 /* XXX TODO */ 195 async_answer_0( chandle, EOK);194 async_answer_0(&call, EOK); 196 195 break; 197 196 case IRC_CLEAR_INTERRUPT: 198 197 /* Noop */ 199 async_answer_0( chandle, EOK);198 async_answer_0(&call, EOK); 200 199 break; 201 200 default: 202 async_answer_0( chandle, EINVAL);201 async_answer_0(&call, EINVAL); 203 202 break; 204 203 } -
uspace/drv/intctl/i8259/i8259.c
r76f566d r984a9ba 89 89 /** Handle one connection to i8259. 90 90 * 91 * @param iid Hash of the request that opened the connection.92 91 * @param icall Call data of the request that opened the connection. 93 * @param arg 94 * /95 static void i8259_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg) 96 { 97 cap_call_handle_t chandle; 92 * @param arg Local argument. 93 * 94 */ 95 static void i8259_connection(ipc_call_t *icall, void *arg) 96 { 98 97 ipc_call_t call; 99 98 i8259_t *i8259 = NULL /* XXX */; … … 102 101 * Answer the first IPC_M_CONNECT_ME_TO call. 103 102 */ 104 async_answer_0(icall _handle, EOK);105 106 i8259 = (i8259_t *) ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *)arg));103 async_answer_0(icall, EOK); 104 105 i8259 = (i8259_t *) ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *) arg)); 107 106 108 107 while (true) { 109 chandle =async_get_call(&call);108 async_get_call(&call); 110 109 111 110 if (!IPC_GET_IMETHOD(call)) { 112 111 /* The other side has hung up. */ 113 async_answer_0( chandle, EOK);112 async_answer_0(&call, EOK); 114 113 return; 115 114 } … … 117 116 switch (IPC_GET_IMETHOD(call)) { 118 117 case IRC_ENABLE_INTERRUPT: 119 async_answer_0( chandle, pic_enable_irq(i8259,118 async_answer_0(&call, pic_enable_irq(i8259, 120 119 IPC_GET_ARG1(call))); 121 120 break; 122 121 case IRC_DISABLE_INTERRUPT: 123 122 /* XXX TODO */ 124 async_answer_0( chandle, EOK);123 async_answer_0(&call, EOK); 125 124 break; 126 125 case IRC_CLEAR_INTERRUPT: 127 126 /* Noop */ 128 async_answer_0( chandle, EOK);127 async_answer_0(&call, EOK); 129 128 break; 130 129 default: 131 async_answer_0( chandle, EINVAL);130 async_answer_0(&call, EINVAL); 132 131 break; 133 132 } -
uspace/drv/intctl/icp-ic/icp-ic.c
r76f566d r984a9ba 65 65 /** Client connection handler. 66 66 * 67 * @param iid Hash of the request that opened the connection.68 67 * @param icall Call data of the request that opened the connection. 69 * @param arg Local argument. 68 * @param arg Local argument. 69 * 70 70 */ 71 static void icpic_connection( cap_call_handle_t icall_handle,ipc_call_t *icall, void *arg)71 static void icpic_connection(ipc_call_t *icall, void *arg) 72 72 { 73 cap_call_handle_t chandle;74 73 ipc_call_t call; 75 74 icpic_t *icpic; … … 78 77 * Answer the first IPC_M_CONNECT_ME_TO call. 79 78 */ 80 async_answer_0(icall _handle, EOK);79 async_answer_0(icall, EOK); 81 80 82 icpic = (icpic_t *) ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *)arg));81 icpic = (icpic_t *) ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *) arg)); 83 82 84 83 while (true) { 85 chandle =async_get_call(&call);84 async_get_call(&call); 86 85 87 86 if (!IPC_GET_IMETHOD(call)) { 88 87 /* The other side has hung up. */ 89 async_answer_0( chandle, EOK);88 async_answer_0(&call, EOK); 90 89 return; 91 90 } … … 93 92 switch (IPC_GET_IMETHOD(call)) { 94 93 case IRC_ENABLE_INTERRUPT: 95 async_answer_0( chandle,94 async_answer_0(&call, 96 95 icpic_enable_irq(icpic, IPC_GET_ARG1(call))); 97 96 break; 98 97 case IRC_DISABLE_INTERRUPT: 99 98 /* XXX TODO */ 100 async_answer_0( chandle, EOK);99 async_answer_0(&call, EOK); 101 100 break; 102 101 case IRC_CLEAR_INTERRUPT: 103 102 /* Noop */ 104 async_answer_0( chandle, EOK);103 async_answer_0(&call, EOK); 105 104 break; 106 105 default: 107 async_answer_0( chandle, EINVAL);106 async_answer_0(&call, EINVAL); 108 107 break; 109 108 } -
uspace/drv/intctl/obio/obio.c
r76f566d r984a9ba 69 69 /** Handle one connection to obio. 70 70 * 71 * @param i id Hashof the request that opened the connection.72 * @param icall Call data of the request that opened the connection.73 * @param arg Local argument.71 * @param icall Call data of the request that opened the connection. 72 * @param arg Local argument. 73 * 74 74 */ 75 static void obio_connection( cap_call_handle_t icall_handle,ipc_call_t *icall, void *arg)75 static void obio_connection(ipc_call_t *icall, void *arg) 76 76 { 77 cap_call_handle_t chandle;78 77 ipc_call_t call; 79 78 obio_t *obio; … … 82 81 * Answer the first IPC_M_CONNECT_ME_TO call. 83 82 */ 84 async_answer_0(icall _handle, EOK);83 async_answer_0(icall, EOK); 85 84 86 obio = (obio_t *) ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *)arg));85 obio = (obio_t *) ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *) arg)); 87 86 88 87 while (true) { 89 88 int inr; 90 89 91 chandle = async_get_call(&call); 90 async_get_call(&call); 91 92 92 switch (IPC_GET_IMETHOD(call)) { 93 93 case IRC_ENABLE_INTERRUPT: … … 95 95 pio_set_64(&obio->regs[OBIO_IMR(inr & INO_MASK)], 96 96 1UL << 31, 0); 97 async_answer_0( chandle, EOK);97 async_answer_0(&call, EOK); 98 98 break; 99 99 case IRC_DISABLE_INTERRUPT: 100 100 /* XXX TODO */ 101 async_answer_0( chandle, EOK);101 async_answer_0(&call, EOK); 102 102 break; 103 103 case IRC_CLEAR_INTERRUPT: 104 104 inr = IPC_GET_ARG1(call); 105 105 pio_write_64(&obio->regs[OBIO_CIR(inr & INO_MASK)], 0); 106 async_answer_0( chandle, EOK);106 async_answer_0(&call, EOK); 107 107 break; 108 108 default: 109 async_answer_0( chandle, EINVAL);109 async_answer_0(&call, EINVAL); 110 110 break; 111 111 }
Note:
See TracChangeset
for help on using the changeset viewer.