Changeset 26e7d6d in mainline for uspace/drv/bus/usb/uhci/hc.h


Ignore:
Timestamp:
2011-09-19T16:31:00Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a347a11
Parents:
3842a955 (diff), 086290d (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 mainline changes

File:
1 moved

Legend:

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

    r3842a955 r26e7d6d  
    3939#include <ddi.h>
    4040
    41 #include <usb/host/device_keeper.h>
    42 #include <usb/host/usb_endpoint_manager.h>
    43 #include <usb/host/batch.h>
     41#include <usb/host/hcd.h>
    4442
    4543#include "transfer_list.h"
     
    8482        /** SOF modification to match external timers */
    8583        uint8_t sofmod;
    86 } regs_t;
     84} uhci_regs_t;
    8785
    8886#define UHCI_FRAME_LIST_COUNT 1024
     
    9492/** Main UHCI driver structure */
    9593typedef struct hc {
    96         /** USB bus driver, devices and addresses */
    97         usb_device_keeper_t manager;
    98         /** USB bus driver, endpoints */
    99         usb_endpoint_manager_t ep_manager;
     94        /** Generic HCD driver structure */
     95        hcd_t generic;
    10096
    10197        /** Addresses of I/O registers */
    102         regs_t *registers;
     98        uhci_regs_t *registers;
    10399
    104100        /** Frame List contains 1024 link pointers */
     
    116112        /** Pointer table to the above lists, helps during scheduling */
    117113        transfer_list_t *transfers[2][4];
    118 
    119         /** Code to be executed in kernel interrupt handler */
    120         irq_code_t interrupt_code;
    121 
    122         /** Commands that form interrupt code */
    123         irq_cmd_t interrupt_commands[UHCI_NEEDED_IRQ_COMMANDS];
    124 
    125114        /** Fibril periodically checking status register*/
    126115        fid_t interrupt_emulator;
    127 
    128116        /** Indicator of hw interrupts availability */
    129117        bool hw_interrupts;
     
    133121} hc_t;
    134122
     123size_t hc_irq_cmd_count(void);
     124int hc_get_irq_commands(
     125    irq_cmd_t cmds[], size_t cmd_size, uintptr_t regs, size_t reg_size);
     126void hc_interrupt(hc_t *instance, uint16_t status);
    135127int hc_init(hc_t *instance, void *regs, size_t reg_size, bool interupts);
    136 
    137 int hc_schedule(hc_t *instance, usb_transfer_batch_t *batch);
    138 
    139 void hc_interrupt(hc_t *instance, uint16_t status);
    140128
    141129/** Safely dispose host controller internal structures
     
    143131 * @param[in] instance Host controller structure to use.
    144132 */
    145 static inline void hc_fini(hc_t *instance) { /* TODO: implement*/ };
    146 
    147 /** Get and cast pointer to the driver data
    148  *
    149  * @param[in] fun DDF function pointer
    150  * @return cast pointer to driver_data
    151  */
    152 static inline hc_t * fun_to_hc(ddf_fun_t *fun)
    153 {
    154         assert(fun);
    155         return fun->driver_data;
    156 }
     133static inline void hc_fini(hc_t *instance) {} /* TODO: implement*/
    157134#endif
    158135/**
Note: See TracChangeset for help on using the changeset viewer.