Changeset 21063c2 in mainline


Ignore:
Timestamp:
2012-02-16T21:16:22Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3cc070d, c01bb5f9
Parents:
1402402
Message:

Define a PIO range for PL050 keyboard and adjust its IRQ code accordingly.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/src/mach/integratorcp/integratorcp.c

    r1402402 r21063c2  
    332332        sysinfo_set_item_val("kbd", NULL, true);
    333333        sysinfo_set_item_val("kbd.inr", NULL, ICP_KBD_IRQ);
    334         sysinfo_set_item_val("kbd.address.status", NULL,
    335             (uintptr_t) icp_hw_map.kbd_stat);
    336         sysinfo_set_item_val("kbd.address.data", NULL,
    337             (uintptr_t) icp_hw_map.kbd_data);
     334        sysinfo_set_item_val("kbd.address.physical", NULL,
     335            ICP_KBD);
    338336
    339337}
  • uspace/srv/hid/input/port/pl050.c

    r1402402 r21063c2  
    6161static kbd_dev_t *kbd_dev;
    6262
     63#define PL050_STAT      4
     64#define PL050_DATA      8
     65
    6366#define PL050_STAT_RXFULL  (1 << 4)
     67
     68static irq_pio_range_t pl050_ranges[] = {
     69        {
     70                .base = 0,
     71                .size = 9,
     72        }
     73};
    6474
    6575static irq_cmd_t pl050_cmds[] = {
     
    91101
    92102static irq_code_t pl050_kbd = {
    93         0,      // FIXME
    94         NULL,   // FIXME
     103        sizeof(pl050_ranges) / sizeof(irq_pio_range_t),
     104        pl050_ranges,
    95105        sizeof(pl050_cmds) / sizeof(irq_cmd_t),
    96106        pl050_cmds
     
    104114       
    105115        sysarg_t addr;
    106         if (sysinfo_get_value("kbd.address.status", &addr) != EOK)
     116        if (sysinfo_get_value("kbd.address.physical", &addr) != EOK)
    107117                return -1;
    108118       
    109         pl050_kbd.cmds[0].addr = (void *) addr;
    110        
    111         if (sysinfo_get_value("kbd.address.data", &addr) != EOK)
    112                 return -1;
    113        
    114         pl050_kbd.cmds[3].addr = (void *) addr;
     119        pl050_kbd.ranges[0].base = addr;
     120        pl050_kbd.cmds[0].addr = (void *) addr + PL050_STAT;
     121        pl050_kbd.cmds[3].addr = (void *) addr + PL050_DATA;
    115122       
    116123        sysarg_t inr;
Note: See TracChangeset for help on using the changeset viewer.