2 * linux/include/asm-arm/arch-omaha/ide.h
4 * Copyright (c) 2002 ARM Limited.
5 * Copyright (c) 2000 Steve Hill (sjhill@cotw.com)
8 * 03-29-2000 SJH Created file placeholder
10 #include <linux/config.h>
12 #include <asm/system.h>
13 #include <asm/arch/hardware.h>
16 * Set up a hw structure for a specified data port, control port and IRQ.
17 * This should follow whatever the default interface uses.
19 static __inline__ void
20 ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq)
26 memset(hw, 0, sizeof(*hw));
28 reg = (ide_ioreg_t)data_port;
30 for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
32 hw->io_ports[i] = reg;
34 /* Special location in nCS2 for data register, as
35 * we need to be able to do 16-bit r/w.
38 if(i == IDE_DATA_OFFSET)
39 hw->io_ports[i] = reg + 0x04000000;
44 hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port;
51 * This registers the standard ports for this architecture with the IDE
54 static __inline__ void
55 ide_init_default_hwifs(void)
59 /* init the interface */
60 ide_init_hwif_ports(&hw, IO_ADDRESS(0x01C00000), IO_ADDRESS(0x01C00006), NULL);
61 hw.irq = 1; // pld irq really
62 ide_register_hw(&hw, NULL);