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

Changeset cc7575c in mainline


Ignore:
Timestamp:
2014-01-25T17:10:00Z (8 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
49dc984
Parents:
21f36e04
Message:

ehci: add IOC option to td initialization

Location:
uspace/drv/bus/usb/ehci
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ehci/ehci_batch.c

    r21f36e04 rcc7575c  
    284284        td_init(
    285285            ehci_batch->tds[0], ehci_batch->tds[1], USB_DIRECTION_BOTH,
    286             buffer, ehci_batch->usb_batch->setup_size, toggle);
     286            buffer, ehci_batch->usb_batch->setup_size, toggle, false);
    287287        usb_log_debug("Created CONTROL SETUP TD: %08x:%08x:%08x",
    288288            ehci_batch->tds[0]->status, ehci_batch->tds[0]->next,
     
    299299
    300300                td_init(ehci_batch->tds[td_current],
    301                     ehci_batch->tds[td_current + 1],
    302                     data_dir, buffer, transfer_size, toggle);
     301                    ehci_batch->tds[td_current + 1], data_dir, buffer,
     302                    transfer_size, toggle, false);
    303303                usb_log_debug("Created CONTROL DATA TD: %08x:%08x:%08x",
    304304                    ehci_batch->tds[td_current]->status,
     
    315315        assert(td_current == ehci_batch->td_count - 1);
    316316        td_init(ehci_batch->tds[td_current], ehci_batch->tds[td_current + 1],
    317             status_dir, NULL, 0, 1);
     317            status_dir, NULL, 0, 1, true);
    318318        usb_log_debug("Created CONTROL STATUS TD: %08x:%08x:%08x",
    319319            ehci_batch->tds[td_current]->status,
     
    357357                td_init(
    358358                    ehci_batch->tds[td_current], ehci_batch->tds[td_current + 1],
    359                     dir, buffer, transfer_size, -1);
     359                    dir, buffer, transfer_size, -1, remain_size == transfer_size);
    360360
    361361                usb_log_debug("Created DATA TD: %08x:%08x:%08x",
  • uspace/drv/bus/usb/ehci/hw_struct/transfer_descriptor.c

    r21f36e04 rcc7575c  
    8181 */
    8282void td_init(td_t *instance, const td_t *next,
    83     usb_direction_t direction, const void *buffer, size_t size, int toggle)
     83    usb_direction_t direction, const void *buffer, size_t size, int toggle,
     84    bool ioc)
    8485{
    8586        assert(instance);
     
    8990        EHCI_MEM32_WR(instance->status,
    9091            ((dir[direction] & TD_STATUS_PID_MASK) << TD_STATUS_PID_SHIFT) |
    91             ((size & TD_STATUS_TOTAL_MASK) << TD_STATUS_TOTAL_SHIFT));
     92            ((size & TD_STATUS_TOTAL_MASK) << TD_STATUS_TOTAL_SHIFT) |
     93            (ioc ? TD_STATUS_IOC_FLAG : 0) );
    9294
    9395        if (toggle == 0 || toggle == 1) {
  • uspace/drv/bus/usb/ehci/hw_struct/transfer_descriptor.h

    r21f36e04 rcc7575c  
    9090
    9191void td_init(td_t *td, const td_t *next, usb_direction_t dir, const void * buf,
    92     size_t buf_size, int toggle);
     92    size_t buf_size, int toggle, bool ioc);
    9393
    9494#endif
Note: See TracChangeset for help on using the changeset viewer.