ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-x86_64 / ide.h
1 /*
2  *  linux/include/asm-x86_64/ide.h
3  *
4  *  Copyright (C) 1994-1996  Linus Torvalds & authors
5  */
6
7 /*
8  *  This file contains the x86_64 architecture specific IDE code.
9  */
10
11 #ifndef __ASMx86_64_IDE_H
12 #define __ASMx86_64_IDE_H
13
14 #ifdef __KERNEL__
15
16 #include <linux/config.h>
17
18 #ifndef MAX_HWIFS
19 # ifdef CONFIG_BLK_DEV_IDEPCI
20 #define MAX_HWIFS       10
21 # else
22 #define MAX_HWIFS       6
23 # endif
24 #endif
25
26 static __inline__ int ide_default_irq(unsigned long base)
27 {
28         switch (base) {
29                 case 0x1f0: return 14;
30                 case 0x170: return 15;
31                 case 0x1e8: return 11;
32                 case 0x168: return 10;
33                 case 0x1e0: return 8;
34                 case 0x160: return 12;
35                 default:
36                         return 0;
37         }
38 }
39
40 static __inline__ unsigned long ide_default_io_base(int index)
41 {
42         switch (index) {
43                 case 0: return 0x1f0;
44                 case 1: return 0x170;
45                 case 2: return 0x1e8;
46                 case 3: return 0x168;
47                 case 4: return 0x1e0;
48                 case 5: return 0x160;
49                 default:
50                         return 0;
51         }
52 }
53
54 #ifdef CONFIG_BLK_DEV_IDEPCI
55 #define ide_init_default_irq(base)      (0)
56 #else
57 #define ide_init_default_irq(base)      ide_default_irq(base)
58 #endif
59
60 #include <asm-generic/ide_iops.h>
61
62 #endif /* __KERNEL__ */
63
64 #endif /* __ASMx86_64_IDE_H */