Changeset 340513c in mainline


Ignore:
Timestamp:
2016-10-31T23:31:05Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
405b67c
Parents:
54861ca
Message:

Make io_addr naturally wide

Do not clip io_addr to 32-bits as it can be a full 64-bit address on
64-bit systems.

File:
1 edited

Legend:

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

    r54861ca r340513c  
    163163        int irq;
    164164        /** The base i/o address of the devices registers. */
    165         uint32_t io_addr;
     165        uintptr_t io_addr;
    166166        /** The i/o port used to access the serial ports registers. */
    167167        ioport8_t *port;
     
    330330       
    331331        /* Gain control over port's registers. */
    332         if (pio_enable((void *)(uintptr_t) ns->io_addr, REG_COUNT,
     332        if (pio_enable((void *) ns->io_addr, REG_COUNT,
    333333            (void **) &ns->port)) {
    334                 ddf_msg(LVL_ERROR, "Cannot map the port %#" PRIx32
     334                ddf_msg(LVL_ERROR, "Cannot map the port %#" PRIxn
    335335                    " for device %s.", ns->io_addr, ddf_dev_get_name(ns->dev));
    336336                return false;
     
    432432                        ioport = true;
    433433                        ddf_msg(LVL_NOTE, "Device %s was assigned I/O address = "
    434                             "0x%x.", ddf_dev_get_name(ns->dev), ns->io_addr);
     434                            "0x%#" PRIxn ".", ddf_dev_get_name(ns->dev), ns->io_addr);
    435435                        break;
    436436                       
Note: See TracChangeset for help on using the changeset viewer.