patch-2.4.22 linux-2.4.22/include/asm-mips64/ide.h

Next file: linux-2.4.22/include/asm-mips64/io.h
Previous file: linux-2.4.22/include/asm-mips64/i8259.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/include/asm-mips64/ide.h linux-2.4.22/include/asm-mips64/ide.h
@@ -7,11 +7,6 @@
  *
  * Copyright (C) 1994-1996  Linus Torvalds & authors
  */
-
-/*
- *  This file contains the MIPS architecture specific IDE code.
- */
-
 #ifndef __ASM_IDE_H
 #define __ASM_IDE_H
 
@@ -48,7 +43,7 @@
 }
 
 static inline void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port,
-                                       ide_ioreg_t ctrl_port, int *irq)
+	ide_ioreg_t ctrl_port, int *irq)
 {
 	ide_ops->ide_init_hwif_ports(hw, data_port, ctrl_port, irq);
 }
@@ -60,6 +55,7 @@
 	int index;
 
 	for(index = 0; index < MAX_HWIFS; index++) {
+		memset(&hw, 0, sizeof hw);
 		ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, NULL);
 		hw.irq = ide_default_irq(ide_default_io_base(index));
 		ide_register_hw(&hw, NULL);
@@ -67,50 +63,12 @@
 #endif /* CONFIG_BLK_DEV_IDEPCI */
 }
 
-#if defined(CONFIG_SWAP_IO_SPACE) && defined(__MIPSEB__)
-
-#ifdef insl
-#undef insl
+#ifdef CONFIG_PCMCIA_SIBYTE
+#define IDE_ARCH_ACK_INTR
+#define ide_ack_intr(hwif)    ((hwif)->hw.ack_intr ? (hwif)->hw.ack_intr(hwif) : 1)
 #endif
-#ifdef outsl
-#undef outsl
-#endif
-#ifdef insw
-#undef insw
-#endif
-#ifdef outsw
-#undef outsw
-#endif
-
-#define insw(p,a,c)							\
-do {									\
-	unsigned short *ptr = (unsigned short *)(a);			\
-	unsigned int i = (c);						\
-	while (i--)							\
-		*ptr++ = inw(p);					\
-} while (0)
-#define insl(p,a,c)							\
-do {									\
-	unsigned long *ptr = (unsigned long *)(a);			\
-	unsigned int i = (c);						\
-	while (i--)							\
-		*ptr++ = inl(p);					\
-} while (0)
-#define outsw(p,a,c)							\
-do {									\
-	unsigned short *ptr = (unsigned short *)(a);			\
-	unsigned int i = (c);						\
-	while (i--)							\
-		outw(*ptr++, (p));					\
-} while (0)
-#define outsl(p,a,c) {							\
-	unsigned long *ptr = (unsigned long *)(a);			\
-	unsigned int i = (c);						\
-	while (i--)							\
-		outl(*ptr++, (p));					\
-} while (0)
 
-#endif /* defined(CONFIG_SWAP_IO_SPACE) && defined(__MIPSEB__)  */
+#include <asm-generic/ide_iops.h>
 
 #endif /* __KERNEL__ */
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)