Changeset 2e8a01b in mainline for uspace/drv/bus/usb/ohci/hc.c


Ignore:
Timestamp:
2011-07-10T21:17:38Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1f6eb7d
Parents:
1ecc5de
Message:

OHCI: Use the new way of generating IRQ code

Use bogus read to force kernel to create mapping (perhaps a flag could be added and used by pio_enable, to avoid this)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/hc.c

    r1ecc5de r2e8a01b  
    177177         * and accepts physical addresses in IRQ code.
    178178         * TODO: remove */
    179         void *registers;
    180         const int ret = pio_enable((void*)regs, reg_size, &registers);
     179        ohci_regs_t *registers;
     180        const int ret = pio_enable((void*)regs, reg_size, (void**)&registers);
     181
     182        /* Some bogus access to force create mapping. DO NOT remove,
     183         * unless whole virtual addresses in irq is replaced */
     184        registers->revision;
    181185
    182186        if (ret != EOK)
     
    185189        memcpy(cmds, ohci_irq_commands, sizeof(ohci_irq_commands));
    186190
    187         void *address = (void*)&(((ohci_regs_t*)registers)->interrupt_status);
     191        void *address = (void*)&registers->interrupt_status;
    188192        cmds[0].addr = address;
    189193        cmds[3].addr = address;
Note: See TracChangeset for help on using the changeset viewer.