1 /* $Id: ide.h,v 1.7 2002/01/16 20:58:40 davem Exp $
2 * ide.h: SPARC PCI specific IDE glue.
4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
5 * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be)
6 * Adaptation from sparc64 version to sparc by Pete Zaitcev.
14 #include <asm/pgtable.h>
21 #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */
23 #define __ide_insl(data_reg, buffer, wcount) \
24 __ide_insw(data_reg, buffer, (wcount)<<1)
25 #define __ide_outsl(data_reg, buffer, wcount) \
26 __ide_outsw(data_reg, buffer, (wcount)<<1)
28 /* On sparc, I/O ports and MMIO registers are accessed identically. */
29 #define __ide_mm_insw __ide_insw
30 #define __ide_mm_insl __ide_insl
31 #define __ide_mm_outsw __ide_outsw
32 #define __ide_mm_outsl __ide_outsl
34 static __inline__
void __ide_insw(unsigned long port
,
38 volatile unsigned short *data_port
;
39 /* unsigned long end = (unsigned long)dst + (count << 1); */ /* P3 */
43 data_port
= (volatile unsigned short *)port
;
45 if(((unsigned long)ps
) & 0x2) {
53 w
= (*data_port
) << 16;
62 /* __flush_dcache_range((unsigned long)dst, end); */ /* P3 see hme */
65 static __inline__
void __ide_outsw(unsigned long port
,
69 volatile unsigned short *data_port
;
70 /* unsigned long end = (unsigned long)src + (count << 1); */
74 data_port
= (volatile unsigned short *)port
;
76 if(((unsigned long)src
) & 0x2) {
85 *data_port
= (w
>> 16);
93 /* __flush_dcache_range((unsigned long)src, end); */ /* P3 see hme */
96 #endif /* __KERNEL__ */
98 #endif /* _SPARC_IDE_H */