Ignore:
File:
1 edited

Legend:

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

    rb7fd2a0 r5a6cc679  
    5555/** Main EHCI driver structure */
    5656typedef struct hc {
     57        /* Common device header */
     58        hc_device_t base;
     59
    5760        /** Memory mapped CAPS register area */
    5861        ehci_caps_regs_t *caps;
     
    6063        ehci_regs_t *registers;
    6164
    62         /** Iso transfer list */
    63         link_pointer_t *periodic_list_base;
     65        /** Iso transfer list, backed by dma_buffer */
     66        link_pointer_t *periodic_list;
     67
     68        dma_buffer_t dma_buffer;
    6469
    6570        /** CONTROL and BULK schedules */
     
    7075
    7176        /** List of active transfers */
    72         list_t pending_batches;
     77        list_t pending_endpoints;
    7378
    7479        /** Guards schedule and endpoint manipulation */
     
    8085        /** USB hub emulation structure */
    8186        ehci_rh_t rh;
     87
     88        /** USB bookkeeping */
     89        ehci_bus_t bus;
    8290} hc_t;
    8391
    84 errno_t hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interrupts);
    85 void hc_fini(hc_t *instance);
     92static inline hc_t *hcd_to_hc(hc_device_t *hcd)
     93{
     94        assert(hcd);
     95        return (hc_t *) hcd;
     96}
    8697
    87 void hc_enqueue_endpoint(hc_t *instance, const endpoint_t *ep);
    88 void hc_dequeue_endpoint(hc_t *instance, const endpoint_t *ep);
     98void hc_enqueue_endpoint(hc_t *, const endpoint_t *);
     99void hc_dequeue_endpoint(hc_t *, const endpoint_t *);
    89100
    90 errno_t ehci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res, int *irq);
     101/* Boottime operations */
     102extern errno_t hc_add(hc_device_t *, const hw_res_list_parsed_t *);
     103extern errno_t hc_start(hc_device_t *);
     104extern errno_t hc_setup_roothub(hc_device_t *);
     105extern errno_t hc_gen_irq_code(irq_code_t *, hc_device_t *, const hw_res_list_parsed_t *, int *);
     106extern errno_t hc_gone(hc_device_t *);
    91107
    92 void ehci_hc_interrupt(hcd_t *hcd, uint32_t status);
    93 errno_t ehci_hc_status(hcd_t *hcd, uint32_t *status);
    94 errno_t ehci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch);
     108/** Runtime operations */
     109extern void ehci_hc_interrupt(bus_t *, uint32_t);
     110extern errno_t ehci_hc_status(bus_t *, uint32_t *);
     111extern errno_t ehci_hc_schedule(usb_transfer_batch_t *);
     112
    95113#endif
    96114/**
Note: See TracChangeset for help on using the changeset viewer.