ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-parisc / ide.h
1 /*
2  *  linux/include/asm-parisc/ide.h
3  *
4  *  Copyright (C) 1994-1996  Linus Torvalds & authors
5  */
6
7 /*
8  *  This file contains the PARISC architecture specific IDE code.
9  */
10
11 #ifndef __ASM_PARISC_IDE_H
12 #define __ASM_PARISC_IDE_H
13
14 #ifdef __KERNEL__
15
16 #include <linux/config.h>
17
18 #ifndef MAX_HWIFS
19 #define MAX_HWIFS       2
20 #endif
21
22 #define ide_default_irq(base) (0)
23 #define ide_default_io_base(index) (0)
24
25 #define ide_init_default_irq(base)      (0)
26
27 #define ide_request_irq(irq,hand,flg,dev,id)    request_irq((irq),(hand),(flg),(dev),(id))
28 #define ide_free_irq(irq,dev_id)                free_irq((irq), (dev_id))
29 #define ide_check_region(from,extent)           check_region((from), (extent))
30 #define ide_request_region(from,extent,name)    request_region((from), (extent), (name))
31 #define ide_release_region(from,extent)         release_region((from), (extent))
32 /* Generic I/O and MEMIO string operations.  */
33
34 #define __ide_insw      insw
35 #define __ide_insl      insl
36 #define __ide_outsw     outsw
37 #define __ide_outsl     outsl
38
39 static __inline__ void __ide_mm_insw(unsigned long port, void *addr, u32 count)
40 {
41         while (count--) {
42                 *(u16 *)addr = __raw_readw(port);
43                 addr += 2;
44         }
45 }
46
47 static __inline__ void __ide_mm_insl(unsigned long port, void *addr, u32 count)
48 {
49         while (count--) {
50                 *(u32 *)addr = __raw_readl(port);
51                 addr += 4;
52         }
53 }
54
55 static __inline__ void __ide_mm_outsw(unsigned long port, void *addr, u32 count)
56 {
57         while (count--) {
58                 __raw_writew(*(u16 *)addr, port);
59                 addr += 2;
60         }
61 }
62
63 static __inline__ void __ide_mm_outsl(unsigned long port, void *addr, u32 count)
64 {
65         while (count--) {
66                 __raw_writel(*(u32 *)addr, port);
67                 addr += 4;
68         }
69 }
70
71 #endif /* __KERNEL__ */
72
73 #endif /* __ASM_PARISC_IDE_H */