20 #ifdef HAVE_REALLY_SLOW_DMA_CONTROLLER
21 #define dma_outb outb_p
76 #ifndef CONFIG_GENERIC_ISA_DMA_SUPPORT_BROKEN
77 #define MAX_DMA_CHANNELS 8
86 #if defined(CONFIG_SGI_IP22) || defined(CONFIG_SGI_IP28)
88 #define MAX_DMA_ADDRESS PAGE_OFFSET
90 #define MAX_DMA_ADDRESS (PAGE_OFFSET + 0x01000000)
92 #define MAX_DMA_PFN PFN_DOWN(virt_to_phys((void *)MAX_DMA_ADDRESS))
95 #define MAX_DMA32_PFN (1UL << (32 - PAGE_SHIFT))
99 #define IO_DMA1_BASE 0x00
100 #define IO_DMA2_BASE 0xC0
103 #define DMA1_CMD_REG 0x08
104 #define DMA1_STAT_REG 0x08
105 #define DMA1_REQ_REG 0x09
106 #define DMA1_MASK_REG 0x0A
107 #define DMA1_MODE_REG 0x0B
108 #define DMA1_CLEAR_FF_REG 0x0C
109 #define DMA1_TEMP_REG 0x0D
110 #define DMA1_RESET_REG 0x0D
111 #define DMA1_CLR_MASK_REG 0x0E
112 #define DMA1_MASK_ALL_REG 0x0F
114 #define DMA2_CMD_REG 0xD0
115 #define DMA2_STAT_REG 0xD0
116 #define DMA2_REQ_REG 0xD2
117 #define DMA2_MASK_REG 0xD4
118 #define DMA2_MODE_REG 0xD6
119 #define DMA2_CLEAR_FF_REG 0xD8
120 #define DMA2_TEMP_REG 0xDA
121 #define DMA2_RESET_REG 0xDA
122 #define DMA2_CLR_MASK_REG 0xDC
123 #define DMA2_MASK_ALL_REG 0xDE
125 #define DMA_ADDR_0 0x00
126 #define DMA_ADDR_1 0x02
127 #define DMA_ADDR_2 0x04
128 #define DMA_ADDR_3 0x06
129 #define DMA_ADDR_4 0xC0
130 #define DMA_ADDR_5 0xC4
131 #define DMA_ADDR_6 0xC8
132 #define DMA_ADDR_7 0xCC
134 #define DMA_CNT_0 0x01
135 #define DMA_CNT_1 0x03
136 #define DMA_CNT_2 0x05
137 #define DMA_CNT_3 0x07
138 #define DMA_CNT_4 0xC2
139 #define DMA_CNT_5 0xC6
140 #define DMA_CNT_6 0xCA
141 #define DMA_CNT_7 0xCE
143 #define DMA_PAGE_0 0x87
144 #define DMA_PAGE_1 0x83
145 #define DMA_PAGE_2 0x81
146 #define DMA_PAGE_3 0x82
147 #define DMA_PAGE_5 0x8B
148 #define DMA_PAGE_6 0x89
149 #define DMA_PAGE_7 0x8A
151 #define DMA_MODE_READ 0x44
152 #define DMA_MODE_WRITE 0x48
153 #define DMA_MODE_CASCADE 0xC0
155 #define DMA_AUTOINIT 0x10
168 spin_unlock_irqrestore(&dma_spin_lock, flags);
195 static __inline__ void clear_dma_ff(
unsigned int dmanr)
248 static __inline__ void set_dma_addr(
unsigned int dmanr,
unsigned int a)
296 unsigned short count;
299 count +=
dma_inb(io_port) << 8;
301 return (dmanr<=3)? count : (count<<1);
307 extern void free_dma(
unsigned int dmanr);
314 #define isa_dma_bridge_buggy (0)