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/drv/bus/usb/ehci/hw_struct/transfer_descriptor.h

    rb60944b r35c37fc  
    3737#include <stddef.h>
    3838#include <stdint.h>
     39#include <macros.h>
    3940#include "link_pointer.h"
    4041#include "mem_access.h"
     
    7576        /* 64 bit struct only */
    7677        volatile uint32_t extended_bp[5];
    77 } td_t;
     78
     79        /* TDs must be 32-byte aligned */
     80        PADD32 [3];
     81
     82} __attribute__((packed)) td_t;
     83
     84static_assert(sizeof(td_t) % 32 == 0);
    7885
    7986static inline bool td_active(const td_t *td)
     
    9299int td_error(const td_t *td);
    93100
    94 void td_init(td_t *td, const td_t *next, usb_direction_t dir, const void * buf,
     101void td_init(td_t *td, uintptr_t next_phys, uintptr_t buf, usb_direction_t dir,
    95102    size_t buf_size, int toggle, bool ioc);
    96103
Note: See TracChangeset for help on using the changeset viewer.