aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-parisc/ide.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-parisc/ide.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-parisc/ide.h')
-rw-r--r--include/asm-parisc/ide.h69
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
35static __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
43static __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
51static __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
59static __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 */