2 * linux/include/asm-arm/arch-cl7500/ide.h
4 * Copyright (c) 1997 Russell King
7 * 29-07-1998 RMK Major re-work of IDE architecture specific code
10 #include <asm/arch/hardware.h>
13 * Set up a hw structure for a specified data port, control port and IRQ.
14 * This should follow whatever the default interface uses.
16 static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
17 unsigned long ctrl_port, int *irq)
19 unsigned long reg = data_port;
22 memset(hw, 0, sizeof(*hw));
24 for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
25 hw->io_ports[i] = reg;
29 hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
31 hw->io_ports[IDE_CONTROL_OFFSET] = data_port + 0x206;
35 hw->io_ports[IDE_IRQ_OFFSET] = 0;
39 * This registers the standard ports for this architecture with the IDE
42 static __inline__ void
43 ide_init_default_hwifs(void)
47 ide_init_hwif_ports(&hw, ISASLOT_IO + 0x1f0, ISASLOT_IO + 0x3f6, NULL);