scatterlist.h 984 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * include/asm-xtensa/scatterlist.h
  3. *
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. *
  8. * Copyright (C) 2001 - 2005 Tensilica Inc.
  9. */
  10. #ifndef _XTENSA_SCATTERLIST_H
  11. #define _XTENSA_SCATTERLIST_H
  12. #include <asm/types.h>
  13. struct scatterlist {
  14. #ifdef CONFIG_DEBUG_SG
  15. unsigned long sg_magic;
  16. #endif
  17. unsigned long page_link;
  18. unsigned int offset;
  19. dma_addr_t dma_address;
  20. unsigned int length;
  21. };
  22. /*
  23. * These macros should be used after a pci_map_sg call has been done
  24. * to get bus addresses of each of the SG entries and their lengths.
  25. * You should only work with the number of sg entries pci_map_sg
  26. * returns, or alternatively stop on the first sg_dma_len(sg) which
  27. * is 0.
  28. */
  29. #define sg_dma_address(sg) ((sg)->dma_address)
  30. #define sg_dma_len(sg) ((sg)->length)
  31. #define ISA_DMA_THRESHOLD (~0UL)
  32. #endif /* _XTENSA_SCATTERLIST_H */