75 #define MAX_DMA_CHANNELS 8
87 #define ALPHA_XL_MAX_ISA_DMA_ADDRESS 0x04000000UL
92 #define ALPHA_RUFFIAN_MAX_ISA_DMA_ADDRESS 0x01000000UL
97 #define ALPHA_SABLE_MAX_ISA_DMA_ADDRESS 0x80000000UL
98 #define ALPHA_ALCOR_MAX_ISA_DMA_ADDRESS 0x80000000UL
104 #define ALPHA_MAX_ISA_DMA_ADDRESS 0x100000000UL
106 #ifdef CONFIG_ALPHA_GENERIC
107 # define MAX_ISA_DMA_ADDRESS (alpha_mv.max_isa_dma_address)
109 # if defined(CONFIG_ALPHA_XL)
110 # define MAX_ISA_DMA_ADDRESS ALPHA_XL_MAX_ISA_DMA_ADDRESS
111 # elif defined(CONFIG_ALPHA_RUFFIAN)
112 # define MAX_ISA_DMA_ADDRESS ALPHA_RUFFIAN_MAX_ISA_DMA_ADDRESS
113 # elif defined(CONFIG_ALPHA_SABLE)
114 # define MAX_ISA_DMA_ADDRESS ALPHA_SABLE_MAX_ISA_DMA_ADDRESS
115 # elif defined(CONFIG_ALPHA_ALCOR)
116 # define MAX_ISA_DMA_ADDRESS ALPHA_ALCOR_MAX_ISA_DMA_ADDRESS
118 # define MAX_ISA_DMA_ADDRESS ALPHA_MAX_ISA_DMA_ADDRESS
125 #define MAX_DMA_ADDRESS (alpha_mv.mv_pci_tbi ? \
126 ~0UL : IDENT_ADDR + 0x01000000)
129 #define IO_DMA1_BASE 0x00
130 #define IO_DMA2_BASE 0xC0
133 #define DMA1_CMD_REG 0x08
134 #define DMA1_STAT_REG 0x08
135 #define DMA1_REQ_REG 0x09
136 #define DMA1_MASK_REG 0x0A
137 #define DMA1_MODE_REG 0x0B
138 #define DMA1_CLEAR_FF_REG 0x0C
139 #define DMA1_TEMP_REG 0x0D
140 #define DMA1_RESET_REG 0x0D
141 #define DMA1_CLR_MASK_REG 0x0E
142 #define DMA1_MASK_ALL_REG 0x0F
143 #define DMA1_EXT_MODE_REG (0x400 | DMA1_MODE_REG)
145 #define DMA2_CMD_REG 0xD0
146 #define DMA2_STAT_REG 0xD0
147 #define DMA2_REQ_REG 0xD2
148 #define DMA2_MASK_REG 0xD4
149 #define DMA2_MODE_REG 0xD6
150 #define DMA2_CLEAR_FF_REG 0xD8
151 #define DMA2_TEMP_REG 0xDA
152 #define DMA2_RESET_REG 0xDA
153 #define DMA2_CLR_MASK_REG 0xDC
154 #define DMA2_MASK_ALL_REG 0xDE
155 #define DMA2_EXT_MODE_REG (0x400 | DMA2_MODE_REG)
157 #define DMA_ADDR_0 0x00
158 #define DMA_ADDR_1 0x02
159 #define DMA_ADDR_2 0x04
160 #define DMA_ADDR_3 0x06
161 #define DMA_ADDR_4 0xC0
162 #define DMA_ADDR_5 0xC4
163 #define DMA_ADDR_6 0xC8
164 #define DMA_ADDR_7 0xCC
166 #define DMA_CNT_0 0x01
167 #define DMA_CNT_1 0x03
168 #define DMA_CNT_2 0x05
169 #define DMA_CNT_3 0x07
170 #define DMA_CNT_4 0xC2
171 #define DMA_CNT_5 0xC6
172 #define DMA_CNT_6 0xCA
173 #define DMA_CNT_7 0xCE
175 #define DMA_PAGE_0 0x87
176 #define DMA_PAGE_1 0x83
177 #define DMA_PAGE_2 0x81
178 #define DMA_PAGE_3 0x82
179 #define DMA_PAGE_5 0x8B
180 #define DMA_PAGE_6 0x89
181 #define DMA_PAGE_7 0x8A
183 #define DMA_HIPAGE_0 (0x400 | DMA_PAGE_0)
184 #define DMA_HIPAGE_1 (0x400 | DMA_PAGE_1)
185 #define DMA_HIPAGE_2 (0x400 | DMA_PAGE_2)
186 #define DMA_HIPAGE_3 (0x400 | DMA_PAGE_3)
187 #define DMA_HIPAGE_4 (0x400 | DMA_PAGE_4)
188 #define DMA_HIPAGE_5 (0x400 | DMA_PAGE_5)
189 #define DMA_HIPAGE_6 (0x400 | DMA_PAGE_6)
190 #define DMA_HIPAGE_7 (0x400 | DMA_PAGE_7)
192 #define DMA_MODE_READ 0x44
193 #define DMA_MODE_WRITE 0x48
194 #define DMA_MODE_CASCADE 0xC0
196 #define DMA_AUTOINIT 0x10
209 spin_unlock_irqrestore(&dma_spin_lock, flags);
236 static __inline__ void clear_dma_ff(
unsigned int dmanr)
254 static __inline__ void set_dma_ext_mode(
unsigned int dmanr,
char ext_mode)
304 static __inline__ void set_dma_addr(
unsigned int dmanr,
unsigned int a)
352 unsigned short count;
355 count +=
dma_inb(io_port) << 8;
357 return (dmanr<=3)? count : (count<<1);
363 extern void free_dma(
unsigned int dmanr);
364 #define KERNEL_HAVE_CHECK_DMA
365 extern int check_dma(
unsigned int dmanr);
372 #define isa_dma_bridge_buggy (0)