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 * This file contains the MIPS architecture specific IDE code.
8 * Copyright (C) 1994-1996 Linus Torvalds & authors
15 #include <linux/config.h>
19 # ifdef CONFIG_BLK_DEV_IDEPCI
27 int (*ide_default_irq)(ide_ioreg_t base);
28 ide_ioreg_t (*ide_default_io_base)(int index);
29 void (*ide_init_hwif_ports)(hw_regs_t *hw, ide_ioreg_t data_port,
30 ide_ioreg_t ctrl_port, int *irq);
33 extern struct ide_ops *ide_ops;
35 static __inline__ int ide_default_irq(ide_ioreg_t base)
37 return ide_ops->ide_default_irq(base);
40 static __inline__ ide_ioreg_t ide_default_io_base(int index)
42 return ide_ops->ide_default_io_base(index);
45 static inline void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port,
46 ide_ioreg_t ctrl_port, int *irq)
48 ide_ops->ide_init_hwif_ports(hw, data_port, ctrl_port, irq);
51 static __inline__ void ide_init_default_hwifs(void)
53 #ifndef CONFIG_BLK_DEV_IDEPCI
57 for(index = 0; index < MAX_HWIFS; index++) {
58 memset(&hw, 0, sizeof hw);
59 ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, NULL);
60 hw.irq = ide_default_irq(ide_default_io_base(index));
61 ide_register_hw(&hw, NULL);
63 #endif /* CONFIG_BLK_DEV_IDEPCI */
66 #ifdef CONFIG_PCMCIA_SIBYTE
67 #define IDE_ARCH_ACK_INTR
68 #define ide_ack_intr(hwif) ((hwif)->hw.ack_intr ? (hwif)->hw.ack_intr(hwif) : 1)
71 #include <asm-generic/ide_iops.h>
73 #endif /* __KERNEL__ */
75 #endif /* __ASM_IDE_H */