2 * linux/drivers/ide/legacy/falconide.c -- Atari Falcon IDE Driver
4 * Created 12 Jul 1997 by Geert Uytterhoeven
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
11 #include <linux/module.h>
12 #include <linux/types.h>
14 #include <linux/interrupt.h>
15 #include <linux/blkdev.h>
16 #include <linux/hdreg.h>
17 #include <linux/ide.h>
18 #include <linux/init.h>
20 #include <asm/setup.h>
21 #include <asm/atarihw.h>
22 #include <asm/atariints.h>
23 #include <asm/atari_stdma.h>
27 * Base of the IDE interface
30 #define ATA_HD_BASE 0xfff00000
33 * Offsets from the above base
36 #define ATA_HD_DATA 0x00
37 #define ATA_HD_ERROR 0x05 /* see err-bits */
38 #define ATA_HD_NSECTOR 0x09 /* nr of sectors to read/write */
39 #define ATA_HD_SECTOR 0x0d /* starting sector */
40 #define ATA_HD_LCYL 0x11 /* starting cylinder */
41 #define ATA_HD_HCYL 0x15 /* high byte of starting cyl */
42 #define ATA_HD_SELECT 0x19 /* 101dhhhh , d=drive, hhhh=head */
43 #define ATA_HD_STATUS 0x1d /* see status-bits */
44 #define ATA_HD_CONTROL 0x39
46 static int falconide_offsets[IDE_NR_PORTS] __initdata = {
47 ATA_HD_DATA, ATA_HD_ERROR, ATA_HD_NSECTOR, ATA_HD_SECTOR, ATA_HD_LCYL,
48 ATA_HD_HCYL, ATA_HD_SELECT, ATA_HD_STATUS, ATA_HD_CONTROL, -1
53 * falconide_intr_lock is used to obtain access to the IDE interrupt,
54 * which is shared between several drivers.
57 int falconide_intr_lock;
58 EXPORT_SYMBOL(falconide_intr_lock);
62 * Probe for a Falcon IDE interface
65 void __init falconide_init(void)
67 if (MACH_IS_ATARI && ATARIHW_PRESENT(IDE)) {
71 ide_setup_ports(&hw, ATA_HD_BASE, falconide_offsets,
75 index = ide_register_hw(&hw, 1, NULL);
78 printk("ide%d: Falcon IDE interface\n", index);