2 * linux/drivers/ide/pci/adma100.c -- basic support for Pacific Digital ADMA-100 boards
4 * Created 09 Apr 2002 by Mark Lord
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file COPYING in the main directory of this archive for
12 #include <linux/blkdev.h>
13 #include <linux/hdreg.h>
14 #include <linux/ide.h>
15 #include <linux/init.h>
16 #include <linux/pci.h>
19 void __init ide_init_adma100 (ide_hwif_t *hwif)
21 unsigned long phy_admctl = pci_resource_start(hwif->pci_dev, 4) + 0x80 + (hwif->channel * 0x20);
24 hwif->autodma = 0; // not compatible with normal IDE DMA transfers
25 hwif->dma_base = 0; // disable DMA completely
26 hwif->io_ports[IDE_CONTROL_OFFSET] += 4; // chip needs offset of 6 instead of 2
27 v_admctl = ioremap_nocache(phy_admctl, 1024); // map config regs, so we can turn on drive IRQs
28 *((unsigned short *)v_admctl) &= 3; // enable aIEN; preserve PIO mode
29 iounmap(v_admctl); // all done; unmap config regs