aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/dma-isa.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/dma-isa.c')
-rw-r--r--arch/arm/kernel/dma-isa.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/arch/arm/kernel/dma-isa.c b/arch/arm/kernel/dma-isa.c
index 29eca48925d8..da02a7ff3419 100644
--- a/arch/arm/kernel/dma-isa.c
+++ b/arch/arm/kernel/dma-isa.c
@@ -160,7 +160,12 @@ static struct resource dma_resources[] = { {
160 .end = 0x048f 160 .end = 0x048f
161} }; 161} };
162 162
163void __init isa_init_dma(dma_t *dma) 163static dma_t isa_dma[8];
164
165/*
166 * ISA DMA always starts at channel 0
167 */
168void __init isa_init_dma(void)
164{ 169{
165 /* 170 /*
166 * Try to autodetect presence of an ISA DMA controller. 171 * Try to autodetect presence of an ISA DMA controller.
@@ -178,10 +183,10 @@ void __init isa_init_dma(dma_t *dma)
178 outb(0xaa, 0x00); 183 outb(0xaa, 0x00);
179 184
180 if (inb(0) == 0x55 && inb(0) == 0xaa) { 185 if (inb(0) == 0x55 && inb(0) == 0xaa) {
181 int chan, i; 186 unsigned int chan, i;
182 187
183 for (chan = 0; chan < 8; chan++) { 188 for (chan = 0; chan < 8; chan++) {
184 dma[chan].d_ops = &isa_dma_ops; 189 isa_dma[chan].d_ops = &isa_dma_ops;
185 isa_disable_dma(chan, NULL); 190 isa_disable_dma(chan, NULL);
186 } 191 }
187 192
@@ -217,5 +222,12 @@ void __init isa_init_dma(dma_t *dma)
217 222
218 for (i = 0; i < ARRAY_SIZE(dma_resources); i++) 223 for (i = 0; i < ARRAY_SIZE(dma_resources); i++)
219 request_resource(&ioport_resource, dma_resources + i); 224 request_resource(&ioport_resource, dma_resources + i);
225
226 for (chan = 0; chan < 8; chan++) {
227 int ret = isa_dma_add(chan, &isa_dma[chan]);
228 if (ret)
229 printk(KERN_ERR "ISADMA%u: unable to register: %d\n",
230 chan, ret);
231 }
220 } 232 }
221} 233}