Changeset b4b534ac in mainline for uspace/drv/bus/usb/uhci/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/uhci/hc.h

    r5b18137 rb4b534ac  
    3636#define DRV_UHCI_HC_H
    3737
    38 #include <ddf/driver.h>
    39 #include <ddf/interrupt.h>
    4038#include <device/hw_res_parsed.h>
    4139#include <fibril.h>
     40#include <macros.h>
     41#include <stdbool.h>
     42#include <sys/types.h>
    4243#include <usb/host/hcd.h>
     44#include <usb/host/usb_transfer_batch.h>
    4345
     46#include "uhci_rh.h"
    4447#include "transfer_list.h"
     48#include "hw_struct/link_pointer.h"
    4549
    4650/** UHCI I/O registers layout */
     
    8387        /** SOF modification to match external timers */
    8488        ioport8_t sofmod;
     89
     90        PADD8[3];
     91        ioport16_t ports[];
    8592} uhci_regs_t;
    8693
    8794#define UHCI_FRAME_LIST_COUNT 1024
    88 #define UHCI_INT_EMULATOR_TIMEOUT 10000
    8995#define UHCI_DEBUGER_TIMEOUT 5000000
    9096#define UHCI_ALLOWED_HW_FAIL 5
    91 #define UHCI_NEEDED_IRQ_COMMANDS 5
    9297
    9398/** Main UHCI driver structure */
    9499typedef struct hc {
    95         /** Generic HCD driver structure */
    96         hcd_t *generic;
    97 
     100        uhci_rh_t rh;
    98101        /** Addresses of I/O registers */
    99102        uhci_regs_t *registers;
     
    113116        /** Pointer table to the above lists, helps during scheduling */
    114117        transfer_list_t *transfers[2][4];
    115         /** Fibril periodically checking status register*/
    116         fid_t interrupt_emulator;
    117118        /** Indicator of hw interrupts availability */
    118119        bool hw_interrupts;
     
    122123} hc_t;
    123124
    124 int hc_register_irq_handler(ddf_dev_t *, addr_range_t *, int,
    125     interrupt_handler_t);
    126 int hc_get_irq_code(irq_pio_range_t [], size_t, irq_cmd_t [], size_t,
    127     addr_range_t *);
    128 void hc_interrupt(hc_t *instance, uint16_t status);
    129 int hc_init(hc_t *, ddf_fun_t *, addr_range_t *, bool);
     125int hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interupts);
     126void hc_fini(hc_t *instance);
    130127
    131 /** Safely dispose host controller internal structures
    132  *
    133  * @param[in] instance Host controller structure to use.
    134  */
    135 static inline void hc_fini(hc_t *instance) {} /* TODO: implement*/
     128int uhci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res);
     129
     130void uhci_hc_interrupt(hcd_t *hcd, uint32_t status);
     131int uhci_hc_status(hcd_t *hcd, uint32_t *status);
     132int uhci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch);
     133
    136134#endif
    137135
Note: See TracChangeset for help on using the changeset viewer.