2 * linux/include/asm-alpha/ide.h
4 * Copyright (C) 1994-1996 Linus Torvalds & authors
8 * This file contains the alpha architecture specific IDE code.
11 #ifndef __ASMalpha_IDE_H
12 #define __ASMalpha_IDE_H
16 #include <linux/config.h>
22 static __inline__ int ide_default_irq(ide_ioreg_t base)
25 case 0x1f0: return 14;
26 case 0x170: return 15;
27 case 0x1e8: return 11;
28 case 0x168: return 10;
34 static __inline__ ide_ioreg_t ide_default_io_base(int index)
46 static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq)
48 ide_ioreg_t reg = data_port;
51 for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
52 hw->io_ports[i] = reg;
56 hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
58 hw->io_ports[IDE_CONTROL_OFFSET] = hw->io_ports[IDE_DATA_OFFSET] + 0x206;
62 hw->io_ports[IDE_IRQ_OFFSET] = 0;
66 * This registers the standard ports for this architecture with the IDE
69 static __inline__ void ide_init_default_hwifs(void)
71 #ifndef CONFIG_BLK_DEV_IDEPCI
75 for (index = 0; index < MAX_HWIFS; index++) {
76 ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, NULL);
77 hw.irq = ide_default_irq(ide_default_io_base(index));
78 ide_register_hw(&hw, NULL);
80 #endif /* CONFIG_BLK_DEV_IDEPCI */
83 #include <asm-generic/ide_iops.h>
85 #endif /* __KERNEL__ */
87 #endif /* __ASMalpha_IDE_H */