blob: db0c944100953a1ce46ab8d7caa00f3a81314317 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
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#ifndef MAX_HWIFS
17#define MAX_HWIFS 2
18#endif
19
Linus Torvalds1da177e2005-04-16 15:20:36 -070020#define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id))
21#define ide_free_irq(irq,dev_id) free_irq((irq), (dev_id))
Linus Torvalds1da177e2005-04-16 15:20:36 -070022#define ide_request_region(from,extent,name) request_region((from), (extent), (name))
23#define ide_release_region(from,extent) release_region((from), (extent))
24/* Generic I/O and MEMIO string operations. */
25
26#define __ide_insw insw
27#define __ide_insl insl
28#define __ide_outsw outsw
29#define __ide_outsl outsl
30
31static __inline__ void __ide_mm_insw(void __iomem *port, void *addr, u32 count)
32{
33 while (count--) {
34 *(u16 *)addr = __raw_readw(port);
35 addr += 2;
36 }
37}
38
39static __inline__ void __ide_mm_insl(void __iomem *port, void *addr, u32 count)
40{
41 while (count--) {
42 *(u32 *)addr = __raw_readl(port);
43 addr += 4;
44 }
45}
46
47static __inline__ void __ide_mm_outsw(void __iomem *port, void *addr, u32 count)
48{
49 while (count--) {
50 __raw_writew(*(u16 *)addr, port);
51 addr += 2;
52 }
53}
54
55static __inline__ void __ide_mm_outsl(void __iomem *port, void *addr, u32 count)
56{
57 while (count--) {
58 __raw_writel(*(u32 *)addr, port);
59 addr += 4;
60 }
61}
62
63#endif /* __KERNEL__ */
64
65#endif /* __ASM_PARISC_IDE_H */