Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset a31aad1 in mainline


Ignore:
Timestamp:
2012-02-14T22:29:02Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
Children:
27ed3edd
Parents:
cfb79747
Message:

Define PIO range for the ns16550 driver.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia64/src/ia64.c

    rcfb79747 ra31aad1  
    188188        sysinfo_set_item_val("kbd.address.physical", NULL,
    189189            (uintptr_t) NS16550_BASE);
    190         sysinfo_set_item_val("kbd.address.kernel", NULL,
    191             (uintptr_t) NS16550_BASE);
    192190#endif
    193191       
  • kernel/arch/sparc64/src/drivers/kbd.c

    rcfb79747 ra31aad1  
    133133        sysinfo_set_item_val("kbd", NULL, true);
    134134        sysinfo_set_item_val("kbd.inr", NULL, inr);
    135         sysinfo_set_item_val("kbd.address.kernel", NULL,
    136             (uintptr_t) ns16550);
    137135        sysinfo_set_item_val("kbd.address.physical", NULL, pa);
    138136        sysinfo_set_item_val("kbd.type.ns16550", NULL, true);
  • 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.