Changeset b4b534ac in mainline for uspace/drv/bus/usb/ohci/hc.h


Ignore:
Timestamp:
2016-07-22T08:24:47Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f76d2c2
Parents:
5b18137 (diff), 8351f9a4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from lp:~jan.vesely/helenos/usb

File:
1 edited

Legend:

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

    r5b18137 rb4b534ac  
    3535#define DRV_OHCI_HC_H
    3636
     37#include <adt/list.h>
     38#include <ddi.h>
    3739#include <ddf/driver.h>
    38 #include <ddf/interrupt.h>
     40#include <device/hw_res_parsed.h>
    3941#include <fibril.h>
    4042#include <fibril_synch.h>
    41 #include <adt/list.h>
    42 #include <ddi.h>
     43#include <stdbool.h>
     44#include <sys/types.h>
    4345
    44 #include <usb/usb.h>
    4546#include <usb/host/hcd.h>
     47#include <usb/host/endpoint.h>
     48#include <usb/host/usb_transfer_batch.h>
    4649
    47 #include "ohci_batch.h"
    4850#include "ohci_regs.h"
    49 #include "root_hub.h"
     51#include "ohci_rh.h"
    5052#include "endpoint_list.h"
    5153#include "hw_struct/hcca.h"
     
    5355/** Main OHCI driver structure */
    5456typedef struct hc {
    55         /** Generic USB hc driver */
    56         hcd_t *generic;
    57 
    5857        /** Memory mapped I/O registers area */
    5958        ohci_regs_t *registers;
     
    7271        fibril_mutex_t guard;
    7372
     73        /** interrupts available */
     74        bool hw_interrupts;
     75
    7476        /** USB hub emulation structure */
    75         rh_t rh;
     77        ohci_rh_t rh;
    7678} hc_t;
    7779
    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);
    84 
    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*/ };
     80int hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interrupts);
     81void hc_fini(hc_t *instance);
    9082
    9183void hc_enqueue_endpoint(hc_t *instance, const endpoint_t *ep);
    9284void hc_dequeue_endpoint(hc_t *instance, const endpoint_t *ep);
    9385
    94 void hc_interrupt(hc_t *instance, uint32_t status);
     86int ohci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res);
     87
     88void ohci_hc_interrupt(hcd_t *hcd, uint32_t status);
     89int ohci_hc_status(hcd_t *hcd, uint32_t *status);
     90int ohci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch);
    9591#endif
    9692/**
Note: See TracChangeset for help on using the changeset viewer.