X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-frv%2Fscatterlist.h;h=4bca8a28546c2474e6300d041e117186175dc0ea;hb=e34f87256794b87e7f4a8f1812538be7b7b5214c;hp=2e7143b5a7ad2921109e4bbf1ec3a4ec2d8d1e76;hpb=22fa8d59be28affbecc6ae87abf528aebeebff24;p=linux-2.6-omap-h63xx.git diff --git a/include/asm-frv/scatterlist.h b/include/asm-frv/scatterlist.h index 2e7143b5a7a..4bca8a28546 100644 --- a/include/asm-frv/scatterlist.h +++ b/include/asm-frv/scatterlist.h @@ -31,6 +31,16 @@ struct scatterlist { unsigned int length; }; +/* + * These macros should be used after a pci_map_sg call has been done + * to get bus addresses of each of the SG entries and their lengths. + * You should only work with the number of sg entries pci_map_sg + * returns, or alternatively stop on the first sg_dma_len(sg) which + * is 0. + */ +#define sg_dma_address(sg) ((sg)->dma_address) +#define sg_dma_len(sg) ((sg)->length) + #define ISA_DMA_THRESHOLD (0xffffffffUL) #endif /* !_ASM_SCATTERLIST_H */