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

Changeset 27ed3edd in mainline


Ignore:
Timestamp:
2012-02-14T23:57:35Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
Children:
1402402
Parents:
a31aad1
Message:

Define a PIO range for msim keyboard.

Files:
2 edited

Legend:

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

    ra31aad1 r27ed3edd  
    196196        sysinfo_set_item_val("kbd", NULL, true);
    197197        sysinfo_set_item_val("kbd.inr", NULL, MSIM_KBD_IRQ);
    198         sysinfo_set_item_val("kbd.address.virtual", NULL, MSIM_KBD_ADDRESS);
     198        sysinfo_set_item_val("kbd.address.physical", NULL,
     199            PA2KA(MSIM_KBD_ADDRESS));
    199200#endif
    200201}
  • uspace/srv/hid/input/port/msim.c

    ra31aad1 r27ed3edd  
    5757static kbd_dev_t *kbd_dev;
    5858
     59static irq_pio_range_t msim_ranges[] = {
     60        {
     61                .base = 0,
     62                .size = 1
     63        }
     64};
     65
    5966static irq_cmd_t msim_cmds[] = {
    6067        {
     
    6976
    7077static irq_code_t msim_kbd = {
    71         0,      // FIXME
    72         NULL,   // FIXME
     78        sizeof(msim_ranges) / sizeof(irq_pio_range_t),
     79        msim_ranges,
    7380        sizeof(msim_cmds) / sizeof(irq_cmd_t),
    7481        msim_cmds
     
    8188        kbd_dev = kdev;
    8289
    83         sysarg_t vaddr;
    84         if (sysinfo_get_value("kbd.address.virtual", &vaddr) != EOK)
     90        sysarg_t paddr;
     91        if (sysinfo_get_value("kbd.address.physical", &paddr) != EOK)
    8592                return -1;
    8693       
     
    8996                return -1;
    9097       
    91         msim_cmds[0].addr = (void *) vaddr;
     98        msim_ranges[0].base = paddr;
     99        msim_cmds[0].addr = (void *) paddr;
    92100        async_set_interrupt_received(msim_irq_handler);
    93101        irq_register(inr, device_assign_devno(), 0, &msim_kbd);
Note: See TracChangeset for help on using the changeset viewer.