Ignore:
Timestamp:
2012-02-18T16:47:38Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4449c6c
Parents:
bd5f3b7 (diff), f943dd3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    rbd5f3b7 r00aece0  
    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 *
     
    4652 * @return Physical address if exists, NULL otherwise.
    4753 */
    48 static inline uintptr_t addr_to_phys(void *addr)
     54static inline uintptr_t addr_to_phys(const void *addr)
    4955{
    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.