Ignore:
Timestamp:
2018-02-01T21:13:23Z (6 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
64ce0c1
Parents:
3e6ff9a
git-author:
Ondřej Hlavatý <aearsis@…> (2018-02-01 21:13:22)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-02-01 21:13:23)
Message:

ohci: use dma memory responsibly

Instead of leaving arbitrary TD behind to be used by next transfer,
prepare two of them in endpoint and use them in a cyclic manner. This
reduces the number of pages allocated per transfer to one.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.h

    r3e6ff9a re67c50a  
    165165
    166166/**
     167 * Set the HeadP of ED. Do not call unless the ED is Halted.
     168 * @param instance ED
     169 */
     170static inline void ed_set_head_td(ed_t *instance, const td_t *td)
     171{
     172        assert(instance);
     173        const uintptr_t pa = addr_to_phys(td);
     174        OHCI_MEM32_WR(instance->td_head, pa & ED_TDHEAD_PTR_MASK);
     175}
     176
     177/**
    167178 * Set next ED in ED chain.
    168179 * @param instance ED to modify
Note: See TracChangeset for help on using the changeset viewer.