patch-2.1.87 linux/include/asm-m68k/ide.h

Next file: linux/include/asm-m68k/init.h
Previous file: linux/include/asm-m68k/hardirq.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.86/linux/include/asm-m68k/ide.h linux/include/asm-m68k/ide.h
@@ -33,28 +33,18 @@
 
 #include <linux/config.h>
 
-#ifdef CONFIG_AMIGA
-#include <asm/amigahw.h>
-#include <asm/amihdreg.h>
-#include <asm/amigaints.h>
-#endif /* CONFIG_AMIGA */
-
-#ifdef CONFIG_ATARI
-#include <linux/interrupt.h>	/* intr_count */
-#include <asm/atarihw.h>
-#include <asm/atarihdreg.h>
-#include <asm/atariints.h>
-#include <asm/atari_stdma.h>
-#endif /* CONFIG_ATARI */
-
 #include <asm/setup.h>
 #include <asm/io.h>
 #include <asm/irq.h>
 
+#ifdef CONFIG_ATARI
+#include <asm/atari_stdma.h>
+#endif
+
 typedef unsigned char * ide_ioreg_t;
 
 #ifndef MAX_HWIFS
-#define MAX_HWIFS	1
+#define MAX_HWIFS	4	/* same as the other archs */
 #endif
 
 static __inline int ide_default_irq (ide_ioreg_t base)
@@ -62,68 +52,12 @@
 	return 0;
 }
 
-static __inline__ ide_ioreg_t ide_default_io_base (int index)
-{
-	if (index)
-		return NULL;
-#ifdef CONFIG_AMIGA
-	if (MACH_IS_AMIGA) {
-		if (AMIGAHW_PRESENT(A4000_IDE)) {
-			printk("Gayle IDE interface (A%d style)\n", 4000);
-			return ((ide_ioreg_t)ZTWO_VADDR(HD_BASE_A4000));
-		}
-		if (AMIGAHW_PRESENT(A1200_IDE)) {
-			printk("Gayle IDE interface (A%d style)\n", 1200);
-			return ((ide_ioreg_t)ZTWO_VADDR(HD_BASE_A1200));
-		}
-	}
-#endif /* CONFIG_AMIGA */
-#ifdef CONFIG_ATARI
-	if (MACH_IS_ATARI) {
-		if (ATARIHW_PRESENT(IDE)) {
-			printk("Falcon IDE interface\n");
-			return ((ide_ioreg_t) ATA_HD_BASE);
-		}
-	}
-#endif /* CONFIG_ATARI */
-	return NULL;
-}
-
+/*
+ *  Can we do this in a generic manner??
+ */
 static __inline__ void ide_init_hwif_ports (ide_ioreg_t *p, ide_ioreg_t base, int *irq)
 {
-	*p++ = base;
-#ifdef CONFIG_AMIGA
-	if (MACH_IS_AMIGA) {
-		*p++ = base + AMI_HD_ERROR;
-		*p++ = base + AMI_HD_NSECTOR;
-		*p++ = base + AMI_HD_SECTOR;
-		*p++ = base + AMI_HD_LCYL;
-		*p++ = base + AMI_HD_HCYL;
-		*p++ = base + AMI_HD_SELECT;
-		*p++ = base + AMI_HD_STATUS;
-		*p++ = base + AMI_HD_CMD;
-		if (AMIGAHW_PRESENT(A4000_IDE))
-			*p++ = (ide_ioreg_t) ZTWO_VADDR(HD_A4000_IRQ);
-		else if (AMIGAHW_PRESENT(A1200_IDE))
-			*p++ = (ide_ioreg_t) ZTWO_VADDR(HD_A1200_IRQ);
-		if (irq != NULL)
-			*irq = IRQ_AMIGA_PORTS;
-	}
-#endif /* CONFIG_AMIGA */
-#ifdef CONFIG_ATARI
-	if (MACH_IS_ATARI) {
-		*p++ = base + ATA_HD_ERROR;
-		*p++ = base + ATA_HD_NSECTOR;
-		*p++ = base + ATA_HD_SECTOR;
-		*p++ = base + ATA_HD_LCYL;
-		*p++ = base + ATA_HD_HCYL;
-		*p++ = base + ATA_HD_CURRENT;
-		*p++ = base + ATA_HD_STATUS;
-		*p++ = base + ATA_HD_CMD;
-		if (irq != NULL)
-			*irq = IRQ_MFP_IDE;
-	}
-#endif /* CONFIG_ATARI */
+    printk("ide_init_hwif_ports: must not be called\n");
 }
 
 typedef union {
@@ -363,23 +297,6 @@
 
 #endif /* CONFIG_ATARI */
 
-static __inline__ int ide_ack_intr (ide_ioreg_t status_port, ide_ioreg_t irq_port)
-{
-#ifdef CONFIG_AMIGA
-	if (MACH_IS_AMIGA) {
-		unsigned char ch;
-		ch = inb(irq_port);
-		if (!(ch & 0x80))
-			return(0);
-		if (AMIGAHW_PRESENT(A1200_IDE)) {
-			(void) inb(status_port);
-			outb(0x7c | (ch & 0x03), irq_port);
-		}
-	}
-#endif /* CONFIG_AMIGA */
-	return(1);
-}
-
 #define T_CHAR          (0x0000)        /* char:  don't touch  */
 #define T_SHORT         (0x4000)        /* short: 12 -> 21     */
 #define T_INT           (0x8000)        /* int:   1234 -> 4321 */
@@ -488,6 +405,8 @@
 	}
 #endif /* CONFIG_ATARI */
 }
+
+#define ide_ack_intr(hwif) (hwif)->ack_intr((hwif))
 
 /*
  * On the Atari, we sometimes can't enable interrupts:

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov