This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / include / asm-arm / arch-iop3xx / ide.h
1 /*
2  * include/asm-arm/arch-iop3xx/ide.h
3  *
4  * Generic IDE functions for IOP310 systems
5  *
6  * Author: Deepak Saxena <dsaxena@mvista.com>
7  *
8  * Copyright 2001 MontaVista Software Inc.
9  *
10  * 09/26/2001 - Sharon Baartmans
11  *      Fixed so it actually works.
12  */
13
14 #ifndef _ASM_ARCH_IDE_H_
15 #define _ASM_ARCH_IDE_H_
16
17 /*
18  * Set up a hw structure for a specified data port, control port and IRQ.
19  * This should follow whatever the default interface uses.
20  */
21 static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
22                                        unsigned long ctrl_port, int *irq)
23 {
24         unsigned long reg = data_port;
25         int i;
26         int regincr = 1;
27
28         memset(hw, 0, sizeof(*hw));
29
30         for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
31                 hw->io_ports[i] = reg;
32                 reg += regincr;
33         }
34
35         hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
36
37         if (irq) *irq = 0;
38 }
39
40 /*
41  * This registers the standard ports for this architecture with the IDE
42  * driver.
43  */
44 static __inline__ void ide_init_default_hwifs(void)
45 {
46         /* There are no standard ports */
47 }
48
49 #endif