OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-ppc/] [scatterlist.h] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1276 phoenix
#ifdef __KERNEL__
2
#ifndef _PPC_SCATTERLIST_H
3
#define _PPC_SCATTERLIST_H
4
 
5
#include <asm/dma.h>
6
 
7
struct scatterlist {
8
        char *address;          /* Location data is to be transferred to,
9
                                 * or NULL for highmem page */
10
        struct page * page;     /* Location for highmem page, if any */
11
        unsigned int offset;    /* for highmem, page offset */
12
        unsigned int length;    /* length at address or page+offset */
13
 
14
        dma_addr_t dma_address; /* phys/bus dma address */
15
        unsigned int dma_length; /* number of bytes mapped at dma_address */
16
        /* Note that if we coalesce multiple scatterlist elements,
17
           dma_length can be different from length */
18
};
19
 
20
/*
21
 * These macros should be used after a pci_map_sg call has been done
22
 * to get bus addresses of each of the SG entries and their lengths.
23
 * You should only work with the number of sg entries pci_map_sg
24
 * returns, or alternatively stop on the first sg_dma_len(sg) which
25
 * is 0.
26
 */
27
#define sg_dma_address(sg)      ((sg)->dma_address)
28
#define sg_dma_len(sg)          ((sg)->dma_length)
29
 
30
#endif /* !(_PPC_SCATTERLIST_H) */
31
#endif /* __KERNEL__ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.