2 * linux/include/asm-i386/ide.h
4 * Copyright (C) 1994-1996 Linus Torvalds & authors
8 * This file contains the i386 architecture specific IDE code.
11 #ifndef __ASMi386_IDE_H
12 #define __ASMi386_IDE_H
16 #include <linux/config.h>
19 # ifdef CONFIG_BLK_DEV_IDEPCI
26 static __inline__ int ide_default_irq(unsigned long base)
29 #ifdef CONFIG_X86_PC9800
32 case 0x1f0: return 14;
33 case 0x170: return 15;
34 case 0x1e8: return 11;
35 case 0x168: return 10;
37 case 0x160: return 12;
43 static __inline__ unsigned long ide_default_io_base(int index)
46 #ifdef CONFIG_X86_PC9800
62 #ifdef CONFIG_X86_PC9800
63 static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
64 unsigned long ctrl_port, int *irq)
66 unsigned long reg = data_port;
69 unsigned long increment = data_port == 0x640 ? 2 : 1;
71 for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
72 hw->io_ports[i] = reg;
76 hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
77 } else if (data_port == 0x640) {
78 hw->io_ports[IDE_CONTROL_OFFSET] = 0x74c;
80 hw->io_ports[IDE_CONTROL_OFFSET] = hw->io_ports[IDE_DATA_OFFSET] + 0x206;
84 hw->io_ports[IDE_IRQ_OFFSET] = 0;
88 #ifdef CONFIG_BLK_DEV_IDEPCI
89 #define ide_init_default_irq(base) (0)
91 #define ide_init_default_irq(base) ide_default_irq(base)
94 #include <asm-generic/ide_iops.h>
96 #endif /* __KERNEL__ */
98 #endif /* __ASMi386_IDE_H */