1 /* ide.h: SPARC PCI specific IDE glue.
3 * Copyright (C) 1997 David S. Miller (davem@davemloft.net)
4 * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be)
5 * Adaptation from sparc64 version to sparc by Pete Zaitcev.
13 #include <asm/pgtable.h>
20 #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */
22 #define __ide_insl(data_reg, buffer, wcount) \
23 __ide_insw(data_reg, buffer, (wcount)<<1)
24 #define __ide_outsl(data_reg, buffer, wcount) \
25 __ide_outsw(data_reg, buffer, (wcount)<<1)
27 /* On sparc, I/O ports and MMIO registers are accessed identically. */
28 #define __ide_mm_insw __ide_insw
29 #define __ide_mm_insl __ide_insl
30 #define __ide_mm_outsw __ide_outsw
31 #define __ide_mm_outsl __ide_outsl
33 static inline void __ide_insw(unsigned long port
,
37 volatile unsigned short *data_port
;
38 /* unsigned long end = (unsigned long)dst + (count << 1); */ /* P3 */
42 data_port
= (volatile unsigned short *)port
;
44 if(((unsigned long)ps
) & 0x2) {
52 w
= (*data_port
) << 16;
61 /* __flush_dcache_range((unsigned long)dst, end); */ /* P3 see hme */
64 static inline void __ide_outsw(unsigned long port
,
68 volatile unsigned short *data_port
;
69 /* unsigned long end = (unsigned long)src + (count << 1); */
73 data_port
= (volatile unsigned short *)port
;
75 if(((unsigned long)src
) & 0x2) {
84 *data_port
= (w
>> 16);
92 /* __flush_dcache_range((unsigned long)src, end); */ /* P3 see hme */
95 #endif /* __KERNEL__ */
97 #endif /* _SPARC_IDE_H */