Ignore:
File:
1 edited

Legend:

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

    r8064c2f6 r7de1988c  
    3636#define DRV_UHCI_HC_H
    3737
     38#include <ddf/interrupt.h>
    3839#include <device/hw_res_parsed.h>
    3940#include <fibril.h>
    40 #include <macros.h>
    41 #include <stdbool.h>
    42 #include <sys/types.h>
    4341#include <usb/host/hcd.h>
    44 #include <usb/host/usb_transfer_batch.h>
    4542
    46 #include "uhci_rh.h"
    4743#include "transfer_list.h"
    48 #include "hw_struct/link_pointer.h"
    4944
    5045/** UHCI I/O registers layout */
    5146typedef struct uhci_regs {
    5247        /** Command register, controls HC behaviour */
    53         ioport16_t usbcmd;
     48        uint16_t usbcmd;
    5449#define UHCI_CMD_MAX_PACKET (1 << 7)
    5550#define UHCI_CMD_CONFIGURE  (1 << 6)
     
    6257
    6358        /** Status register, 1 means interrupt is asserted (if enabled) */
    64         ioport16_t usbsts;
     59        uint16_t usbsts;
    6560#define UHCI_STATUS_HALTED (1 << 5)
    6661#define UHCI_STATUS_PROCESS_ERROR (1 << 4)
     
    7368
    7469        /** Interrupt enabled registers */
    75         ioport16_t usbintr;
     70        uint16_t usbintr;
    7671#define UHCI_INTR_SHORT_PACKET (1 << 3)
    7772#define UHCI_INTR_COMPLETE (1 << 2)
     
    8075
    8176        /** Register stores frame number used in SOF packet */
    82         ioport16_t frnum;
     77        uint16_t frnum;
    8378
    8479        /** Pointer(physical) to the Frame List */
    85         ioport32_t flbaseadd;
     80        uint32_t flbaseadd;
    8681
    8782        /** SOF modification to match external timers */
    88         ioport8_t sofmod;
    89 
    90         PADD8[3];
    91         ioport16_t ports[];
     83        uint8_t sofmod;
    9284} uhci_regs_t;
    9385
     
    10092/** Main UHCI driver structure */
    10193typedef struct hc {
    102         uhci_rh_t rh;
     94        /** Generic HCD driver structure */
     95        hcd_t generic;
     96
    10397        /** Addresses of I/O registers */
    10498        uhci_regs_t *registers;
     
    127121} hc_t;
    128122
    129 int hc_gen_irq_code(irq_code_t *code, addr_range_t *regs);
     123int hc_register_irq_handler(ddf_dev_t *, addr_range_t *, int,
     124    interrupt_handler_t);
     125int hc_get_irq_code(irq_pio_range_t [], size_t, irq_cmd_t [], size_t,
     126    addr_range_t *);
    130127void hc_interrupt(hc_t *instance, uint16_t status);
    131128int hc_init(hc_t *instance, addr_range_t *regs, bool interupts);
    132 int hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch);
    133129
    134130/** Safely dispose host controller internal structures
Note: See TracChangeset for help on using the changeset viewer.