Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/utils/malloc32.h

    rd394f1b8 re2718e1  
    4141#include <as.h>
    4242
     43/* Generic TDs and EDs require 16byte alignment,
     44 * Isochronous TD require 32byte alignment,
     45 * buffers do not have to be aligned.
     46 */
     47#define OHCI_ALIGN 32
     48
    4349/** Get physical address translation
    4450 *
     
    5056        uintptr_t result;
    5157        int ret = as_get_physical_mapping(addr, &result);
    52 
     58       
    5359        if (ret != EOK)
    5460                return 0;
    55         return (result | ((uintptr_t)addr & 0xfff));
     61       
     62        return result;
    5663}
    5764/*----------------------------------------------------------------------------*/
     
    6269 */
    6370static inline void * malloc32(size_t size)
    64         { return memalign(size, size); }
     71        { return memalign(OHCI_ALIGN, size); }
    6572/*----------------------------------------------------------------------------*/
    6673/** Physical mallocator simulator
     
    6976 */
    7077static inline void free32(void *addr)
    71         { if (addr) free(addr); }
     78        { free(addr); }
    7279#endif
    7380/**
Note: See TracChangeset for help on using the changeset viewer.