Changes in uspace/drv/ohci/hc.h [02cacce:62265ce] in mainline


Ignore:
File:
1 edited

Legend:

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

    r02cacce r62265ce  
    5353#define OHCI_NEEDED_IRQ_COMMANDS 5
    5454
    55 /** Main OHCI drier structure */
    5655typedef struct hc {
    57         /** USB bus driver, devices and addresses */
    58         usb_device_keeper_t manager;
    59         /** USB bus driver, endpoints */
    60         usb_endpoint_manager_t ep_manager;
    61 
    62         /** Memory mapped I/O registers area */
    6356        ohci_regs_t *registers;
    64         /** Host controller communication area structure */
    6557        hcca_t *hcca;
    6658
    67         /** Transfer schedules */
     59        usb_address_t rh_address;
     60        rh_t rh;
     61
    6862        endpoint_list_t lists[4];
    69         /** List of active transfers */
    7063        link_t pending_batches;
    7164
    72         /** Fibril for periodic checks if interrupts can't be used */
     65        usb_device_keeper_t manager;
     66        usb_endpoint_manager_t ep_manager;
    7367        fid_t interrupt_emulator;
    74 
    75         /** Guards schedule and endpoint manipulation */
    7668        fibril_mutex_t guard;
    7769
     
    8173        /** Commands that form interrupt code */
    8274        irq_cmd_t interrupt_commands[OHCI_NEEDED_IRQ_COMMANDS];
    83 
    84         /** USB hub emulation structure */
    85         rh_t rh;
    8675} hc_t;
    8776
    8877int hc_register_hub(hc_t *instance, ddf_fun_t *hub_fun);
     78
    8979int hc_init(hc_t *instance, uintptr_t regs, size_t reg_size, bool interrupts);
     80
    9081void hc_start_hw(hc_t *instance);
    9182
     
    9485 * @param[in] instance Host controller structure to use.
    9586 */
    96 static inline void hc_fini(hc_t *instance)
    97         { /* TODO: implement*/ };
     87static inline void hc_fini(hc_t *instance) { /* TODO: implement*/ };
    9888
    9989int hc_add_endpoint(hc_t *instance, usb_address_t address, usb_endpoint_t ep,
    10090    usb_speed_t speed, usb_transfer_type_t type, usb_direction_t direction,
    10191    size_t max_packet_size, size_t size, unsigned interval);
     92
    10293int hc_remove_endpoint(hc_t *instance, usb_address_t address,
    10394    usb_endpoint_t endpoint, usb_direction_t direction);
     95
    10496endpoint_t * hc_get_endpoint(hc_t *instance, usb_address_t address,
    10597    usb_endpoint_t endpoint, usb_direction_t direction, size_t *bw);
    10698
    10799int hc_schedule(hc_t *instance, usb_transfer_batch_t *batch);
     100
    108101void hc_interrupt(hc_t *instance, uint32_t status);
    109102
     
    114107 */
    115108static inline hc_t * fun_to_hc(ddf_fun_t *fun)
    116         { return fun->driver_data; }
     109        { return (hc_t*)fun->driver_data; }
    117110#endif
    118111/**
Note: See TracChangeset for help on using the changeset viewer.