Changeset 0a208110 in mainline for uspace/drv/char/i8042/i8042.c


Ignore:
Timestamp:
2012-02-24T18:04:56Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2578199
Parents:
b9bbaad (diff), 087768f (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:

Mainline changes.

Registering OHCI irq handler panics on ppc32.

File:
1 edited

Legend:

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

    rb9bbaad r0a208110  
    105105};
    106106
     107static const irq_pio_range_t i8042_ranges[] = {
     108        {
     109                .base = 0,
     110                .size = sizeof(i8042_regs_t)
     111        }
     112};
     113
    107114/** i8042 Interrupt pseudo-code. */
    108115static const irq_cmd_t i8042_cmds[] = {
     
    239246        while (pio_read_8(&dev->regs->status) & i8042_OUTPUT_FULL)
    240247                (void) pio_read_8(&dev->regs->data);
    241        
     248
     249        const size_t range_count = sizeof(i8042_ranges) /
     250            sizeof(irq_pio_range_t);
     251        irq_pio_range_t ranges[range_count];
     252        memcpy(ranges, i8042_ranges, sizeof(i8042_ranges));
     253        ranges[0].base = (uintptr_t) regs;
     254
    242255        const size_t cmd_count = sizeof(i8042_cmds) / sizeof(irq_cmd_t);
    243256        irq_cmd_t cmds[cmd_count];
    244257        memcpy(cmds, i8042_cmds, sizeof(i8042_cmds));
    245         cmds[0].addr = (void *) &dev->regs->status;
    246         cmds[3].addr = (void *) &dev->regs->data;
    247        
     258        cmds[0].addr = (void *) &(((i8042_regs_t *) regs)->status);
     259        cmds[3].addr = (void *) &(((i8042_regs_t *) regs)->data);
     260
    248261        irq_code_t irq_code = {
     262                .rangecount = range_count,
     263                .ranges = ranges,
    249264                .cmdcount = cmd_count,
    250265                .cmds = cmds
Note: See TracChangeset for help on using the changeset viewer.