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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-armnommu/] [arch-nexuspci/] [dma.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
/*
2
 * linux/include/asm-arm/arch-ebsa110/dma.h
3
 *
4
 * Architecture DMA routes
5
 *
6
 * Copyright (C) 1997.1998 Russell King
7
 */
8
#ifndef __ASM_ARCH_DMA_H
9
#define __ASM_ARCH_DMA_H
10
 
11
#ifdef KERNEL_ARCH_DMA
12
 
13
static inline void arch_disable_dma (int dmanr)
14
{
15
    printk (dma_str, "arch_disable_dma", dmanr);
16
}
17
 
18
static inline void arch_enable_dma (int dmanr)
19
{
20
    printk (dma_str, "arch_enable_dma", dmanr);
21
}
22
 
23
static inline void arch_set_dma_addr (int dmanr, unsigned int addr)
24
{
25
    printk (dma_str, "arch_set_dma_addr", dmanr);
26
}
27
 
28
static inline void arch_set_dma_count (int dmanr, unsigned int count)
29
{
30
    printk (dma_str, "arch_set_dma_count", dmanr);
31
}
32
 
33
static inline void arch_set_dma_mode (int dmanr, char mode)
34
{
35
    printk (dma_str, "arch_set_dma_mode", dmanr);
36
}
37
 
38
static inline int arch_dma_count (int dmanr)
39
{
40
    printk (dma_str, "arch_dma_count", dmanr);
41
    return 0;
42
}
43
 
44
#endif
45
 
46
/* enable/disable a specific DMA channel */
47
extern void enable_dma(unsigned int dmanr);
48
 
49
static __inline__ void disable_dma(unsigned int dmanr)
50
{
51
    printk (dma_str, "disable_dma", dmanr);
52
}
53
 
54
/* Clear the 'DMA Pointer Flip Flop'.
55
 * Write 0 for LSB/MSB, 1 for MSB/LSB access.
56
 * Use this once to initialize the FF to a known state.
57
 * After that, keep track of it. :-)
58
 * --- In order to do that, the DMA routines below should ---
59
 * --- only be used while interrupts are disabled! ---
60
 */
61
static __inline__ void clear_dma_ff(unsigned int dmanr)
62
{
63
    printk (dma_str, "clear_dma_ff", dmanr);
64
}
65
 
66
/* set mode (above) for a specific DMA channel */
67
extern void set_dma_mode(unsigned int dmanr, char mode);
68
 
69
/* Set only the page register bits of the transfer address.
70
 * This is used for successive transfers when we know the contents of
71
 * the lower 16 bits of the DMA current address register, but a 64k boundary
72
 * may have been crossed.
73
 */
74
static __inline__ void set_dma_page(unsigned int dmanr, char pagenr)
75
{
76
    printk (dma_str, "set_dma_page", dmanr);
77
}
78
 
79
 
80
/* Set transfer address & page bits for specific DMA channel.
81
 * Assumes dma flipflop is clear.
82
 */
83
extern void set_dma_addr(unsigned int dmanr, unsigned int addr);
84
 
85
/* Set transfer size for a specific DMA channel.
86
 */
87
extern void set_dma_count(unsigned int dmanr, unsigned int count);
88
 
89
/* Get DMA residue count. After a DMA transfer, this
90
 * should return zero. Reading this while a DMA transfer is
91
 * still in progress will return unpredictable results.
92
 * If called before the channel has been used, it may return 1.
93
 * Otherwise, it returns the number of _bytes_ left to transfer.
94
 *
95
 * Assumes DMA flip-flop is clear.
96
 */
97
extern int get_dma_residue(unsigned int dmanr);
98
 
99
#endif /* _ASM_ARCH_DMA_H */
100
 

powered by: WebSVN 2.1.0

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