Changeset a31aad1 in mainline for uspace/srv/hid/input/port/ns16550.c


Ignore:
Timestamp:
2012-02-14T22:29:02Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
27ed3edd
Parents:
cfb79747
Message:

Define PIO range for the ns16550 driver.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/input/port/ns16550.c

    rcfb79747 ra31aad1  
    7070#define LSR_DATA_READY  0x01
    7171
     72static irq_pio_range_t ns16550_ranges[] = {
     73        {
     74                .base = 0,
     75                .size = 8
     76        }
     77};
     78
    7279static irq_cmd_t ns16550_cmds[] = {
    7380        {
     
    98105
    99106irq_code_t ns16550_kbd = {
    100         0,
    101         NULL,
     107        sizeof(ns16550_ranges) / sizeof(irq_pio_range_t),
     108        ns16550_ranges,
    102109        sizeof(ns16550_cmds) / sizeof(irq_cmd_t),
    103110        ns16550_cmds
     
    107114
    108115static uintptr_t ns16550_physical;
    109 static uintptr_t ns16550_kernel;
    110116
    111117static kbd_dev_t *kbd_dev;
     
    126132                return -1;
    127133       
    128         if (sysinfo_get_value("kbd.address.kernel", &ns16550_kernel) != EOK)
    129                 return -1;
    130        
    131134        sysarg_t inr;
    132135        if (sysinfo_get_value("kbd.inr", &inr) != EOK)
    133136                return -1;
    134137       
    135         ns16550_kbd.cmds[0].addr = (void *) (ns16550_kernel + LSR_REG);
    136         ns16550_kbd.cmds[3].addr = (void *) (ns16550_kernel + RBR_REG);
     138        ns16550_kbd.ranges[0].base = ns16550_physical;
     139        ns16550_kbd.cmds[0].addr = (void *) (ns16550_physical + LSR_REG);
     140        ns16550_kbd.cmds[3].addr = (void *) (ns16550_physical + RBR_REG);
    137141       
    138142        async_set_interrupt_received(ns16550_irq_handler);
Note: See TracChangeset for help on using the changeset viewer.