diff options
Diffstat (limited to 'arch/m68k/include/asm/ide.h')
-rw-r--r-- | arch/m68k/include/asm/ide.h | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/arch/m68k/include/asm/ide.h b/arch/m68k/include/asm/ide.h index b996a3c8cff5..3958726664ba 100644 --- a/arch/m68k/include/asm/ide.h +++ b/arch/m68k/include/asm/ide.h | |||
@@ -30,101 +30,28 @@ | |||
30 | #define _M68K_IDE_H | 30 | #define _M68K_IDE_H |
31 | 31 | ||
32 | #ifdef __KERNEL__ | 32 | #ifdef __KERNEL__ |
33 | |||
34 | |||
35 | #include <asm/setup.h> | 33 | #include <asm/setup.h> |
36 | #include <asm/io.h> | 34 | #include <asm/io.h> |
37 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
38 | 36 | ||
39 | #ifdef CONFIG_ATARI | ||
40 | #include <linux/interrupt.h> | ||
41 | #include <asm/atari_stdma.h> | ||
42 | #endif | ||
43 | |||
44 | #ifdef CONFIG_MAC | ||
45 | #include <asm/macints.h> | ||
46 | #endif | ||
47 | |||
48 | /* | 37 | /* |
49 | * Get rid of defs from io.h - ide has its private and conflicting versions | 38 | * Get rid of defs from io.h - ide has its private and conflicting versions |
50 | * Since so far no single m68k platform uses ISA/PCI I/O space for IDE, we | 39 | * Since so far no single m68k platform uses ISA/PCI I/O space for IDE, we |
51 | * always use the `raw' MMIO versions | 40 | * always use the `raw' MMIO versions |
52 | */ | 41 | */ |
53 | #undef inb | ||
54 | #undef inw | ||
55 | #undef insw | ||
56 | #undef inl | ||
57 | #undef insl | ||
58 | #undef outb | ||
59 | #undef outw | ||
60 | #undef outsw | ||
61 | #undef outl | ||
62 | #undef outsl | ||
63 | #undef readb | 42 | #undef readb |
64 | #undef readw | 43 | #undef readw |
65 | #undef readl | ||
66 | #undef writeb | 44 | #undef writeb |
67 | #undef writew | 45 | #undef writew |
68 | #undef writel | ||
69 | 46 | ||
70 | #define inb in_8 | ||
71 | #define inw in_be16 | ||
72 | #define insw(port, addr, n) raw_insw((u16 *)port, addr, n) | ||
73 | #define inl in_be32 | ||
74 | #define insl(port, addr, n) raw_insl((u32 *)port, addr, n) | ||
75 | #define outb(val, port) out_8(port, val) | ||
76 | #define outw(val, port) out_be16(port, val) | ||
77 | #define outsw(port, addr, n) raw_outsw((u16 *)port, addr, n) | ||
78 | #define outl(val, port) out_be32(port, val) | ||
79 | #define outsl(port, addr, n) raw_outsl((u32 *)port, addr, n) | ||
80 | #define readb in_8 | 47 | #define readb in_8 |
81 | #define readw in_be16 | 48 | #define readw in_be16 |
82 | #define __ide_mm_insw(port, addr, n) raw_insw((u16 *)port, addr, n) | 49 | #define __ide_mm_insw(port, addr, n) raw_insw((u16 *)port, addr, n) |
83 | #define readl in_be32 | ||
84 | #define __ide_mm_insl(port, addr, n) raw_insl((u32 *)port, addr, n) | 50 | #define __ide_mm_insl(port, addr, n) raw_insl((u32 *)port, addr, n) |
85 | #define writeb(val, port) out_8(port, val) | 51 | #define writeb(val, port) out_8(port, val) |
86 | #define writew(val, port) out_be16(port, val) | 52 | #define writew(val, port) out_be16(port, val) |
87 | #define __ide_mm_outsw(port, addr, n) raw_outsw((u16 *)port, addr, n) | 53 | #define __ide_mm_outsw(port, addr, n) raw_outsw((u16 *)port, addr, n) |
88 | #define writel(val, port) out_be32(port, val) | ||
89 | #define __ide_mm_outsl(port, addr, n) raw_outsl((u32 *)port, addr, n) | 54 | #define __ide_mm_outsl(port, addr, n) raw_outsl((u32 *)port, addr, n) |
90 | #if defined(CONFIG_ATARI) || defined(CONFIG_Q40) | ||
91 | #define insw_swapw(port, addr, n) raw_insw_swapw((u16 *)port, addr, n) | ||
92 | #define outsw_swapw(port, addr, n) raw_outsw_swapw((u16 *)port, addr, n) | ||
93 | #endif | ||
94 | |||
95 | #ifdef CONFIG_BLK_DEV_FALCON_IDE | ||
96 | #define IDE_ARCH_LOCK | ||
97 | |||
98 | extern int falconide_intr_lock; | ||
99 | |||
100 | static __inline__ void ide_release_lock (void) | ||
101 | { | ||
102 | if (MACH_IS_ATARI) { | ||
103 | if (falconide_intr_lock == 0) { | ||
104 | printk("ide_release_lock: bug\n"); | ||
105 | return; | ||
106 | } | ||
107 | falconide_intr_lock = 0; | ||
108 | stdma_release(); | ||
109 | } | ||
110 | } | ||
111 | |||
112 | static __inline__ void | ||
113 | ide_get_lock(irq_handler_t handler, void *data) | ||
114 | { | ||
115 | if (MACH_IS_ATARI) { | ||
116 | if (falconide_intr_lock == 0) { | ||
117 | if (in_interrupt() > 0) | ||
118 | panic( "Falcon IDE hasn't ST-DMA lock in interrupt" ); | ||
119 | stdma_lock(handler, data); | ||
120 | falconide_intr_lock = 1; | ||
121 | } | ||
122 | } | ||
123 | } | ||
124 | #endif /* CONFIG_BLK_DEV_FALCON_IDE */ | ||
125 | |||
126 | #define IDE_ARCH_ACK_INTR | ||
127 | #define ide_ack_intr(hwif) ((hwif)->ack_intr ? (hwif)->ack_intr(hwif) : 1) | ||
128 | 55 | ||
129 | #endif /* __KERNEL__ */ | 56 | #endif /* __KERNEL__ */ |
130 | #endif /* _M68K_IDE_H */ | 57 | #endif /* _M68K_IDE_H */ |