13 #ifndef __ASM_MACH_GENERIC_IDE_H
14 #define __ASM_MACH_GENERIC_IDE_H
18 #include <linux/pci.h>
19 #include <linux/stddef.h>
20 #include <asm/processor.h>
23 static inline void __ide_flush_prologue(
void)
31 static inline void __ide_flush_epilogue(
void)
39 static inline void __ide_flush_dcache_range(
unsigned long addr,
unsigned long size)
42 unsigned long end = addr +
size;
62 __ide_flush_prologue();
63 insw(port, addr, count);
64 __ide_flush_dcache_range((
unsigned long)addr, count * 2);
65 __ide_flush_epilogue();
68 static inline void __ide_insl(
unsigned long port,
void *addr,
unsigned int count)
70 __ide_flush_prologue();
71 insl(port, addr, count);
72 __ide_flush_dcache_range((
unsigned long)addr, count * 4);
73 __ide_flush_epilogue();
76 static inline void __ide_outsw(
unsigned long port,
const void *addr,
79 __ide_flush_prologue();
80 outsw(port, addr, count);
81 __ide_flush_dcache_range((
unsigned long)addr, count * 2);
82 __ide_flush_epilogue();
85 static inline void __ide_outsl(
unsigned long port,
const void *addr,
88 __ide_flush_prologue();
89 outsl(port, addr, count);
90 __ide_flush_dcache_range((
unsigned long)addr, count * 4);
91 __ide_flush_epilogue();
96 __ide_flush_prologue();
98 __ide_flush_dcache_range((
unsigned long)addr, count * 2);
99 __ide_flush_epilogue();
104 __ide_flush_prologue();
105 readsl(port, addr, count);
106 __ide_flush_dcache_range((
unsigned long)addr, count * 4);
107 __ide_flush_epilogue();
112 __ide_flush_prologue();
114 __ide_flush_dcache_range((
unsigned long)addr, count * 2);
115 __ide_flush_epilogue();
120 __ide_flush_prologue();
122 __ide_flush_dcache_range((
unsigned long)addr, count * 4);
123 __ide_flush_epilogue();
131 #define insw(port, addr, count) __ide_insw(port, addr, count)
132 #define insl(port, addr, count) __ide_insl(port, addr, count)
133 #define outsw(port, addr, count) __ide_outsw(port, addr, count)
134 #define outsl(port, addr, count) __ide_outsl(port, addr, count)