Changeset bfa4ffa in mainline for uspace/drv/char/ns8250/ns8250.c


Ignore:
Timestamp:
2016-12-27T13:34:08Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9185e42
Parents:
0d9b4a8 (diff), 73d8600 (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 from lp:~jakub/helenos/sun4u

This merge brings support for serial console on the QEMU sun4u machine
and by extension on any system that provides at least one device driver
for a serial port device in the 'serial' location service category and
points the 'console' boot argument to it.

The 'console' boot argument is used to differentiate character devices
that are used as a console from other character devices that may be used
for other purposes (e.g. SLIP or keyboard).

Support for real-world sun4u machines is temporarily broken. The legacy
ns16550 input port driver has been discontinued. Real-world Ultra 5,
which is fairly close to the QEMU machine should be easy to revive. In
order to support the sun4u QEMU machine, a new sun4u platform driver was
added. The isa driver was modified to be usable also for the EBUS bus.

On sparc64 the boot argument is passed in the boot-args boot prom
environment variable. On ia32 and amd64, the boot argument can be set in
grub.cfg as an argument to the multiboot command. The backslashes need
to be properly escaped. Other platforms don't have support for boot
arguments yet.

Because the user input/output subsystem is apparently not ready to drive
the serial console next to the ordinary console or the GUI, the serial
console mode is mutually exclusive with the normal
keyboard/ega/fb/compositor mode.

File:
1 edited

Legend:

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

    r0d9b4a8 rbfa4ffa  
    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                       
     
    771771{
    772772        ns8250_t *ns = dev_ns8250(dev);
    773 
    774773        uint8_t iir = pio_read_8(&ns->regs->iid);
    775774        if ((iir & NS8250_IID_CAUSE_MASK) == NS8250_IID_CAUSE_RXSTATUS) {
     
    781780       
    782781        ns8250_read_from_device(ns);
     782        irc_disable_interrupt(ns->irq);
    783783}
    784784
     
    857857        }
    858858        need_unreg_intr_handler = true;
    859        
     859
    860860        /* Enable interrupt. */
    861861        rc = ns8250_interrupt_enable(ns);
Note: See TracChangeset for help on using the changeset viewer.