|
|
1.1 root 1: /* (-lgl
2: * COHERENT 386 Device Driver Kit release 2.0
3: * Copyright (c) 1982, 1992 by Mark Williams Company.
4: * All rights reserved. May not be copied without permission.
5: -lgl) */
6:
7: /*
8: * /usr/include/sys/dmac.h
9: *
10: * Constants for the 8237 DMA controller.
11: *
12: * Revised: Mon May 24 18:10:51 1993 CDT
13: */
14: #ifndef __SYS_DMAC_H__
15: #define __SYS_DMAC_H__
16:
17: #define DMA 0x00 /* Primary 8237 base port */
18: #define SDMA 0xC0 /* Secondary 8237 base port */
19: #define DMAPAGE 0x80 /* DMA page registers */
20: #define CLEARFL 0x0C /* Clear F/L offset */
21: #define SETMASK 0x0A /* Set DMA mask offset */
22: #define SETMODE 0x0B /* Set DMA mode offset */
23: #define RDMEM 0x48 /* Mode, read memory */
24: #define WRMEM 0x44 /* Mode, write memory */
25: #define MASKOFF 0x00 /* Mask bit off */
26: #define MASKON 0x04 /* Mask bit on */
27:
28: /* For compatibility with other DDK's. */
29: #define DMA_Wrmode 0x48 /* single, read, increment, no auto-init */
30: #define DMA_Rdmode 0x44 /* single, write, increment, no auto-init */
31:
32: /* Channels 0-3 are for 8-bit transfers. */
33: #define DMA_CH0 0
34: #define DMA_CH1 1
35: #define DMA_CH2 2
36: #define DMA_CH3 3
37:
38: /* Channels 4-7 are for 8-bit transfers. */
39: #define DMA_CH4 4
40: #define DMA_CH5 5
41: #define DMA_CH6 6
42: #define DMA_CH7 7
43:
44: #if _I386
45:
46: #define DMASEG_SIZE NBPC /* Size of a DMA segment. */
47: #include <kernel/param.h>
48: /*
49: * Identify the dma segment of a physical address.
50: */
51: #define dmaseg(p) ((p) & ~(NBPC-1))
52: #else
53: #define dmaseg(p) ((p)&0xF0000L)
54: #endif
55:
56: #endif /* ! defined (__SYS_DMAC_H__) */
57:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.