scatterlist.h 900 B

12345678910111213141516171819202122232425262728293031323334
  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. struct scatterlist {
  13. struct page *page;
  14. unsigned int offset;
  15. dma_addr_t dma_address;
  16. unsigned int length;
  17. };
  18. /*
  19. * These macros should be used after a pci_map_sg call has been done
  20. * to get bus addresses of each of the SG entries and their lengths.
  21. * You should only work with the number of sg entries pci_map_sg
  22. * returns, or alternatively stop on the first sg_dma_len(sg) which
  23. * is 0.
  24. */
  25. #define sg_dma_address(sg) ((sg)->dma_address)
  26. #define sg_dma_len(sg) ((sg)->length)
  27. #define ISA_DMA_THRESHOLD (~0UL)
  28. #endif /* _XTENSA_SCATTERLIST_H */