cbus_dma.c (146049) | cbus_dma.c (146214) |
---|---|
1/*- 2 * Copyright (c) 1991 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * William Jolitz. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 19 unchanged lines hidden (view full) --- 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 33 */ 34 35#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1991 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * William Jolitz. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 19 unchanged lines hidden (view full) --- 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 33 */ 34 35#include <sys/cdefs.h> |
36__FBSDID("$FreeBSD: head/sys/pc98/cbus/cbus_dma.c 146049 2005-05-10 12:02:18Z nyan $"); | 36__FBSDID("$FreeBSD: head/sys/pc98/cbus/cbus_dma.c 146214 2005-05-14 10:14:56Z nyan $"); |
37 38/* 39 * code to manage AT bus 40 * 41 * 92/08/18 Frank P. MacLachlan (fpm@crash.cts.com): 42 * Fixed uninitialized variable problem and added code to deal 43 * with DMA page boundaries in isa_dmarangecheck(). Fixed word 44 * mode DMA count compution and reorganized DMA setup code in --- 10 unchanged lines hidden (view full) --- 55#include <sys/lock.h> 56#include <sys/proc.h> 57#include <sys/mutex.h> 58#include <sys/module.h> 59#include <machine/md_var.h> 60#include <vm/vm.h> 61#include <vm/vm_param.h> 62#include <vm/pmap.h> | 37 38/* 39 * code to manage AT bus 40 * 41 * 92/08/18 Frank P. MacLachlan (fpm@crash.cts.com): 42 * Fixed uninitialized variable problem and added code to deal 43 * with DMA page boundaries in isa_dmarangecheck(). Fixed word 44 * mode DMA count compution and reorganized DMA setup code in --- 10 unchanged lines hidden (view full) --- 55#include <sys/lock.h> 56#include <sys/proc.h> 57#include <sys/mutex.h> 58#include <sys/module.h> 59#include <machine/md_var.h> 60#include <vm/vm.h> 61#include <vm/vm_param.h> 62#include <vm/pmap.h> |
63#include <dev/ic/i8237.h> | |
64#include <isa/isavar.h> 65#include <pc98/cbus/cbus.h> | 63#include <isa/isavar.h> 64#include <pc98/cbus/cbus.h> |
65#include <pc98/cbus/cbus_dmareg.h> |
|
66 | 66 |
67/* 68** Register definitions for DMA controller 1 (channels 0..3): 69*/ 70#define DMA1_CHN(c) (IO_DMA + (4*(c))) /* addr reg for channel c */ 71#define DMA1_STATUS (IO_DMA + 0x10) /* status register */ 72#define DMA1_SMSK (IO_DMA + 0x14) /* single mask register */ 73#define DMA1_MODE (IO_DMA + 0x16) /* mode register */ 74#define DMA1_FFC (IO_DMA + 0x18) /* clear first/last FF */ 75 | |
76static int isa_dmarangecheck(caddr_t va, u_int length, int chan); 77 78static caddr_t dma_bouncebuf[4]; 79static u_int dma_bouncebufsize[4]; 80static u_int8_t dma_bounced = 0; 81static u_int8_t dma_busy = 0; /* Used in isa_dmastart() */ 82static u_int8_t dma_inuse = 0; /* User for acquire/release */ 83static u_int8_t dma_auto_mode = 0; --- 414 unchanged lines hidden --- | 67static int isa_dmarangecheck(caddr_t va, u_int length, int chan); 68 69static caddr_t dma_bouncebuf[4]; 70static u_int dma_bouncebufsize[4]; 71static u_int8_t dma_bounced = 0; 72static u_int8_t dma_busy = 0; /* Used in isa_dmastart() */ 73static u_int8_t dma_inuse = 0; /* User for acquire/release */ 74static u_int8_t dma_auto_mode = 0; --- 414 unchanged lines hidden --- |