Changeset 81b9d3e in mainline
- Timestamp:
- 2017-10-05T19:09:34Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 82cbf8c6
- Parents:
- 84eb4edd (diff), c188c62 (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. - Files:
-
- 2 added
- 6 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/ppc32/Makefile.inc
r84eb4edd r81b9d3e 44 44 RD_DRVS_ESSENTIAL += \ 45 45 platform/mac \ 46 bus/adb/cuda_adb \ 46 47 bus/pci/pciintel \ 47 48 bus/usb/ohci \ -
uspace/Makefile
r84eb4edd r81b9d3e 134 134 srv/hid/output \ 135 135 srv/hid/remcons \ 136 srv/hw/bus/cuda_adb \137 136 srv/hw/char/s3c24xx_uart \ 138 137 srv/hw/irc/apic \ … … 148 147 drv/block/ata_bd \ 149 148 drv/block/ddisk \ 149 drv/bus/adb/cuda_adb \ 150 150 drv/bus/isa \ 151 151 drv/bus/pci/pciintel \ -
uspace/app/init/init.c
r84eb4edd r81b9d3e 342 342 srv_start("/srv/icp-ic"); 343 343 srv_start("/srv/obio"); 344 srv_start("/srv/cuda_adb");345 344 srv_start("/srv/s3c24xx_uart"); 346 345 srv_start("/srv/s3c24xx_ts"); -
uspace/drv/bus/adb/cuda_adb/Makefile
r84eb4edd r81b9d3e 28 28 29 29 USPACE_PREFIX = ../../../.. 30 LIBS = $(LIBDRV_PREFIX)/libdrv.a 31 EXTRA_CFLAGS += -I$(LIBDRV_PREFIX)/include 30 32 BINARY = cuda_adb 31 33 32 34 SOURCES = \ 33 cuda_adb.c 35 cuda_adb.c \ 36 main.c 34 37 35 38 include $(USPACE_PREFIX)/Makefile.common -
uspace/drv/bus/adb/cuda_adb/cuda_adb.c
r84eb4edd r81b9d3e 37 37 */ 38 38 39 #include <assert.h> 40 #include <ddf/driver.h> 41 #include <ddf/log.h> 42 #include <ddi.h> 43 #include <errno.h> 44 #include <ipc/adb.h> 45 #include <libarch/ddi.h> 46 #include <stdbool.h> 47 #include <stddef.h> 48 #include <sysinfo.h> 49 #include <stdint.h> 39 50 #include <stdio.h> 40 51 #include <stdlib.h> 41 #include <stddef.h> 42 #include <stdint.h> 43 #include <stdbool.h> 44 #include <ddi.h> 45 #include <libarch/ddi.h> 46 #include <loc.h> 47 #include <sysinfo.h> 48 #include <errno.h> 49 #include <ipc/adb.h> 50 #include <assert.h> 52 51 53 #include "cuda_adb.h" 52 54 #include "cuda_hw.h" … … 54 56 #define NAME "cuda_adb" 55 57 56 static void cuda_ connection(ipc_callid_t, ipc_call_t *, void *);57 static int cuda_init(cuda_ instance_t *);58 static void cuda_dev_connection(ipc_callid_t, ipc_call_t *, void *); 59 static int cuda_init(cuda_t *); 58 60 static void cuda_irq_handler(ipc_callid_t, ipc_call_t *, void *); 59 61 60 static void cuda_irq_listen(cuda_ instance_t *);61 static void cuda_irq_receive(cuda_ instance_t *);62 static void cuda_irq_rcv_end(cuda_ instance_t *, void *, size_t *);63 static void cuda_irq_send_start(cuda_ instance_t *);64 static void cuda_irq_send(cuda_ instance_t *);65 66 static void cuda_packet_handle(cuda_ instance_t *, uint8_t *, size_t);67 static void cuda_send_start(cuda_ instance_t *);68 static void cuda_autopoll_set(cuda_ instance_t *, bool);69 70 static void adb_packet_handle(cuda_ instance_t *, uint8_t *, size_t, bool);62 static void cuda_irq_listen(cuda_t *); 63 static void cuda_irq_receive(cuda_t *); 64 static void cuda_irq_rcv_end(cuda_t *, void *, size_t *); 65 static void cuda_irq_send_start(cuda_t *); 66 static void cuda_irq_send(cuda_t *); 67 68 static void cuda_packet_handle(cuda_t *, uint8_t *, size_t); 69 static void cuda_send_start(cuda_t *); 70 static void cuda_autopoll_set(cuda_t *, bool); 71 72 static void adb_packet_handle(cuda_t *, uint8_t *, size_t, bool); 71 73 72 74 static irq_pio_range_t cuda_ranges[] = { 73 75 { 74 76 .base = 0, 75 .size = sizeof(cuda_ t)77 .size = sizeof(cuda_regs_t) 76 78 } 77 79 }; … … 107 109 }; 108 110 109 int main(int argc, char *argv[])110 { 111 service_id_t service_id;112 cuda_instance_t cinst;111 static int cuda_dev_create(cuda_t *cuda, const char *name, adb_dev_t **rdev) 112 { 113 adb_dev_t *dev = NULL; 114 ddf_fun_t *fun; 113 115 int rc; 114 int i; 115 116 printf(NAME ": VIA-CUDA Apple Desktop Bus driver\n"); 117 118 for (i = 0; i < ADB_MAX_ADDR; ++i) { 119 cinst.adb_dev[i].client_sess = NULL; 120 cinst.adb_dev[i].service_id = 0; 121 } 122 123 async_set_fallback_port_handler(cuda_connection, &cinst); 124 rc = loc_server_register(NAME); 125 if (rc < 0) { 126 printf(NAME ": Unable to register server.\n"); 116 117 fun = ddf_fun_create(cuda->dev, fun_exposed, name); 118 if (fun == NULL) { 119 ddf_msg(LVL_ERROR, "Failed creating function '%s'.", name); 120 rc = ENOMEM; 121 goto error; 122 } 123 124 dev = ddf_fun_data_alloc(fun, sizeof(adb_dev_t)); 125 if (dev == NULL) { 126 ddf_msg(LVL_ERROR, "Failed allocating memory for '%s'.", name); 127 rc = ENOMEM; 128 goto error; 129 } 130 131 dev->fun = fun; 132 list_append(&dev->lcuda, &cuda->devs); 133 134 ddf_fun_set_conn_handler(fun, cuda_dev_connection); 135 136 rc = ddf_fun_bind(fun); 137 if (rc != EOK) { 138 ddf_msg(LVL_ERROR, "Failed binding function '%s'.", name); 139 goto error; 140 } 141 142 *rdev = dev; 143 return EOK; 144 error: 145 if (fun != NULL) 146 ddf_fun_destroy(fun); 147 return rc; 148 } 149 150 int cuda_add(cuda_t *cuda, cuda_res_t *res) 151 { 152 adb_dev_t *kbd = NULL; 153 adb_dev_t *mouse = NULL; 154 int rc; 155 156 cuda->phys_base = res->base; 157 158 rc = cuda_dev_create(cuda, "kbd", &kbd); 159 if (rc != EOK) 160 goto error; 161 162 rc = cuda_dev_create(cuda, "mouse", &mouse); 163 if (rc != EOK) 164 goto error; 165 166 cuda->addr_dev[2] = kbd; 167 cuda->addr_dev[8] = kbd; 168 169 cuda->addr_dev[9] = mouse; 170 171 rc = cuda_init(cuda); 172 if (rc != EOK) { 173 ddf_msg(LVL_ERROR, "Failed initializing CUDA hardware."); 127 174 return rc; 128 175 } 129 176 130 rc = loc_service_register("adb/kbd", &service_id); 131 if (rc != EOK) { 132 printf(NAME ": Unable to register service %s.\n", "adb/kbd"); 133 return rc; 134 } 135 136 cinst.adb_dev[2].service_id = service_id; 137 cinst.adb_dev[8].service_id = service_id; 138 139 rc = loc_service_register("adb/mouse", &service_id); 140 if (rc != EOK) { 141 printf(NAME ": Unable to register service %s.\n", "adb/mouse"); 142 return rc; 143 } 144 145 cinst.adb_dev[9].service_id = service_id; 146 147 if (cuda_init(&cinst) < 0) { 148 printf("cuda_init() failed\n"); 149 return 1; 150 } 151 152 task_retval(0); 153 async_manager(); 154 155 return 0; 156 } 157 158 /** Character device connection handler */ 159 static void cuda_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg) 160 { 177 return EOK; 178 error: 179 return rc; 180 } 181 182 int cuda_remove(cuda_t *cuda) 183 { 184 return ENOTSUP; 185 } 186 187 int cuda_gone(cuda_t *cuda) 188 { 189 return ENOTSUP; 190 } 191 192 /** Device connection handler */ 193 static void cuda_dev_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg) 194 { 195 adb_dev_t *dev = (adb_dev_t *) ddf_fun_data_get((ddf_fun_t *) arg); 161 196 ipc_callid_t callid; 162 197 ipc_call_t call; 163 198 sysarg_t method; 164 service_id_t dsid;165 cuda_instance_t *cuda = (cuda_instance_t *) arg;166 int dev_addr, i;167 168 /* Get the device handle. */169 dsid = IPC_GET_ARG2(*icall);170 171 /* Determine which disk device is the client connecting to. */172 dev_addr = -1;173 for (i = 0; i < ADB_MAX_ADDR; i++) {174 if (cuda->adb_dev[i].service_id == dsid)175 dev_addr = i;176 }177 178 if (dev_addr < 0) {179 async_answer_0(iid, EINVAL);180 return;181 }182 199 183 200 /* Answer the IPC_M_CONNECT_ME_TO call. */ … … 187 204 callid = async_get_call(&call); 188 205 method = IPC_GET_IMETHOD(call); 189 206 190 207 if (!method) { 191 208 /* The other side has hung up. */ … … 193 210 return; 194 211 } 195 212 196 213 async_sess_t *sess = 197 214 async_callback_receive_start(EXCHANGE_SERIALIZE, &call); 198 215 if (sess != NULL) { 199 if (cuda->adb_dev[dev_addr].client_sess == NULL) { 200 cuda->adb_dev[dev_addr].client_sess = sess; 201 202 /* 203 * A hack so that we send the data to the session 204 * regardless of which address the device is on. 205 */ 206 for (i = 0; i < ADB_MAX_ADDR; ++i) { 207 if (cuda->adb_dev[i].service_id == dsid) 208 cuda->adb_dev[i].client_sess = sess; 209 } 210 211 async_answer_0(callid, EOK); 212 } else 213 async_answer_0(callid, ELIMIT); 214 } else 216 dev->client_sess = sess; 217 async_answer_0(callid, EOK); 218 } else { 215 219 async_answer_0(callid, EINVAL); 216 }217 }218 219 static int cuda_init(cuda_instance_t *cuda) 220 { 221 if (sysinfo_get_value("cuda.address.physical", &(cuda->cuda_physical)) != EOK) 222 return -1;223 220 } 221 } 222 } 223 224 static int cuda_init(cuda_t *cuda) 225 { 226 int rc; 227 224 228 void *vaddr; 225 if (pio_enable((void *) cuda->cuda_physical, sizeof(cuda_t), &vaddr) != 0) 226 return -1; 227 229 rc = pio_enable((void *) cuda->phys_base, sizeof(cuda_regs_t), 230 &vaddr); 231 if (rc != EOK) 232 return rc; 233 228 234 cuda->regs = vaddr; 229 235 cuda->xstate = cx_listen; … … 236 242 pio_write_8(&cuda->regs->ier, IER_CLR | ALL_INT); 237 243 238 cuda_irq_code.ranges[0].base = (uintptr_t) cuda->cuda_physical; 239 cuda_irq_code.cmds[0].addr = (void *) &((cuda_t *) cuda->cuda_physical)->ifr; 244 cuda_irq_code.ranges[0].base = (uintptr_t) cuda->phys_base; 245 cuda_irq_code.cmds[0].addr = (void *) &((cuda_regs_t *) 246 cuda->phys_base)->ifr; 240 247 async_irq_subscribe(10, cuda_irq_handler, cuda, &cuda_irq_code); 241 248 … … 247 254 cuda_autopoll_set(cuda, true); 248 255 249 return 0;256 return EOK; 250 257 } 251 258 … … 253 260 { 254 261 uint8_t rbuf[CUDA_RCV_BUF_SIZE]; 255 cuda_ instance_t *cuda = (cuda_instance_t *)arg;262 cuda_t *cuda = (cuda_t *)arg; 256 263 size_t len; 257 264 bool handle; … … 280 287 break; 281 288 } 282 289 283 290 /* Lower IFR.SR_INT so that CUDA can generate next int by raising it. */ 284 291 pio_write_8(&cuda->regs->ifr, SR_INT); … … 297 304 * @param cuda CUDA instance 298 305 */ 299 static void cuda_irq_listen(cuda_ instance_t *cuda)306 static void cuda_irq_listen(cuda_t *cuda) 300 307 { 301 308 uint8_t b = pio_read_8(&cuda->regs->b); 302 309 303 310 if ((b & TREQ) != 0) { 304 printf("cuda_irq_listen: no TREQ?!\n");305 return; 306 } 307 311 ddf_msg(LVL_WARN, "cuda_irq_listen: no TREQ?!"); 312 return; 313 } 314 308 315 pio_write_8(&cuda->regs->b, b & ~TIP); 309 316 cuda->xstate = cx_receive; … … 316 323 * @param cuda CUDA instance 317 324 */ 318 static void cuda_irq_receive(cuda_ instance_t *cuda)325 static void cuda_irq_receive(cuda_t *cuda) 319 326 { 320 327 uint8_t data = pio_read_8(&cuda->regs->sr); 321 328 if (cuda->bidx < CUDA_RCV_BUF_SIZE) 322 329 cuda->rcv_buf[cuda->bidx++] = data; 323 330 324 331 uint8_t b = pio_read_8(&cuda->regs->b); 325 332 326 333 if ((b & TREQ) == 0) { 327 334 pio_write_8(&cuda->regs->b, b ^ TACK); … … 341 348 * @param len Place to store length of received packet 342 349 */ 343 static void cuda_irq_rcv_end(cuda_ instance_t *cuda, void *buf, size_t *len)350 static void cuda_irq_rcv_end(cuda_t *cuda, void *buf, size_t *len) 344 351 { 345 352 uint8_t b = pio_read_8(&cuda->regs->b); 346 353 347 354 if ((b & TREQ) == 0) { 348 355 cuda->xstate = cx_receive; … … 352 359 cuda_send_start(cuda); 353 360 } 354 361 355 362 memcpy(buf, cuda->rcv_buf, cuda->bidx); 356 363 *len = cuda->bidx; … … 364 371 * @param cuda CUDA instance 365 372 */ 366 static void cuda_irq_send_start(cuda_ instance_t *cuda)373 static void cuda_irq_send_start(cuda_t *cuda) 367 374 { 368 375 uint8_t b; … … 394 401 * @param cuda CUDA instance 395 402 */ 396 static void cuda_irq_send(cuda_ instance_t *cuda)403 static void cuda_irq_send(cuda_t *cuda) 397 404 { 398 405 if (cuda->bidx < cuda->snd_bytes) { … … 416 423 } 417 424 418 static void cuda_packet_handle(cuda_ instance_t *cuda, uint8_t *data, size_t len)425 static void cuda_packet_handle(cuda_t *cuda, uint8_t *data, size_t len) 419 426 { 420 427 if (data[0] != PT_ADB) … … 426 433 } 427 434 428 static void adb_packet_handle(cuda_ instance_t *cuda, uint8_t *data,429 size_t size,bool autopoll)435 static void adb_packet_handle(cuda_t *cuda, uint8_t *data, size_t size, 436 bool autopoll) 430 437 { 431 438 uint8_t dev_addr; 432 439 uint8_t reg_no; 433 440 uint16_t reg_val; 441 adb_dev_t *dev; 434 442 unsigned i; 435 443 … … 438 446 439 447 if (size != 3) { 440 printf("unrecognized packet, size=%zu\n", size);448 ddf_msg(LVL_WARN, "Unrecognized packet, size=%zu", size); 441 449 for (i = 0; i < size; ++i) { 442 printf("0x%02x", data[i]);450 ddf_msg(LVL_WARN, " 0x%02x", data[i]); 443 451 } 444 putchar('\n');445 452 return; 446 453 } 447 454 448 455 if (reg_no != 0) { 449 printf("unrecognized packet, size=%zu\n", size);456 ddf_msg(LVL_WARN, "Unrecognized packet, size=%zu", size); 450 457 for (i = 0; i < size; ++i) { 451 printf("0x%02x", data[i]);458 ddf_msg(LVL_WARN, " 0x%02x", data[i]); 452 459 } 453 putchar('\n');454 460 return; 455 461 } … … 457 463 reg_val = ((uint16_t) data[1] << 8) | (uint16_t) data[2]; 458 464 459 if (cuda->adb_dev[dev_addr].client_sess == NULL) 460 return; 461 462 async_exch_t *exch = 463 async_exchange_begin(cuda->adb_dev[dev_addr].client_sess); 465 ddf_msg(LVL_DEBUG, "Received ADB packet for device address %d", 466 dev_addr); 467 dev = cuda->addr_dev[dev_addr]; 468 if (dev == NULL) 469 return; 470 471 async_exch_t *exch = async_exchange_begin(dev->client_sess); 464 472 async_msg_1(exch, ADB_REG_NOTIF, reg_val); 465 473 async_exchange_end(exch); 466 474 } 467 475 468 static void cuda_autopoll_set(cuda_ instance_t *cuda, bool enable)476 static void cuda_autopoll_set(cuda_t *cuda, bool enable) 469 477 { 470 478 cuda->snd_buf[0] = PT_CUDA; … … 477 485 } 478 486 479 static void cuda_send_start(cuda_ instance_t *cuda)487 static void cuda_send_start(cuda_t *cuda) 480 488 { 481 489 assert(cuda->xstate == cx_listen); -
uspace/drv/bus/adb/cuda_adb/cuda_adb.h
r84eb4edd r81b9d3e 37 37 #define CUDA_ADB_H_ 38 38 39 #include <adt/list.h> 39 40 #include <async.h> 41 #include <ddf/driver.h> 40 42 #include <fibril_synch.h> 41 #include < stddef.h>43 #include <loc.h> 42 44 #include <stdint.h> 43 45 #include "cuda_hw.h" … … 56 58 57 59 typedef struct { 58 service_id_t service_id; 60 uintptr_t base; 61 int irq; 62 } cuda_res_t; 63 64 /** ADB bus device */ 65 typedef struct { 66 ddf_fun_t *fun; 59 67 async_sess_t *client_sess; 68 link_t lcuda; 69 struct cuda *cuda; 60 70 } adb_dev_t; 61 71 62 typedef struct { 63 struct cuda *regs; 64 uintptr_t cuda_physical; 72 /** CUDA ADB bus */ 73 typedef struct cude { 74 struct cuda_regs *regs; 75 uintptr_t phys_base; 76 ddf_dev_t *dev; 65 77 66 78 uint8_t rcv_buf[CUDA_RCV_BUF_SIZE]; … … 71 83 fibril_mutex_t dev_lock; 72 84 73 adb_dev_t adb_dev[ADB_MAX_ADDR]; 74 } cuda_instance_t; 85 list_t devs; 86 adb_dev_t *addr_dev[ADB_MAX_ADDR]; 87 } cuda_t; 88 89 extern int cuda_add(cuda_t *, cuda_res_t *); 90 extern int cuda_remove(cuda_t *); 91 extern int cuda_gone(cuda_t *); 75 92 76 93 #endif -
uspace/drv/bus/adb/cuda_adb/cuda_hw.h
r84eb4edd r81b9d3e 39 39 #include <stdint.h> 40 40 41 typedef struct cuda {41 typedef struct cuda_regs { 42 42 uint8_t b; 43 43 uint8_t pad0[0x1ff]; … … 87 87 uint8_t anh; 88 88 uint8_t pad15[0x1ff]; 89 } cuda_ t;89 } cuda_regs_t; 90 90 91 91 /** B register fields */ -
uspace/drv/platform/mac/mac.c
r84eb4edd r81b9d3e 1 1 /* 2 2 * Copyright (c) 2011 Martin Decky 3 * Copyright (c) 2017 Jiri Svoboda 3 4 * All rights reserved. 4 5 * … … 40 41 #include <errno.h> 41 42 #include <ops/hw_res.h> 43 #include <ops/pio_window.h> 42 44 #include <stdio.h> 45 #include <sysinfo.h> 43 46 44 47 #define NAME "mac" … … 46 49 typedef struct { 47 50 hw_resource_list_t hw_resources; 51 pio_window_t pio_window; 48 52 } mac_fun_t; 53 54 static hw_resource_t adb_res[] = { 55 { 56 .type = IO_RANGE, 57 .res.io_range = { 58 .address = 0, 59 .size = 0x2000, 60 .relative = true, 61 .endianness = BIG_ENDIAN 62 } 63 }, 64 { 65 .type = INTERRUPT, 66 .res.interrupt = { 67 .irq = 0 /* patched at run time */ 68 } 69 }, 70 }; 71 72 static mac_fun_t adb_data = { 73 .hw_resources = { 74 sizeof(adb_res) / sizeof(adb_res[0]), 75 adb_res 76 }, 77 .pio_window = { 78 .io = { 79 .base = 0, /* patched at run time */ 80 .size = 0x2000 81 } 82 } 83 }; 49 84 50 85 static hw_resource_t pci_conf_regs[] = { … … 79 114 80 115 /** Obtain function soft-state from DDF function node */ 81 static mac_fun_t *mac_fun(ddf_fun_t *fnode) 82 { 83 return ddf_fun_data_get(fnode); 116 static mac_fun_t *mac_fun(ddf_fun_t *ddf_fun) 117 { 118 return ddf_fun_data_get(ddf_fun); 119 } 120 121 static pio_window_t *mac_get_pio_window(ddf_fun_t *ddf_fun) 122 { 123 mac_fun_t *fun = mac_fun(ddf_fun); 124 return &fun->pio_window; 84 125 } 85 126 … … 88 129 { 89 130 ddf_msg(LVL_DEBUG, "Adding new function '%s'.", name); 131 printf("mac: Adding new function '%s'.\n", name); 90 132 91 133 ddf_fun_t *fnode = NULL; … … 114 156 } 115 157 158 printf("mac: Added new function '%s' (str=%s).\n", name, str_match_id); 116 159 return true; 117 160 … … 135 178 static int mac_dev_add(ddf_dev_t *dev) 136 179 { 180 int rc; 181 uintptr_t cuda_physical; 182 sysarg_t cuda_inr; 137 183 #if 0 138 184 /* Register functions */ 139 if (!mac_add_fun(dev, "pci0", "intel_pci", &pci_data)) 140 ddf_msg(LVL_ERROR, "Failed to add functions for Mac platform."); 185 if (!mac_add_fun(dev, "pci0", "intel_pci", &pci_data)) { 186 ddf_msg(LVL_ERROR, "Failed to add PCI function for Mac platform."); 187 return EIO; 188 } 141 189 #else 142 190 (void)pci_data; 143 (void)mac_add_fun;144 191 #endif 145 192 rc = sysinfo_get_value("cuda.address.physical", &cuda_physical); 193 if (rc != EOK) 194 return EIO; 195 rc = sysinfo_get_value("cuda.inr", &cuda_inr); 196 if (rc != EOK) 197 return EIO; 198 199 adb_data.pio_window.io.base = cuda_physical; 200 adb_res[1].res.interrupt.irq = cuda_inr; 201 202 if (!mac_add_fun(dev, "adb", "cuda_adb", &adb_data)) { 203 ddf_msg(LVL_ERROR, "Failed to add ADB function for Mac platform."); 204 return EIO; 205 } 206 146 207 return EOK; 147 208 } … … 173 234 } 174 235 236 static pio_window_ops_t fun_pio_window_ops = { 237 .get_pio_window = &mac_get_pio_window 238 }; 239 175 240 static hw_res_ops_t fun_hw_res_ops = { 176 241 .get_resource_list = &mac_get_resources, … … 183 248 ddf_log_init(NAME); 184 249 mac_fun_ops.interfaces[HW_RES_DEV_IFACE] = &fun_hw_res_ops; 250 mac_fun_ops.interfaces[PIO_WINDOW_DEV_IFACE] = &fun_pio_window_ops; 185 251 return ddf_driver_main(&mac_driver); 186 252 } -
uspace/srv/hid/input/port/adb.c
r84eb4edd r81b9d3e 62 62 kbd_dev = kdev; 63 63 64 const char *dev = " adb/kbd";64 const char *dev = "devices/\\hw\\adb\\kbd"; 65 65 service_id_t service_id; 66 int rc = loc_service_get_id(dev, &service_id, 0);66 int rc = loc_service_get_id(dev, &service_id, IPC_FLAG_BLOCKING); 67 67 if (rc != EOK) 68 68 return rc; -
uspace/srv/hid/input/port/adb_mouse.c
r84eb4edd r81b9d3e 75 75 static int adb_port_init(mouse_dev_t *mdev) 76 76 { 77 const char *dev = " adb/mouse";77 const char *dev = "devices/\\hw\\adb\\mouse"; 78 78 79 79 mouse_dev = mdev; 80 80 81 81 service_id_t service_id; 82 int rc = loc_service_get_id(dev, &service_id, 0);82 int rc = loc_service_get_id(dev, &service_id, IPC_FLAG_BLOCKING); 83 83 if (rc != EOK) 84 84 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.