Ignore:
File:
1 edited

Legend:

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

    rb5111c46 r58563585  
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
     28
    2829/** @addtogroup drvusbohci
    2930 * @{
     
    3233 * @brief OHCI host controller driver structure
    3334 */
     35
    3436#ifndef DRV_OHCI_HC_H
    3537#define DRV_OHCI_HC_H
    3638
     39#include <adt/list.h>
     40#include <ddi.h>
    3741#include <ddf/driver.h>
    38 #include <ddf/interrupt.h>
     42#include <device/hw_res_parsed.h>
    3943#include <fibril.h>
    4044#include <fibril_synch.h>
    41 #include <adt/list.h>
    42 #include <ddi.h>
     45#include <stdbool.h>
     46#include <sys/types.h>
    4347
    44 #include <usb/usb.h>
    4548#include <usb/host/hcd.h>
     49#include <usb/host/endpoint.h>
     50#include <usb/host/usb_transfer_batch.h>
    4651
    47 #include "ohci_batch.h"
    4852#include "ohci_regs.h"
    49 #include "root_hub.h"
     53#include "ohci_rh.h"
    5054#include "endpoint_list.h"
    5155#include "hw_struct/hcca.h"
     
    5357/** Main OHCI driver structure */
    5458typedef struct hc {
    55         /** Generic USB hc driver */
    56         hcd_t *generic;
    57 
    5859        /** Memory mapped I/O registers area */
    5960        ohci_regs_t *registers;
     
    7273        fibril_mutex_t guard;
    7374
     75        /** interrupts available */
     76        bool hw_interrupts;
     77
    7478        /** USB hub emulation structure */
    75         rh_t rh;
     79        ohci_rh_t rh;
    7680} hc_t;
    7781
    78 int hc_get_irq_code(irq_pio_range_t [], size_t, irq_cmd_t [], size_t,
    79     addr_range_t *);
    80 int hc_register_irq_handler(ddf_dev_t *, addr_range_t *, int,
    81     interrupt_handler_t);
    82 int hc_register_hub(hc_t *, ddf_fun_t *);
    83 int hc_init(hc_t *, ddf_fun_t *, addr_range_t *, bool);
     82extern int hc_init(hc_t *, const hw_res_list_parsed_t *, bool);
     83extern void hc_fini(hc_t *);
    8484
    85 /** Safely dispose host controller internal structures
    86  *
    87  * @param[in] instance Host controller structure to use.
    88  */
    89 static inline void hc_fini(hc_t *instance) { /* TODO: implement*/ };
     85extern void hc_enqueue_endpoint(hc_t *, const endpoint_t *);
     86extern void hc_dequeue_endpoint(hc_t *, const endpoint_t *);
    9087
    91 void hc_enqueue_endpoint(hc_t *instance, const endpoint_t *ep);
    92 void hc_dequeue_endpoint(hc_t *instance, const endpoint_t *ep);
     88int ohci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res);
    9389
    94 void hc_interrupt(hc_t *instance, uint32_t status);
     90extern void ohci_hc_interrupt(hcd_t *, uint32_t);
     91extern int ohci_hc_status(hcd_t *, uint32_t *);
     92extern int ohci_hc_schedule(hcd_t *, usb_transfer_batch_t *);
     93
    9594#endif
     95
    9696/**
    9797 * @}
Note: See TracChangeset for help on using the changeset viewer.