patch-2.4.13 linux/arch/arm/kernel/dma-isa.c
Next file: linux/arch/arm/kernel/entry-armv.S
Previous file: linux/arch/arm/kernel/compat.c
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Thu Oct 11 09:04:57 2001
- Orig file:
v2.4.12/linux/arch/arm/kernel/dma-isa.c
- Orig date:
Mon Sep 18 15:15:24 2000
diff -u --recursive --new-file v2.4.12/linux/arch/arm/kernel/dma-isa.c linux/arch/arm/kernel/dma-isa.c
@@ -148,17 +148,22 @@
void __init isa_init_dma(dma_t *dma)
{
- int dmac_found;
-
+ /*
+ * Try to autodetect presence of an ISA DMA controller.
+ * We do some minimal initialisation, and check that
+ * channel 0's DMA address registers are writeable.
+ */
outb(0xff, 0x0d);
outb(0xff, 0xda);
+ /*
+ * Write high and low address, and then read them back
+ * in the same order.
+ */
outb(0x55, 0x00);
outb(0xaa, 0x00);
- dmac_found = inb(0x00) == 0x55 && inb(0x00) == 0xaa;
-
- if (dmac_found) {
+ if (inb(0) == 0x55 && inb(0) == 0xaa) {
int channel, i;
for (channel = 0; channel < 8; channel++) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)