Changeset 423e8c81 in mainline for uspace/drv/uhci-hcd/uhci.h


Ignore:
Timestamp:
2011-02-19T23:41:38Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
063ead6f, 41e645c, 62066b4
Parents:
374552ef (diff), fb78ae72 (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:

Use hardware interrupts instead of polling

NOTE: hw interrupt enabling is implemented in pciintel driver,
it's probably not done ddf-way, but it works and can be used by other drivers too.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci-hcd/uhci.h

    r374552ef r423e8c81  
    6666
    6767        uint16_t usbintr;
     68#define UHCI_INTR_SHORT_PACKET (1 << 3)
     69#define UHCI_INTR_COMPLETE (1 << 2)
     70#define UHCI_INTR_RESUME (1 << 1)
     71#define UHCI_INTR_CRC (1 << 0)
     72
    6873        uint16_t frnum;
    6974        uint32_t flbaseadd;
     
    8186        link_pointer_t *frame_list;
    8287
    83         link_t batch_list;
    84         fibril_mutex_t batch_list_mutex;
    85 
    8688        transfer_list_t transfers_bulk_full;
    8789        transfer_list_t transfers_control_full;
     
    9092
    9193        transfer_list_t *transfers[2][4];
     94
     95        irq_code_t interrupt_code;
    9296
    9397        fid_t cleaner;
     
    98102int uhci_init(uhci_t *instance, void *regs, size_t reg_size);
    99103
    100 int uhci_fini(uhci_t *device);
    101 
    102 int uhci_transfer(
    103   uhci_t *instance,
    104   device_t *dev,
    105   usb_target_t target,
    106   usb_transfer_type_t transfer_type,
    107         bool toggle,
    108   usb_packet_id pid,
    109         bool low_speed,
    110   void *buffer, size_t size,
    111   usbhc_iface_transfer_out_callback_t callback_out,
    112   usbhc_iface_transfer_in_callback_t callback_in,
    113   void *arg );
     104static inline void uhci_fini(uhci_t *instance) {};
    114105
    115106int uhci_schedule(uhci_t *instance, batch_t *batch);
    116107
     108void uhci_interrupt(uhci_t *instance, uint16_t status);
     109
    117110static inline uhci_t * dev_to_uhci(device_t *dev)
    118111        { return (uhci_t*)dev->driver_data; }
     112
    119113
    120114#endif
Note: See TracChangeset for help on using the changeset viewer.