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 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/include/usb/host/ddf_helpers.h

    r5b18137 rb4b534ac  
    11/*
    2  * Copyright (c) 2011 Vojtech Horky
     2 * Copyright (c) 2012 Jan Vesely
    33 * All rights reserved.
    44 *
     
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
    28 /** @addtogroup drvusbohci
     28
     29/** @addtogroup libusbhost
    2930 * @{
    3031 */
    3132/** @file
    32  * PCI related functions needed by OHCI driver.
     33 *
    3334 */
    34 #ifndef DRV_OHCI_RES_H
    35 #define DRV_OHCI_RES_H
     35
     36#ifndef LIBUSBHOST_HOST_DDF_HELPERS_H
     37#define LIBUSBHOST_HOST_DDF_HELPERS_H
     38
     39#include <usb/host/hcd.h>
     40#include <usb/host/usb_bus.h>
     41#include <usb/usb.h>
    3642
    3743#include <ddf/driver.h>
     44#include <ddf/interrupt.h>
    3845#include <device/hw_res_parsed.h>
    3946
    40 int get_my_registers(ddf_dev_t *, addr_range_t *, int *);
    41 int enable_interrupts(ddf_dev_t *);
     47typedef int (*driver_init_t)(hcd_t *, const hw_res_list_parsed_t *, bool);
     48typedef void (*driver_fini_t)(hcd_t *);
     49typedef int (*claim_t)(ddf_dev_t *);
     50typedef int (*irq_code_gen_t)(irq_code_t *, const hw_res_list_parsed_t *);
     51
     52typedef struct {
     53        hcd_ops_t ops;
     54        claim_t claim;
     55        usb_speed_t hc_speed;
     56        driver_init_t init;
     57        driver_fini_t fini;
     58        interrupt_handler_t *irq_handler;
     59        irq_code_gen_t irq_code_gen;
     60        const char *name;
     61} ddf_hc_driver_t;
     62
     63int hcd_ddf_add_hc(ddf_dev_t *device, const ddf_hc_driver_t *driver);
     64
     65int hcd_ddf_setup_hc(ddf_dev_t *device, usb_speed_t max_speed,
     66    size_t bw, bw_count_func_t bw_count);
     67void hcd_ddf_clean_hc(ddf_dev_t *device);
     68int hcd_ddf_setup_root_hub(ddf_dev_t *device);
     69
     70hcd_t *dev_to_hcd(ddf_dev_t *dev);
     71
     72int hcd_ddf_enable_interrupts(ddf_dev_t *device);
     73int hcd_ddf_get_registers(ddf_dev_t *device, hw_res_list_parsed_t *hw_res);
     74int hcd_ddf_setup_interrupts(ddf_dev_t *device,
     75    const hw_res_list_parsed_t *hw_res,
     76    interrupt_handler_t handler,
     77    int (*gen_irq_code)(irq_code_t *, const hw_res_list_parsed_t *));
     78void ddf_hcd_gen_irq_handler(ipc_callid_t iid, ipc_call_t *call, ddf_dev_t *dev);
    4279
    4380#endif
     81
    4482/**
    4583 * @}
    4684 */
    47 
Note: See TracChangeset for help on using the changeset viewer.