2 * linux/include/asm-arm/arch-sa1100/ide.h
4 * Copyright (c) 1998 Hugo Fiennes & Nicolas Pitre
6 * 18-aug-2000: Cleanup by Erik Mouw (J.A.K.Mouw@its.tudelft.nl)
7 * Get rid of the special ide_init_hwif_ports() functions
8 * and make a generalised function that can be used by all
12 #include <linux/config.h>
14 #include <asm/hardware.h>
15 #include <asm/mach-types.h>
17 #error "This code is broken and needs update to match with current ide support"
21 * Set up a hw structure for a specified data port, control port and IRQ.
22 * This should follow whatever the default interface uses.
24 static inline void ide_init_hwif_ports(hw_regs_t
*hw
, unsigned long data_port
,
25 unsigned long ctrl_port
, int *irq
)
27 unsigned long reg
= data_port
;
31 /* The Empeg board has the first two address lines unused */
32 if (machine_is_empeg())
35 /* The LART doesn't use A0 for IDE */
36 if (machine_is_lart())
39 memset(hw
, 0, sizeof(*hw
));
41 for (i
= IDE_DATA_OFFSET
; i
<= IDE_STATUS_OFFSET
; i
++) {
42 hw
->io_ports
[i
] = reg
;
46 hw
->io_ports
[IDE_CONTROL_OFFSET
] = ctrl_port
;
53 * This registers the standard ports for this architecture with the IDE
56 static __inline__
void
57 ide_init_default_hwifs(void)
59 if (machine_is_lart()) {
60 #ifdef CONFIG_SA1100_LART
63 /* Enable GPIO as interrupt line */
64 GPDR
&= ~LART_GPIO_IDE
;
65 set_irq_type(LART_IRQ_IDE
, IRQT_RISING
);
67 /* set PCMCIA interface timing */
70 /* init the interface */
71 ide_init_hwif_ports(&hw
, PCMCIA_IO_0_BASE
+ 0x0000, PCMCIA_IO_0_BASE
+ 0x1000, NULL
);
72 hw
.irq
= LART_IRQ_IDE
;