dma-mapping.h 566 B

12345678910111213141516171819202122
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2013 Andes Technology Corporation
  4. * Ken Kuo, Andes Technology Corporation <ken_kuo@andestech.com>
  5. */
  6. #ifndef __ASM_NDS_DMA_MAPPING_H
  7. #define __ASM_NDS_DMA_MAPPING_H
  8. #include <common.h>
  9. #include <asm/cache.h>
  10. #include <cpu_func.h>
  11. #include <linux/dma-direction.h>
  12. #include <linux/types.h>
  13. #include <malloc.h>
  14. static void *dma_alloc_coherent(size_t len, unsigned long *handle)
  15. {
  16. *handle = (unsigned long)memalign(ARCH_DMA_MINALIGN, len);
  17. return (void *)*handle;
  18. }
  19. #endif /* __ASM_NDS_DMA_MAPPING_H */