memory.h 904 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
  3. */
  4. /*
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. */
  9. #ifndef __ASM_ARCH_MXC_MEMORY_H__
  10. #define __ASM_ARCH_MXC_MEMORY_H__
  11. #include <asm/hardware.h>
  12. /*!
  13. * @file memory.h
  14. * @brief This file contains macros needed by the Linux kernel and drivers.
  15. *
  16. * @ingroup Memory
  17. */
  18. /*!
  19. * Virtual view <-> DMA view memory address translations
  20. * This macro is used to translate the virtual address to an address
  21. * suitable to be passed to set_dma_addr()
  22. */
  23. #define __virt_to_bus(a) __virt_to_phys(a)
  24. /*!
  25. * Used to convert an address for DMA operations to an address that the
  26. * kernel can use.
  27. */
  28. #define __bus_to_virt(a) __phys_to_virt(a)
  29. #endif /* __ASM_ARCH_MXC_MEMORY_H__ */