2 * linux/include/asm-parisc/ide.h
4 * Copyright (C) 1994-1996 Linus Torvalds & authors
8 * This file contains the PARISC architecture specific IDE code.
11 #ifndef __ASM_PARISC_IDE_H
12 #define __ASM_PARISC_IDE_H
16 #include <linux/config.h>
17 #include <asm/superio.h>
23 #define ide__sti() __sti()
25 static __inline__ int ide_default_irq(ide_ioreg_t base)
31 return superio_get_ide_irq();
32 #endif /* CONFIG_SUPERIO */
38 static __inline__ ide_ioreg_t ide_default_io_base(int index)
42 case 0: return (superio_get_ide_irq() ? 0x1f0 : 0);
43 case 1: return (superio_get_ide_irq() ? 0x170 : 0);
44 #endif /* CONFIG_SUPERIO */
50 static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq)
52 ide_ioreg_t reg = data_port;
55 for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
56 hw->io_ports[i] = reg;
60 hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
62 hw->io_ports[IDE_CONTROL_OFFSET] = hw->io_ports[IDE_DATA_OFFSET] + 0x206;
66 hw->io_ports[IDE_IRQ_OFFSET] = 0;
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 */
84 unsigned all : 8; /* all of the bits together */
86 unsigned bit7 : 1; /* always 1 */
87 unsigned lba : 1; /* using LBA instead of CHS */
88 unsigned bit5 : 1; /* always 1 */
89 unsigned unit : 1; /* drive select number, 0 or 1 */
90 unsigned head : 4; /* always zeros here */
95 unsigned all : 8; /* all of the bits together */
98 unsigned nIEN : 1; /* device INTRQ to host */
99 unsigned SRST : 1; /* host soft reset bit */
100 unsigned bit3 : 1; /* ATA-2 thingy */
101 unsigned reserved456 : 3;
102 unsigned HOB : 1; /* 48-bit address ordering */
106 #endif /* __KERNEL__ */
108 #endif /* __ASM_PARISC_IDE_H */