Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 98d7550 in mainline for uspace/drv/ohci/hc.h


Ignore:
Timestamp:
2011-05-18T20:18:38Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
7941bd6
Parents:
17fc40c (diff), 030937e (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:

Doxygen and code style fixes, improve error handling in root hub registration

Remove kernel debug output in interrupt handlers accessing memory mapped registers.

File:
1 edited

Legend:

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

    r17fc40c r98d7550  
    5353#define OHCI_NEEDED_IRQ_COMMANDS 5
    5454
     55/** Main OHCI drier structure */
    5556typedef 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 */
    5663        ohci_regs_t *registers;
     64        /** Host controller communication area structure */
    5765        hcca_t *hcca;
    5866
    59         usb_address_t rh_address;
    60         rh_t rh;
    61 
     67        /** Transfer schedules */
    6268        endpoint_list_t lists[4];
     69        /** List of active transfers */
    6370        link_t pending_batches;
    6471
    65         usb_device_keeper_t manager;
    66         usb_endpoint_manager_t ep_manager;
     72        /** Fibril for periodic checks if interrupts can't be used */
    6773        fid_t interrupt_emulator;
     74
     75        /** Guards schedule and endpoint manipulation */
    6876        fibril_mutex_t guard;
    6977
     
    7381        /** Commands that form interrupt code */
    7482        irq_cmd_t interrupt_commands[OHCI_NEEDED_IRQ_COMMANDS];
     83
     84        /** USB hub emulation structure */
     85        rh_t rh;
    7586} hc_t;
    7687
    7788int hc_register_hub(hc_t *instance, ddf_fun_t *hub_fun);
    78 
    7989int hc_init(hc_t *instance, uintptr_t regs, size_t reg_size, bool interrupts);
    80 
    8190void hc_start_hw(hc_t *instance);
    8291
     
    8594 * @param[in] instance Host controller structure to use.
    8695 */
    87 static inline void hc_fini(hc_t *instance) { /* TODO: implement*/ };
     96static inline void hc_fini(hc_t *instance)
     97        { /* TODO: implement*/ };
    8898
    8999int hc_add_endpoint(hc_t *instance, usb_address_t address, usb_endpoint_t ep,
    90100    usb_speed_t speed, usb_transfer_type_t type, usb_direction_t direction,
    91101    size_t max_packet_size, size_t size, unsigned interval);
    92 
    93102int hc_remove_endpoint(hc_t *instance, usb_address_t address,
    94103    usb_endpoint_t endpoint, usb_direction_t direction);
    95 
    96104endpoint_t * hc_get_endpoint(hc_t *instance, usb_address_t address,
    97105    usb_endpoint_t endpoint, usb_direction_t direction, size_t *bw);
    98106
    99107int hc_schedule(hc_t *instance, usb_transfer_batch_t *batch);
    100 
    101108void hc_interrupt(hc_t *instance, uint32_t status);
    102109
     
    107114 */
    108115static inline hc_t * fun_to_hc(ddf_fun_t *fun)
    109         { return (hc_t*)fun->driver_data; }
     116        { return fun->driver_data; }
    110117#endif
    111118/**
Note: See TracChangeset for help on using the changeset viewer.