|
|
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: #if 1 ! 29: /* For compatibility with other DDK's. */ ! 30: #define DMA_Wrmode 0x48 /* single, read, increment, no auto-init */ ! 31: #define DMA_Rdmode 0x44 /* single, write, increment, no auto-init */ ! 32: ! 33: /* Channels 0-3 are for 8-bit transfers. */ ! 34: #define DMA_CH0 0 ! 35: #define DMA_CH1 1 ! 36: #define DMA_CH2 2 ! 37: #define DMA_CH3 3 ! 38: ! 39: /* Channels 4-7 are for 8-bit transfers. */ ! 40: #define DMA_CH4 4 ! 41: #define DMA_CH5 5 ! 42: #define DMA_CH6 6 ! 43: #define DMA_CH7 7 ! 44: #endif ! 45: ! 46: #ifdef _I386 ! 47: #define DMASEG_SIZE NBPC /* Size of a DMA segment. */ ! 48: #include <sys/param.h> ! 49: /* ! 50: * Identify the dma segment of a physical address. ! 51: */ ! 52: #define dmaseg(p) ((p) & ~(NBPC-1)) ! 53: #else ! 54: #define dmaseg(p) ((p)&0xF0000L) ! 55: #endif ! 56: ! 57: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.