diff options
Diffstat (limited to 'include/asm-parisc/ide.h')
-rw-r--r-- | include/asm-parisc/ide.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/include/asm-parisc/ide.h b/include/asm-parisc/ide.h new file mode 100644 index 000000000000..3243cf2cd227 --- /dev/null +++ b/include/asm-parisc/ide.h | |||
@@ -0,0 +1,69 @@ | |||
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 | #ifndef MAX_HWIFS | ||
17 | #define MAX_HWIFS 2 | ||
18 | #endif | ||
19 | |||
20 | #define IDE_ARCH_OBSOLETE_INIT | ||
21 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | ||
22 | |||
23 | #define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id)) | ||
24 | #define ide_free_irq(irq,dev_id) free_irq((irq), (dev_id)) | ||
25 | #define ide_check_region(from,extent) check_region((from), (extent)) | ||
26 | #define ide_request_region(from,extent,name) request_region((from), (extent), (name)) | ||
27 | #define ide_release_region(from,extent) release_region((from), (extent)) | ||
28 | /* Generic I/O and MEMIO string operations. */ | ||
29 | |||
30 | #define __ide_insw insw | ||
31 | #define __ide_insl insl | ||
32 | #define __ide_outsw outsw | ||
33 | #define __ide_outsl outsl | ||
34 | |||
35 | static __inline__ void __ide_mm_insw(void __iomem *port, void *addr, u32 count) | ||
36 | { | ||
37 | while (count--) { | ||
38 | *(u16 *)addr = __raw_readw(port); | ||
39 | addr += 2; | ||
40 | } | ||
41 | } | ||
42 | |||
43 | static __inline__ void __ide_mm_insl(void __iomem *port, void *addr, u32 count) | ||
44 | { | ||
45 | while (count--) { | ||
46 | *(u32 *)addr = __raw_readl(port); | ||
47 | addr += 4; | ||
48 | } | ||
49 | } | ||
50 | |||
51 | static __inline__ void __ide_mm_outsw(void __iomem *port, void *addr, u32 count) | ||
52 | { | ||
53 | while (count--) { | ||
54 | __raw_writew(*(u16 *)addr, port); | ||
55 | addr += 2; | ||
56 | } | ||
57 | } | ||
58 | |||
59 | static __inline__ void __ide_mm_outsl(void __iomem *port, void *addr, u32 count) | ||
60 | { | ||
61 | while (count--) { | ||
62 | __raw_writel(*(u32 *)addr, port); | ||
63 | addr += 4; | ||
64 | } | ||
65 | } | ||
66 | |||
67 | #endif /* __KERNEL__ */ | ||
68 | |||
69 | #endif /* __ASM_PARISC_IDE_H */ | ||