Ignore:
File:
1 edited

Legend:

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

    r5a6cc679 rb7fd2a0  
    4343#include <ddi.h>
    4444#include <usb/host/hcd.h>
    45 #include <usb/host/usb2_bus.h>
    4645#include <usb/host/usb_transfer_batch.h>
    4746
     
    10099/** Main UHCI driver structure */
    101100typedef struct hc {
    102         /* Common hc_device header */
    103         hc_device_t base;
    104 
    105101        uhci_rh_t rh;
    106         bus_t bus;
    107         usb2_bus_helper_t bus_helper;
    108 
    109102        /** Addresses of I/O registers */
    110103        uhci_regs_t *registers;
     
    124117        /** Pointer table to the above lists, helps during scheduling */
    125118        transfer_list_t *transfers[2][4];
    126 
    127         /**
    128          * Guard for the pending list. Can be locked under EP guard, but not
    129          * vice versa.
    130          */
    131         fibril_mutex_t guard;
    132         /** List of endpoints with a transfer scheduled */
    133         list_t pending_endpoints;
     119        /** Indicator of hw interrupts availability */
     120        bool hw_interrupts;
    134121
    135122        /** Number of hw failures detected. */
     
    137124} hc_t;
    138125
    139 typedef struct uhci_endpoint {
    140         endpoint_t base;
     126extern errno_t hc_init(hc_t *, const hw_res_list_parsed_t *, bool);
     127extern void hc_fini(hc_t *);
    141128
    142         bool toggle;
    143 } uhci_endpoint_t;
     129extern errno_t uhci_hc_gen_irq_code(irq_code_t *, const hw_res_list_parsed_t *, int *);
    144130
    145 static inline hc_t *hcd_to_hc(hc_device_t *hcd)
    146 {
    147         assert(hcd);
    148         return (hc_t *) hcd;
    149 }
    150 
    151 static inline hc_t *bus_to_hc(bus_t *bus)
    152 {
    153         assert(bus);
    154         return member_to_inst(bus, hc_t, bus);
    155 }
    156 
    157 int hc_unschedule_batch(usb_transfer_batch_t *);
    158 
    159 extern errno_t hc_add(hc_device_t *, const hw_res_list_parsed_t *);
    160 extern errno_t hc_gen_irq_code(irq_code_t *, hc_device_t *, const hw_res_list_parsed_t *, int *);
    161 extern errno_t hc_start(hc_device_t *);
    162 extern errno_t hc_setup_roothub(hc_device_t *);
    163 extern errno_t hc_gone(hc_device_t *);
     131extern void uhci_hc_interrupt(hcd_t *, uint32_t);
     132extern errno_t uhci_hc_status(hcd_t *, uint32_t *);
     133extern errno_t uhci_hc_schedule(hcd_t *, usb_transfer_batch_t *);
    164134
    165135#endif
Note: See TracChangeset for help on using the changeset viewer.