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

Changeset d52ab7b in mainline


Ignore:
Timestamp:
2014-03-16T16:33:39Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
Children:
2e231aba
Parents:
8cffdf5
Message:

Use proper ioport8/16/32_t for I/O register representation in UHCI HC.

Location:
uspace/drv/bus/usb/uhci
Files:
2 edited

Legend:

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

    r8cffdf5 rd52ab7b  
    123123        memcpy(cmds, uhci_irq_commands, sizeof(uhci_irq_commands));
    124124        uhci_regs_t *registers = (uhci_regs_t *) RNGABSPTR(*regs);
    125         cmds[0].addr = &registers->usbsts;
    126         cmds[3].addr = &registers->usbsts;
     125        cmds[0].addr = (void *) &registers->usbsts;
     126        cmds[3].addr = (void *) &registers->usbsts;
    127127
    128128        return EOK;
  • uspace/drv/bus/usb/uhci/hc.h

    r8cffdf5 rd52ab7b  
    4646typedef struct uhci_regs {
    4747        /** Command register, controls HC behaviour */
    48         uint16_t usbcmd;
     48        ioport16_t usbcmd;
    4949#define UHCI_CMD_MAX_PACKET (1 << 7)
    5050#define UHCI_CMD_CONFIGURE  (1 << 6)
     
    5757
    5858        /** Status register, 1 means interrupt is asserted (if enabled) */
    59         uint16_t usbsts;
     59        ioport16_t usbsts;
    6060#define UHCI_STATUS_HALTED (1 << 5)
    6161#define UHCI_STATUS_PROCESS_ERROR (1 << 4)
     
    6868
    6969        /** Interrupt enabled registers */
    70         uint16_t usbintr;
     70        ioport16_t usbintr;
    7171#define UHCI_INTR_SHORT_PACKET (1 << 3)
    7272#define UHCI_INTR_COMPLETE (1 << 2)
     
    7575
    7676        /** Register stores frame number used in SOF packet */
    77         uint16_t frnum;
     77        ioport16_t frnum;
    7878
    7979        /** Pointer(physical) to the Frame List */
    80         uint32_t flbaseadd;
     80        ioport32_t flbaseadd;
    8181
    8282        /** SOF modification to match external timers */
    83         uint8_t sofmod;
     83        ioport8_t sofmod;
    8484} uhci_regs_t;
    8585
Note: See TracChangeset for help on using the changeset viewer.