Changeset 1d758fc in mainline for uspace/lib/drv/include/usbhc_iface.h


Ignore:
Timestamp:
2018-02-12T10:11:47Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5fe3f954
Parents:
2f762a7
git-author:
Ondřej Hlavatý <aearsis@…> (2018-02-05 03:28:50)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-02-12 10:11:47)
Message:

usb: rethinking DMA buffers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/include/usbhc_iface.h

    r2f762a7 r1d758fc  
    104104
    105105// FIXME: DMA buffers shall be part of libdrv anyway.
    106 typedef unsigned dma_policy_t;
     106typedef uintptr_t dma_policy_t;
     107
     108typedef struct dma_buffer {
     109        void *virt;
     110        dma_policy_t policy;
     111} dma_buffer_t;
    107112
    108113typedef struct usb_pipe_desc {
     
    134139
    135140        /**
    136          * Base address of the buffer to share. Must be at least offset + size
    137          * large. Is patched after being transmitted over IPC, so the pointer is
    138          * still valid.
    139          *
    140          * Note that offset might be actually more than PAGE_SIZE.
     141         * The DMA buffer to share. Must be at least offset + size large. Is
     142         * patched after being transmitted over IPC, so the pointer is still
     143         * valid.
    141144         */
    142         void *base;
     145        dma_buffer_t buffer;
    143146        size_t offset;                  /**< Offset to the buffer */
    144147        size_t size;                    /**< Requested size. */
    145         dma_policy_t buffer_policy;     /**< Properties of the buffer. */
    146148} usbhc_iface_transfer_request_t;
    147149
Note: See TracChangeset for help on using the changeset viewer.