dma-octeon.c 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 2000 Ani Joshi <ajoshi@unixbox.com>
  7. * Copyright (C) 2000, 2001 Ralf Baechle <ralf@gnu.org>
  8. * Copyright (C) 2005 Ilya A. Volynets-Evenbakh <ilya@total-knowledge.com>
  9. * swiped from i386, and cloned for MIPS by Geert, polished by Ralf.
  10. * IP32 changes by Ilya.
  11. * Cavium Networks: Create new dma setup for Cavium Networks Octeon based on
  12. * the kernels original.
  13. */
  14. #include <linux/types.h>
  15. #include <linux/mm.h>
  16. #include <dma-coherence.h>
  17. dma_addr_t octeon_map_dma_mem(struct device *dev, void *ptr, size_t size)
  18. {
  19. /* Without PCI/PCIe this function can be called for Octeon internal
  20. devices such as USB. These devices all support 64bit addressing */
  21. mb();
  22. return virt_to_phys(ptr);
  23. }
  24. void octeon_unmap_dma_mem(struct device *dev, dma_addr_t dma_addr)
  25. {
  26. /* Without PCI/PCIe this function can be called for Octeon internal
  27. * devices such as USB. These devices all support 64bit addressing */
  28. return;
  29. }