Changes in uspace/drv/ns8250/ns8250.c [ebcb05a:fc51296] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ns8250/ns8250.c
rebcb05a rfc51296 276 276 static bool ns8250_pio_enable(ns8250_t *ns) 277 277 { 278 ddf_msg(LVL_DEBUG, "ns8250_pio_enable %s ", ns->dev->name);278 ddf_msg(LVL_DEBUG, "ns8250_pio_enable %s\n", ns->dev->name); 279 279 280 280 /* Gain control over port's registers. */ … … 282 282 (void **) &ns->port)) { 283 283 ddf_msg(LVL_ERROR, "Cannot map the port %#" PRIx32 284 " for device %s. ", ns->io_addr, ns->dev->name);284 " for device %s.\n", ns->io_addr, ns->dev->name); 285 285 return false; 286 286 } … … 296 296 static bool ns8250_dev_probe(ns8250_t *ns) 297 297 { 298 ddf_msg(LVL_DEBUG, "ns8250_dev_probe %s ", ns->dev->name);298 ddf_msg(LVL_DEBUG, "ns8250_dev_probe %s\n", ns->dev->name); 299 299 300 300 ioport8_t *port_addr = ns->port; … … 315 315 316 316 if (!res) { 317 ddf_msg(LVL_DEBUG, "Device %s is not present. ",317 ddf_msg(LVL_DEBUG, "Device %s is not present.\n", 318 318 ns->dev->name); 319 319 } … … 329 329 static int ns8250_dev_initialize(ns8250_t *ns) 330 330 { 331 ddf_msg(LVL_DEBUG, "ns8250_dev_initialize %s ", ns->dev->name);331 ddf_msg(LVL_DEBUG, "ns8250_dev_initialize %s\n", ns->dev->name); 332 332 333 333 int ret = EOK; … … 341 341 if (ns->dev->parent_phone < 0) { 342 342 ddf_msg(LVL_ERROR, "Failed to connect to parent driver of " 343 "device %s. ", ns->dev->name);343 "device %s.\n", ns->dev->name); 344 344 ret = ns->dev->parent_phone; 345 345 goto failed; … … 350 350 if (ret != EOK) { 351 351 ddf_msg(LVL_ERROR, "Failed to get HW resources for device " 352 "%s. ", ns->dev->name);352 "%s.\n", ns->dev->name); 353 353 goto failed; 354 354 } … … 365 365 ns->irq = res->res.interrupt.irq; 366 366 irq = true; 367 ddf_msg(LVL_NOTE, "Device %s was asigned irq = 0x%x. ",367 ddf_msg(LVL_NOTE, "Device %s was asigned irq = 0x%x.\n", 368 368 ns->dev->name, ns->irq); 369 369 break; … … 373 373 if (res->res.io_range.size < REG_COUNT) { 374 374 ddf_msg(LVL_ERROR, "I/O range assigned to " 375 "device %s is too small. ", ns->dev->name);375 "device %s is too small.\n", ns->dev->name); 376 376 ret = ELIMIT; 377 377 goto failed; … … 379 379 ioport = true; 380 380 ddf_msg(LVL_NOTE, "Device %s was asigned I/O address = " 381 "0x%x. ", ns->dev->name, ns->io_addr);382 381 "0x%x.\n", ns->dev->name, ns->io_addr); 382 break; 383 383 384 384 default: … … 388 388 389 389 if (!irq || !ioport) { 390 ddf_msg(LVL_ERROR, "Missing HW resource(s) for device %s. ",390 ddf_msg(LVL_ERROR, "Missing HW resource(s) for device %s.\n", 391 391 ns->dev->name); 392 392 ret = ENOENT; … … 473 473 474 474 if (baud_rate < 50 || MAX_BAUD_RATE % baud_rate != 0) { 475 ddf_msg(LVL_ERROR, "Invalid baud rate %d requested. ",475 ddf_msg(LVL_ERROR, "Invalid baud rate %d requested.\n", 476 476 baud_rate); 477 477 return EINVAL; … … 658 658 if (!buf_push_back(&ns->input_buffer, val)) { 659 659 ddf_msg(LVL_WARN, "Buffer overflow on " 660 "%s. ", ns->dev->name);660 "%s.\n", ns->dev->name); 661 661 } else { 662 662 ddf_msg(LVL_DEBUG2, "Character %c saved " 663 "to the buffer of %s. ",663 "to the buffer of %s.\n", 664 664 val, ns->dev->name); 665 665 } … … 717 717 int rc; 718 718 719 ddf_msg(LVL_DEBUG, "ns8250_add_device %s (handle = %d) ",719 ddf_msg(LVL_DEBUG, "ns8250_add_device %s (handle = %d)\n", 720 720 dev->name, (int) dev->handle); 721 721 … … 752 752 /* Register interrupt handler. */ 753 753 if (ns8250_register_interrupt_handler(ns) != EOK) { 754 ddf_msg(LVL_ERROR, "Failed to register interrupt handler. ");754 ddf_msg(LVL_ERROR, "Failed to register interrupt handler.\n"); 755 755 rc = EADDRNOTAVAIL; 756 756 goto fail; … … 761 761 if (rc != EOK) { 762 762 ddf_msg(LVL_ERROR, "Failed to enable the interrupt. Error code = " 763 "%d. ", rc);763 "%d.\n", rc); 764 764 goto fail; 765 765 } … … 767 767 fun = ddf_fun_create(dev, fun_exposed, "a"); 768 768 if (fun == NULL) { 769 ddf_msg(LVL_ERROR, "Failed creating function. ");769 ddf_msg(LVL_ERROR, "Failed creating function.\n"); 770 770 goto fail; 771 771 } … … 775 775 rc = ddf_fun_bind(fun); 776 776 if (rc != EOK) { 777 ddf_msg(LVL_ERROR, "Failed binding function. ");777 ddf_msg(LVL_ERROR, "Failed binding function.\n"); 778 778 goto fail; 779 779 } … … 783 783 ddf_fun_add_to_class(fun, "serial"); 784 784 785 ddf_msg(LVL_NOTE, "Device %s successfully initialized. ",785 ddf_msg(LVL_NOTE, "Device %s successfully initialized.\n", 786 786 dev->name); 787 787 … … 866 866 867 867 ddf_msg(LVL_DEBUG, "ns8250_get_props: baud rate %d, parity 0x%x, word " 868 "length %d, stop bits %d ", *baud_rate, *parity, *word_length,868 "length %d, stop bits %d\n", *baud_rate, *parity, *word_length, 869 869 *stop_bits); 870 870 } … … 883 883 { 884 884 ddf_msg(LVL_DEBUG, "ns8250_set_props: baud rate %d, parity 0x%x, word " 885 "length %d, stop bits %d ", baud_rate, parity, word_length,885 "length %d, stop bits %d\n", baud_rate, parity, word_length, 886 886 stop_bits); 887 887
Note:
See TracChangeset
for help on using the changeset viewer.