Ignore:
File:
1 edited

Legend:

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

    rfccf289 r7de1988c  
    3535#define DRV_OHCI_HC_H
    3636
     37#include <ddf/interrupt.h>
     38#include <fibril.h>
     39#include <fibril_synch.h>
    3740#include <adt/list.h>
    3841#include <ddi.h>
    39 #include <ddf/driver.h>
    40 #include <device/hw_res_parsed.h>
    41 #include <fibril.h>
    42 #include <fibril_synch.h>
    43 #include <stdbool.h>
    44 #include <sys/types.h>
    4542
     43#include <usb/usb.h>
    4644#include <usb/host/hcd.h>
    47 #include <usb/host/endpoint.h>
    48 #include <usb/host/usb_transfer_batch.h>
    4945
     46#include "ohci_batch.h"
    5047#include "ohci_regs.h"
    51 #include "ohci_rh.h"
     48#include "root_hub.h"
    5249#include "endpoint_list.h"
    5350#include "hw_struct/hcca.h"
     
    5552/** Main OHCI driver structure */
    5653typedef struct hc {
     54        /** Generic USB hc driver */
     55        hcd_t generic;
     56
    5757        /** Memory mapped I/O registers area */
    5858        ohci_regs_t *registers;
     
    7171        fibril_mutex_t guard;
    7272
    73         /** interrupts available */
    74         bool hw_interrupts;
    75 
    7673        /** USB hub emulation structure */
    77         ohci_rh_t rh;
     74        rh_t rh;
    7875} hc_t;
    7976
    80 int hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interrupts);
    81 void hc_fini(hc_t *instance);
     77int hc_get_irq_code(irq_pio_range_t [], size_t, irq_cmd_t [], size_t,
     78    addr_range_t *);
     79int hc_register_irq_handler(ddf_dev_t *, addr_range_t *, int,
     80    interrupt_handler_t);
     81int hc_register_hub(hc_t *instance, ddf_fun_t *hub_fun);
     82int hc_init(hc_t *instance, addr_range_t *regs, bool interrupts);
     83
     84/** Safely dispose host controller internal structures
     85 *
     86 * @param[in] instance Host controller structure to use.
     87 */
     88static inline void hc_fini(hc_t *instance) { /* TODO: implement*/ };
    8289
    8390void hc_enqueue_endpoint(hc_t *instance, const endpoint_t *ep);
    8491void hc_dequeue_endpoint(hc_t *instance, const endpoint_t *ep);
    8592
    86 int ohci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res);
    87 
    88 void ohci_hc_interrupt(hcd_t *hcd, uint32_t status);
    89 int ohci_hc_status(hcd_t *hcd, uint32_t *status);
    90 int ohci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch);
     93void hc_interrupt(hc_t *instance, uint32_t status);
    9194#endif
    9295/**
Note: See TracChangeset for help on using the changeset viewer.