2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * Copyright (C) 1994-1996 Linus Torvalds & authors
8 * Copied from i386; many of the especially older MIPS or ISA-based platforms
9 * are basically identical. Using this file probably implies i8259 PIC
10 * support in a system but the very least interrupt numbers 0 - 15 need to
11 * be put aside for legacy devices.
13 #ifndef __ASM_MACH_GENERIC_IDE_H
14 #define __ASM_MACH_GENERIC_IDE_H
18 #include <linux/config.h>
19 #include <linux/pci.h>
20 #include <linux/stddef.h>
23 # ifdef CONFIG_BLK_DEV_IDEPCI
30 #define IDE_ARCH_OBSOLETE_DEFAULTS
32 static __inline__
int ide_probe_legacy(void)
36 if ((dev
= pci_get_class(PCI_CLASS_BRIDGE_EISA
<< 8, NULL
)) != NULL
||
37 (dev
= pci_get_class(PCI_CLASS_BRIDGE_ISA
<< 8, NULL
)) != NULL
) {
43 #elif defined(CONFIG_EISA) || defined(CONFIG_ISA)
50 static __inline__
int ide_default_irq(unsigned long base
)
52 if (ide_probe_legacy())
73 static __inline__
unsigned long ide_default_io_base(int index
)
75 if (ide_probe_legacy())
96 #define IDE_ARCH_OBSOLETE_INIT
97 #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */
99 #ifdef CONFIG_BLK_DEV_IDEPCI
100 #define ide_init_default_irq(base) (0)
102 #define ide_init_default_irq(base) ide_default_irq(base)
105 /* MIPS port and memory-mapped I/O string operations. */
107 #define __ide_insw insw
108 #define __ide_insl insl
109 #define __ide_outsw outsw
110 #define __ide_outsl outsl
112 #define __ide_mm_insw readsw
113 #define __ide_mm_insl readsl
114 #define __ide_mm_outsw writesw
115 #define __ide_mm_outsl writesl
117 #endif /* __KERNEL__ */
119 #endif /* __ASM_MACH_GENERIC_IDE_H */