Date: Mon, 08 Dec 1997 10:33:40 +0100
From: Alain Malek <Alain.Malek@dumbo.cryogen.ch>
To: linux-m68k@phil.uni-sb.de
Subject: Re: L68K: CNET40 PCMCIA driver
References: <Pine.LNX.3.96.971208094309.20947A-100000@mercator.cs.kuleuven.ac.be>
Sender: owner-linux-m68k@phil.uni-sb.de

Geert Uytterhoeven wrote:

> I see one possible problem: amiints fiddles with the Gayle bits without
> checking for the presence of Gayle, which may cause a crash. I haven't tested
> it, and I have an A4000 which has Gayle anyway (without PCMCIA though).
> 
> If someone wants to port the driver to 2.1.x: amiga_hw_present has a PCMCIA bit
> in 2.1.x.

Hi,

Here is a new patch for amiints.c which should be more friendly.
I may port the driver to 2.1.x, but first I want to extract the pcmcia specfic
part of the driver and create a more generic support. Anyone need a
2.1.x version of the driver now ?

Alain

--- linux-2.0.29/arch/m68k/amiga/amiints.c	Sat Oct  5 15:23:52 1996
+++ linux/arch/m68k/amiga/amiints.c	Mon Dec  8 10:18:35 1997
@@ -31,6 +31,9 @@
 #include <asm/traps.h>
 #include <asm/amigahw.h>
 #include <asm/amigaints.h>
+#include <asm/io.h>
+#include <asm/amigayle.h>
+#include <asm/setup.h>
 
 extern int cia_request_irq(struct ciabase *base,int irq,
                            void (*handler)(int, void *, struct pt_regs *),
@@ -92,6 +95,10 @@
 	custom.intena = 0x7fff;
 	custom.intreq = 0x7fff;
 	custom.intena = IF_SETCLR | IF_INTEN;
+
+	/* turn off PCMCIA interrupts */
+	if ( boot_info.bi_un.bi_ami.model == AMI_1200 )
+		outb(GAYLE_CS_MASTER|GAYLE_CS_CCDET, GAYLE_IRQEN);
 
 	cia_init_IRQ(&ciaa_base);
 	cia_init_IRQ(&ciab_base);
