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 /* Generic I/O and MEMIO string operations. */
17
18 #define __ide_insw insw
19 #define __ide_insl insl
20 #define __ide_outsw outsw
21 #define __ide_outsl outsl
22
__ide_mm_insw(void __iomem * port,void * addr,u32 count)23 static __inline__ void __ide_mm_insw(void __iomem *port, void *addr, u32 count)
24 {
25 while (count--) {
26 *(u16 *)addr = __raw_readw(port);
27 addr += 2;
28 }
29 }
30
__ide_mm_insl(void __iomem * port,void * addr,u32 count)31 static __inline__ void __ide_mm_insl(void __iomem *port, void *addr, u32 count)
32 {
33 while (count--) {
34 *(u32 *)addr = __raw_readl(port);
35 addr += 4;
36 }
37 }
38
__ide_mm_outsw(void __iomem * port,void * addr,u32 count)39 static __inline__ void __ide_mm_outsw(void __iomem *port, void *addr, u32 count)
40 {
41 while (count--) {
42 __raw_writew(*(u16 *)addr, port);
43 addr += 2;
44 }
45 }
46
__ide_mm_outsl(void __iomem * port,void * addr,u32 count)47 static __inline__ void __ide_mm_outsl(void __iomem *port, void *addr, u32 count)
48 {
49 while (count--) {
50 __raw_writel(*(u32 *)addr, port);
51 addr += 4;
52 }
53 }
54
55 #endif /* __KERNEL__ */
56
57 #endif /* __ASM_PARISC_IDE_H */
58