Changeset 35c37fc in mainline for uspace/lib/usbhost/src/dma_buffer.c


Ignore:
Timestamp:
2018-01-05T20:15:08Z (6 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9e5b162
Parents:
b60944b
git-author:
Ondřej Hlavatý <aearsis@…> (2018-01-05 16:11:04)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-01-05 20:15:08)
Message:

ehci: refactor to dma_buffers

One big hidden thing was refactored - now TDs are allocated in one
buffer together with setup and data buffers themselves. This reduces the
number of allocated pages per transfer to minimum.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/src/dma_buffer.c

    rb60944b r35c37fc  
    105105}
    106106
     107/** Convert a pointer inside a buffer to physical address.
     108 *
     109 * @param[in] db Buffer at which virt is pointing
     110 * @param[in] virt Pointer somewhere inside db
     111 */
     112uintptr_t dma_buffer_phys(const dma_buffer_t *db, void *virt)
     113{
     114        return db->phys + (virt - db->virt);
     115}
     116
    107117/**
    108118 * @}
Note: See TracChangeset for help on using the changeset viewer.