Changeset 8b5690f in mainline for uspace/srv/hw
- Timestamp:
- 2011-02-03T05:11:01Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ba38f72c
- Parents:
- 22027b6e (diff), 86d7bfa (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- uspace/srv/hw
- Files:
-
- 3 added
- 5 deleted
- 7 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/bus/cuda_adb/cuda_adb.c
r22027b6e r8b5690f 162 162 rc = devmap_device_register("adb/kbd", &devmap_handle); 163 163 if (rc != EOK) { 164 devmap_hangup_phone(DEVMAP_DRIVER);165 164 printf(NAME ": Unable to register device %s.\n", "adb/kdb"); 166 165 return rc; … … 172 171 rc = devmap_device_register("adb/mouse", &devmap_handle); 173 172 if (rc != EOK) { 174 devmap_hangup_phone(DEVMAP_DRIVER);175 173 printf(NAME ": Unable to register device %s.\n", "adb/mouse"); 176 174 return rc; … … 211 209 212 210 if (dev_addr < 0) { 213 ipc_answer_0(iid, EINVAL);211 async_answer_0(iid, EINVAL); 214 212 return; 215 213 } 216 214 217 215 /* Answer the IPC_M_CONNECT_ME_TO call. */ 218 ipc_answer_0(iid, EOK);216 async_answer_0(iid, EOK); 219 217 220 218 while (1) { … … 224 222 case IPC_M_PHONE_HUNGUP: 225 223 /* The other side has hung up. */ 226 ipc_answer_0(callid, EOK);224 async_answer_0(callid, EOK); 227 225 return; 228 226 case IPC_M_CONNECT_TO_ME: … … 247 245 break; 248 246 } 249 ipc_answer_0(callid, retval);247 async_answer_0(callid, retval); 250 248 } 251 249 } … … 278 276 cuda_irq_code.cmds[0].addr = (void *) &((cuda_t *) instance->cuda_kernel)->ifr; 279 277 async_set_interrupt_received(cuda_irq_handler); 280 ipc_register_irq(10, device_assign_devno(), 0, &cuda_irq_code);278 register_irq(10, device_assign_devno(), 0, &cuda_irq_code); 281 279 282 280 /* Enable SR interrupt. */ -
uspace/srv/hw/char/i8042/i8042.c
r22027b6e r8b5690f 40 40 #include <libarch/ddi.h> 41 41 #include <devmap.h> 42 #include <ipc/ipc.h>43 42 #include <async.h> 44 43 #include <unistd.h> … … 148 147 rc = devmap_device_register(name, &i8042_port[i].devmap_handle); 149 148 if (rc != EOK) { 150 devmap_hangup_phone(DEVMAP_DRIVER);151 149 printf(NAME ": Unable to register device %s.\n", name); 152 150 return rc; … … 200 198 i8042_kbd.cmds[0].addr = (void *) &((i8042_t *) i8042_kernel)->status; 201 199 i8042_kbd.cmds[3].addr = (void *) &((i8042_t *) i8042_kernel)->data; 202 ipc_register_irq(inr_a, device_assign_devno(), 0, &i8042_kbd);203 ipc_register_irq(inr_b, device_assign_devno(), 0, &i8042_kbd);200 register_irq(inr_a, device_assign_devno(), 0, &i8042_kbd); 201 register_irq(inr_b, device_assign_devno(), 0, &i8042_kbd); 204 202 printf("%s: registered for interrupts %" PRIun " and %" PRIun "\n", 205 203 NAME, inr_a, inr_b); … … 237 235 238 236 if (dev_id < 0) { 239 ipc_answer_0(iid, EINVAL);237 async_answer_0(iid, EINVAL); 240 238 return; 241 239 } 242 240 243 241 /* Answer the IPC_M_CONNECT_ME_TO call. */ 244 ipc_answer_0(iid, EOK);242 async_answer_0(iid, EOK); 245 243 246 244 printf(NAME ": accepted connection\n"); … … 252 250 case IPC_M_PHONE_HUNGUP: 253 251 /* The other side has hung up. */ 254 ipc_answer_0(callid, EOK);252 async_answer_0(callid, EOK); 255 253 return; 256 254 case IPC_M_CONNECT_TO_ME: … … 273 271 break; 274 272 } 275 ipc_answer_0(callid, retval);273 async_answer_0(callid, retval); 276 274 } 277 275 } -
uspace/srv/hw/char/s3c24xx_uart/s3c24xx_uart.c
r22027b6e r8b5690f 40 40 #include <libarch/ddi.h> 41 41 #include <devmap.h> 42 #include <ipc/ipc.h>43 42 #include <ipc/char.h> 44 43 #include <async.h> … … 95 94 rc = devmap_device_register(NAMESPACE "/" NAME, &uart->devmap_handle); 96 95 if (rc != EOK) { 97 devmap_hangup_phone(DEVMAP_DRIVER);98 96 printf(NAME ": Unable to register device %s.\n", 99 97 NAMESPACE "/" NAME); … … 120 118 121 119 /* Answer the IPC_M_CONNECT_ME_TO call. */ 122 ipc_answer_0(iid, EOK);120 async_answer_0(iid, EOK); 123 121 124 122 while (1) { … … 128 126 case IPC_M_PHONE_HUNGUP: 129 127 /* The other side has hung up. */ 130 ipc_answer_0(callid, EOK);128 async_answer_0(callid, EOK); 131 129 return; 132 130 case IPC_M_CONNECT_TO_ME: … … 145 143 break; 146 144 } 147 ipc_answer_0(callid, retval);145 async_answer_0(callid, retval); 148 146 } 149 147 } … … 192 190 async_set_interrupt_received(s3c24xx_uart_irq_handler); 193 191 194 ipc_register_irq(inr, device_assign_devno(), 0, &uart_irq_code);192 register_irq(inr, device_assign_devno(), 0, &uart_irq_code); 195 193 196 194 /* Enable FIFO, Tx trigger level: empty, Rx trigger level: 1 byte. */ -
uspace/srv/hw/irc/apic/apic.c
r22027b6e r8b5690f 36 36 */ 37 37 38 #include <ipc/ipc.h>39 38 #include <ipc/services.h> 40 39 #include <ipc/irc.h> … … 75 74 * Answer the first IPC_M_CONNECT_ME_TO call. 76 75 */ 77 ipc_answer_0(iid, EOK);76 async_answer_0(iid, EOK); 78 77 79 78 while (true) { … … 82 81 switch (IPC_GET_IMETHOD(call)) { 83 82 case IRC_ENABLE_INTERRUPT: 84 ipc_answer_0(callid, apic_enable_irq(IPC_GET_ARG1(call)));83 async_answer_0(callid, apic_enable_irq(IPC_GET_ARG1(call))); 85 84 break; 86 85 case IRC_CLEAR_INTERRUPT: 87 86 /* Noop */ 88 ipc_answer_0(callid, EOK);87 async_answer_0(callid, EOK); 89 88 break; 90 89 default: 91 ipc_answer_0(callid, EINVAL);90 async_answer_0(callid, EINVAL); 92 91 break; 93 92 } … … 108 107 109 108 async_set_client_connection(apic_connection); 110 sysarg_t phonead; 111 ipc_connect_to_me(PHONE_NS, SERVICE_APIC, 0, 0, &phonead); 109 service_register(SERVICE_APIC); 112 110 113 111 return true; -
uspace/srv/hw/irc/fhc/fhc.c
r22027b6e r8b5690f 29 29 /** @addtogroup fhc 30 30 * @{ 31 */ 31 */ 32 32 33 33 /** 34 * @file 35 * @brief 34 * @file fhc.c 35 * @brief FHC bus controller driver. 36 36 */ 37 37 38 #include <ipc/ipc.h>39 38 #include <ipc/services.h> 40 39 #include <ipc/irc.h> … … 76 75 * Answer the first IPC_M_CONNECT_ME_TO call. 77 76 */ 78 ipc_answer_0(iid, EOK);77 async_answer_0(iid, EOK); 79 78 80 79 while (1) { … … 85 84 case IRC_ENABLE_INTERRUPT: 86 85 /* Noop */ 87 ipc_answer_0(callid, EOK);86 async_answer_0(callid, EOK); 88 87 break; 89 88 case IRC_CLEAR_INTERRUPT: … … 92 91 case FHC_UART_INR: 93 92 fhc_uart_virt[FHC_UART_ICLR] = 0; 94 ipc_answer_0(callid, EOK);93 async_answer_0(callid, EOK); 95 94 break; 96 95 default: 97 ipc_answer_0(callid, ENOTSUP);96 async_answer_0(callid, ENOTSUP); 98 97 break; 99 98 } 100 99 break; 101 100 default: 102 ipc_answer_0(callid, EINVAL);101 async_answer_0(callid, EINVAL); 103 102 break; 104 103 } … … 137 136 138 137 async_set_client_connection(fhc_connection); 139 sysarg_t phonead; 140 ipc_connect_to_me(PHONE_NS, SERVICE_FHC, 0, 0, &phonead); 138 service_register(SERVICE_FHC); 141 139 142 140 return true; -
uspace/srv/hw/irc/i8259/i8259.c
r22027b6e r8b5690f 36 36 */ 37 37 38 #include <ipc/ipc.h>39 38 #include <ipc/services.h> 40 39 #include <ipc/irc.h> … … 109 108 * Answer the first IPC_M_CONNECT_ME_TO call. 110 109 */ 111 ipc_answer_0(iid, EOK);110 async_answer_0(iid, EOK); 112 111 113 112 while (true) { … … 116 115 switch (IPC_GET_IMETHOD(call)) { 117 116 case IRC_ENABLE_INTERRUPT: 118 ipc_answer_0(callid, pic_enable_irq(IPC_GET_ARG1(call)));117 async_answer_0(callid, pic_enable_irq(IPC_GET_ARG1(call))); 119 118 break; 120 119 case IRC_CLEAR_INTERRUPT: 121 120 /* Noop */ 122 ipc_answer_0(callid, EOK);121 async_answer_0(callid, EOK); 123 122 break; 124 123 default: 125 ipc_answer_0(callid, EINVAL);124 async_answer_0(callid, EINVAL); 126 125 break; 127 126 } … … 150 149 151 150 async_set_client_connection(i8259_connection); 152 sysarg_t phonead; 153 ipc_connect_to_me(PHONE_NS, SERVICE_I8259, 0, 0, &phonead); 151 service_register(SERVICE_I8259); 154 152 155 153 return true; -
uspace/srv/hw/irc/obio/obio.c
r22027b6e r8b5690f 27 27 */ 28 28 29 /** @addtogroup obio 29 /** @addtogroup obio 30 30 * @{ 31 */ 31 */ 32 32 33 33 /** 34 * @file 35 * @brief 34 * @file obio.c 35 * @brief OBIO driver. 36 36 * 37 37 * OBIO is a short for on-board I/O. On UltraSPARC IIi and systems with U2P, … … 42 42 */ 43 43 44 #include <ipc/ipc.h>45 44 #include <ipc/services.h> 46 45 #include <ipc/irc.h> … … 86 85 * Answer the first IPC_M_CONNECT_ME_TO call. 87 86 */ 88 ipc_answer_0(iid, EOK);87 async_answer_0(iid, EOK); 89 88 90 89 while (1) { … … 95 94 case IRC_ENABLE_INTERRUPT: 96 95 /* Noop */ 97 ipc_answer_0(callid, EOK);96 async_answer_0(callid, EOK); 98 97 break; 99 98 case IRC_CLEAR_INTERRUPT: 100 99 inr = IPC_GET_ARG1(call); 101 100 base_virt[OBIO_CIR(inr & INO_MASK)] = 0; 102 ipc_answer_0(callid, EOK);101 async_answer_0(callid, EOK); 103 102 break; 104 103 default: 105 ipc_answer_0(callid, EINVAL);104 async_answer_0(callid, EINVAL); 106 105 break; 107 106 } … … 138 137 139 138 async_set_client_connection(obio_connection); 140 sysarg_t phonead; 141 ipc_connect_to_me(PHONE_NS, SERVICE_OBIO, 0, 0, &phonead); 139 service_register(SERVICE_OBIO); 142 140 143 141 return true; -
uspace/srv/hw/netif/ne2000/Makefile
r22027b6e r8b5690f 39 39 -include $(CONFIG_MAKEFILE) 40 40 41 BINARY = dp839041 BINARY = ne2000 42 42 43 43 SOURCES = \ 44 44 dp8390.c \ 45 dp8390_module.c \46 45 ne2000.c 47 46
Note:
See TracChangeset
for help on using the changeset viewer.