Changeset 70d72dd in mainline for uspace/drv/bus/usb/ohci/ohci_batch.c


Ignore:
Timestamp:
2011-10-16T14:24:05Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d5abaf4
Parents:
9515f674
Message:

ohci: OHCI TD routines refactoring.

Merge td_set_next to td_init: td list is built during initialization.
Add doxygen and other comments.
Add ed_inactive and ed_transfer_pending routines, these will be used later.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/ohci_batch.c

    r9515f674 r70d72dd  
    248248
    249249        /* setup stage */
    250         td_init(ohci_batch->tds[0], USB_DIRECTION_BOTH, buffer,
    251                 ohci_batch->usb_batch->setup_size, toggle);
    252         td_set_next(ohci_batch->tds[0], ohci_batch->tds[1]);
     250        td_init(
     251            ohci_batch->tds[0], ohci_batch->tds[1], USB_DIRECTION_BOTH,
     252            buffer, ohci_batch->usb_batch->setup_size, toggle);
    253253        usb_log_debug("Created CONTROL SETUP TD: %08x:%08x:%08x:%08x.\n",
    254254            ohci_batch->tds[0]->status, ohci_batch->tds[0]->cbp,
     
    265265                toggle = 1 - toggle;
    266266
    267                 td_init(ohci_batch->tds[td_current], data_dir, buffer,
    268                     transfer_size, toggle);
    269                 td_set_next(ohci_batch->tds[td_current],
    270                     ohci_batch->tds[td_current + 1]);
     267                td_init(ohci_batch->tds[td_current],
     268                    ohci_batch->tds[td_current + 1],
     269                    data_dir, buffer, transfer_size, toggle);
    271270                usb_log_debug("Created CONTROL DATA TD: %08x:%08x:%08x:%08x.\n",
    272271                    ohci_batch->tds[td_current]->status,
     
    283282        /* status stage */
    284283        assert(td_current == ohci_batch->td_count - 1);
    285         td_init(ohci_batch->tds[td_current], status_dir, NULL, 0, 1);
    286         td_set_next(ohci_batch->tds[td_current],
    287             ohci_batch->tds[td_current + 1]);
     284        td_init(ohci_batch->tds[td_current], ohci_batch->tds[td_current + 1],
     285            status_dir, NULL, 0, 1);
    288286        usb_log_debug("Created CONTROL STATUS TD: %08x:%08x:%08x:%08x.\n",
    289287            ohci_batch->tds[td_current]->status,
     
    323321                    ? OHCI_TD_MAX_TRANSFER : remain_size;
    324322
    325                 td_init(ohci_batch->tds[td_current], dir, buffer,
    326                     transfer_size, -1);
    327                 td_set_next(ohci_batch->tds[td_current],
    328                     ohci_batch->tds[td_current + 1]);
     323                td_init(
     324                    ohci_batch->tds[td_current], ohci_batch->tds[td_current + 1],
     325                    dir, buffer, transfer_size, -1);
    329326
    330327                usb_log_debug("Created DATA TD: %08x:%08x:%08x:%08x.\n",
Note: See TracChangeset for help on using the changeset viewer.