Changeset 8436590 in mainline for uspace/drv/ns8250/ns8250.c


Ignore:
Timestamp:
2011-04-07T21:38:17Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
033cbf82
Parents:
3acb285 (diff), ccca251 (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.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ns8250/ns8250.c

    r3acb285 r8436590  
    276276static bool ns8250_pio_enable(ns8250_t *ns)
    277277{
    278         ddf_msg(LVL_DEBUG, "ns8250_pio_enable %s\n", ns->dev->name);
     278        ddf_msg(LVL_DEBUG, "ns8250_pio_enable %s", ns->dev->name);
    279279       
    280280        /* Gain control over port's registers. */
     
    282282            (void **) &ns->port)) {
    283283                ddf_msg(LVL_ERROR, "Cannot map the port %#" PRIx32
    284                     " for device %s.\n", ns->io_addr, ns->dev->name);
     284                    " for device %s.", ns->io_addr, ns->dev->name);
    285285                return false;
    286286        }
     
    296296static bool ns8250_dev_probe(ns8250_t *ns)
    297297{
    298         ddf_msg(LVL_DEBUG, "ns8250_dev_probe %s\n", ns->dev->name);
     298        ddf_msg(LVL_DEBUG, "ns8250_dev_probe %s", ns->dev->name);
    299299       
    300300        ioport8_t *port_addr = ns->port;
     
    315315       
    316316        if (!res) {
    317                 ddf_msg(LVL_DEBUG, "Device %s is not present.\n",
     317                ddf_msg(LVL_DEBUG, "Device %s is not present.",
    318318                    ns->dev->name);
    319319        }
     
    329329static int ns8250_dev_initialize(ns8250_t *ns)
    330330{
    331         ddf_msg(LVL_DEBUG, "ns8250_dev_initialize %s\n", ns->dev->name);
     331        ddf_msg(LVL_DEBUG, "ns8250_dev_initialize %s", ns->dev->name);
    332332       
    333333        int ret = EOK;
     
    341341        if (ns->dev->parent_phone < 0) {
    342342                ddf_msg(LVL_ERROR, "Failed to connect to parent driver of "
    343                     "device %s.\n", ns->dev->name);
     343                    "device %s.", ns->dev->name);
    344344                ret = ns->dev->parent_phone;
    345345                goto failed;
     
    350350        if (ret != EOK) {
    351351                ddf_msg(LVL_ERROR, "Failed to get HW resources for device "
    352                     "%s.\n", ns->dev->name);
     352                    "%s.", ns->dev->name);
    353353                goto failed;
    354354        }
     
    365365                        ns->irq = res->res.interrupt.irq;
    366366                        irq = true;
    367                         ddf_msg(LVL_NOTE, "Device %s was asigned irq = 0x%x.\n",
     367                        ddf_msg(LVL_NOTE, "Device %s was asigned irq = 0x%x.",
    368368                            ns->dev->name, ns->irq);
    369369                        break;
     
    373373                        if (res->res.io_range.size < REG_COUNT) {
    374374                                ddf_msg(LVL_ERROR, "I/O range assigned to "
    375                                     "device %s is too small.\n", ns->dev->name);
     375                                    "device %s is too small.", ns->dev->name);
    376376                                ret = ELIMIT;
    377377                                goto failed;
     
    379379                        ioport = true;
    380380                        ddf_msg(LVL_NOTE, "Device %s was asigned I/O address = "
    381                             "0x%x.\n", ns->dev->name, ns->io_addr);
    382                         break;
     381                            "0x%x.", ns->dev->name, ns->io_addr);
     382                        break;
    383383                       
    384384                default:
     
    388388       
    389389        if (!irq || !ioport) {
    390                 ddf_msg(LVL_ERROR, "Missing HW resource(s) for device %s.\n",
     390                ddf_msg(LVL_ERROR, "Missing HW resource(s) for device %s.",
    391391                    ns->dev->name);
    392392                ret = ENOENT;
     
    473473       
    474474        if (baud_rate < 50 || MAX_BAUD_RATE % baud_rate != 0) {
    475                 ddf_msg(LVL_ERROR, "Invalid baud rate %d requested.\n",
     475                ddf_msg(LVL_ERROR, "Invalid baud rate %d requested.",
    476476                    baud_rate);
    477477                return EINVAL;
     
    658658                                if (!buf_push_back(&ns->input_buffer, val)) {
    659659                                        ddf_msg(LVL_WARN, "Buffer overflow on "
    660                                             "%s.\n", ns->dev->name);
     660                                            "%s.", ns->dev->name);
    661661                                } else {
    662662                                        ddf_msg(LVL_DEBUG2, "Character %c saved "
    663                                             "to the buffer of %s.\n",
     663                                            "to the buffer of %s.",
    664664                                            val, ns->dev->name);
    665665                                }
     
    717717        int rc;
    718718       
    719         ddf_msg(LVL_DEBUG, "ns8250_add_device %s (handle = %d)\n",
     719        ddf_msg(LVL_DEBUG, "ns8250_add_device %s (handle = %d)",
    720720            dev->name, (int) dev->handle);
    721721       
     
    752752        /* Register interrupt handler. */
    753753        if (ns8250_register_interrupt_handler(ns) != EOK) {
    754                 ddf_msg(LVL_ERROR, "Failed to register interrupt handler.\n");
     754                ddf_msg(LVL_ERROR, "Failed to register interrupt handler.");
    755755                rc = EADDRNOTAVAIL;
    756756                goto fail;
     
    761761        if (rc != EOK) {
    762762                ddf_msg(LVL_ERROR, "Failed to enable the interrupt. Error code = "
    763                     "%d.\n", rc);
     763                    "%d.", rc);
    764764                goto fail;
    765765        }
     
    767767        fun = ddf_fun_create(dev, fun_exposed, "a");
    768768        if (fun == NULL) {
    769                 ddf_msg(LVL_ERROR, "Failed creating function.\n");
     769                ddf_msg(LVL_ERROR, "Failed creating function.");
    770770                goto fail;
    771771        }
     
    775775        rc = ddf_fun_bind(fun);
    776776        if (rc != EOK) {
    777                 ddf_msg(LVL_ERROR, "Failed binding function.\n");
     777                ddf_msg(LVL_ERROR, "Failed binding function.");
    778778                goto fail;
    779779        }
     
    783783        ddf_fun_add_to_class(fun, "serial");
    784784       
    785         ddf_msg(LVL_NOTE, "Device %s successfully initialized.\n",
     785        ddf_msg(LVL_NOTE, "Device %s successfully initialized.",
    786786            dev->name);
    787787       
     
    866866       
    867867        ddf_msg(LVL_DEBUG, "ns8250_get_props: baud rate %d, parity 0x%x, word "
    868             "length %d, stop bits %d\n", *baud_rate, *parity, *word_length,
     868            "length %d, stop bits %d", *baud_rate, *parity, *word_length,
    869869            *stop_bits);
    870870}
     
    883883{
    884884        ddf_msg(LVL_DEBUG, "ns8250_set_props: baud rate %d, parity 0x%x, word "
    885             "length %d, stop bits %d\n", baud_rate, parity, word_length,
     885            "length %d, stop bits %d", baud_rate, parity, word_length,
    886886            stop_bits);
    887887       
Note: See TracChangeset for help on using the changeset viewer.