|  | @@ -0,0 +1,55 @@
 | 
	
		
			
				|  |  | +/*
 | 
	
		
			
				|  |  | + * include/asm-alpha/dma.h
 | 
	
		
			
				|  |  | + *
 | 
	
		
			
				|  |  | + * This is essentially the same as the i386 DMA stuff, as the AlphaPCs
 | 
	
		
			
				|  |  | + * use ISA-compatible dma.  The only extension is support for high-page
 | 
	
		
			
				|  |  | + * registers that allow to set the top 8 bits of a 32-bit DMA address.
 | 
	
		
			
				|  |  | + * This register should be written last when setting up a DMA address
 | 
	
		
			
				|  |  | + * as this will also enable DMA across 64 KB boundaries.
 | 
	
		
			
				|  |  | + */
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/* $Id: dma.h,v 1.7 1992/12/14 00:29:34 root Exp root $
 | 
	
		
			
				|  |  | + * linux/include/asm/dma.h: Defines for using and allocating dma channels.
 | 
	
		
			
				|  |  | + * Written by Hennus Bergman, 1992.
 | 
	
		
			
				|  |  | + * High DMA channel support & info by Hannu Savolainen
 | 
	
		
			
				|  |  | + * and John Boyd, Nov. 1992.
 | 
	
		
			
				|  |  | + */
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#ifndef _ASM_DMA_H
 | 
	
		
			
				|  |  | +#define _ASM_DMA_H
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#include <linux/spinlock.h>
 | 
	
		
			
				|  |  | +#include <asm/io.h>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#define dma_outb	outb
 | 
	
		
			
				|  |  | +#define dma_inb		inb
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/*
 | 
	
		
			
				|  |  | + * NOTES about DMA transfers:
 | 
	
		
			
				|  |  | + *
 | 
	
		
			
				|  |  | + *  controller 1: channels 0-3, byte operations, ports 00-1F
 | 
	
		
			
				|  |  | + *  controller 2: channels 4-7, word operations, ports C0-DF
 | 
	
		
			
				|  |  | + *
 | 
	
		
			
				|  |  | + *  - ALL registers are 8 bits only, regardless of transfer size
 | 
	
		
			
				|  |  | + *  - channel 4 is not used - cascades 1 into 2.
 | 
	
		
			
				|  |  | + *  - channels 0-3 are byte - addresses/counts are for physical bytes
 | 
	
		
			
				|  |  | + *  - channels 5-7 are word - addresses/counts are for physical words
 | 
	
		
			
				|  |  | + *  - transfers must not cross physical 64K (0-3) or 128K (5-7) boundaries
 | 
	
		
			
				|  |  | + *  - transfer count loaded to registers is 1 less than actual count
 | 
	
		
			
				|  |  | + *  - controller 2 offsets are all even (2x offsets for controller 1)
 | 
	
		
			
				|  |  | + *  - page registers for 5-7 don't use data bit 0, represent 128K pages
 | 
	
		
			
				|  |  | + *  - page registers for 0-3 use bit 0, represent 64K pages
 | 
	
		
			
				|  |  | + *
 | 
	
		
			
				|  |  | + * DMA transfers are limited to the lower 16MB of _physical_ memory.  
 | 
	
		
			
				|  |  | + * Note that addresses loaded into registers must be _physical_ addresses,
 | 
	
		
			
				|  |  | + * not logical addresses (which may differ if paging is active).
 | 
	
		
			
				|  |  | + *
 | 
	
		
			
				|  |  | + *  Address mapping for channels 0-3:
 | 
	
		
			
				|  |  | + *
 | 
	
		
			
				|  |  | + *   A23 ... A16 A15 ... A8  A7 ... A0    (Physical addresses)
 | 
	
		
			
				|  |  | + *    |  ...  |   |  ... |   |  ... |
 | 
	
		
			
				|  |  | + *    |  ...  |   |  ... |   |  ... |
 | 
	
		
			
				|  |  | + *    |  ...  |   |  ... |   |  ... |
 | 
	
		
			
				|  |  | + *   P7  ...  P0  A7 ... A0  A7 ... A0   
 | 
	
		
			
				|  |  | + * |    Page    | Addr MSB | Addr LSB |   (DMA registers)
 | 
	
		
			
				|  |  | + *
 |