blob: 10942840e88fcb030a3f3216930b6aa5c8b3d6c9 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _M68KNOMMU_SCATTERLIST_H
2#define _M68KNOMMU_SCATTERLIST_H
3
Greg Ungerer7cf27cb2005-09-13 11:14:08 +10004#include <linux/mm.h>
Jean Delvarea9dfd282007-03-06 02:45:12 -08005#include <asm/types.h>
Greg Ungerer7cf27cb2005-09-13 11:14:08 +10006
Linus Torvalds1da177e2005-04-16 15:20:36 -07007struct scatterlist {
Jens Axboed6ec0842007-10-22 20:01:06 +02008#ifdef CONFIG_DEBUG_SG
9 unsigned long sg_magic;
10#endif
Jens Axboe18dabf42007-10-22 19:57:20 +020011 unsigned long page_link;
Linus Torvalds1da177e2005-04-16 15:20:36 -070012 unsigned int offset;
13 dma_addr_t dma_address;
14 unsigned int length;
15};
16
Greg Ungererf75e3b12006-12-04 17:28:03 +100017#define sg_address(sg) (page_address((sg)->page) + (sg)->offset)
Greg Ungerer7cf27cb2005-09-13 11:14:08 +100018#define sg_dma_address(sg) ((sg)->dma_address)
19#define sg_dma_len(sg) ((sg)->length)
20
Linus Torvalds1da177e2005-04-16 15:20:36 -070021#define ISA_DMA_THRESHOLD (0xffffffff)
22
23#endif /* !(_M68KNOMMU_SCATTERLIST_H) */