Date: Wed, 12 Aug 1998 10:27:16 +0200
From: Sven LUTHER <LUTHERSV@e-i.com>
X-Accept-Language: en
To: linux-m68k@lists.linux-m68k.org, linux-apus@SunSITE.auc.dk
Subject: L68K: Blizzard 603e+ scsi patch for 2.1.115
Sender: owner-linux-m68k@phil.uni-sb.de
Reply-To: luther@dpt-info.u-strasbg.fr, LUTHERSV@e-i.com

This is a multi-part message in MIME format.
--------------868AC21BD6DBE5AB6B8F8A79
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hello, ...

here is my 53c710 scsi driver patch for 2.1.115

the problem with the ide driver is still there (i think).

i have looked at it a bit, but it is still confuse for me.

how does the driver see the interrupt don't is for him ? 
i looked at the interrupt aknowledge function of the ide driver
(it is in gayle.o, i don't remember the function name) it does not make
a particular check, but then i could have misunderstood something, since
i didn't look very long.)

I conturn the second problem (SDTR ignored and went into COMMAND OUT) by
simply not doing the corresponding printk when the driver is for
CONFIG_BLZ603EPLUS_SCSI (should be BLZ603EPLUS detected or something,
the same as in amiga7xx.c in the detect function.

also, when i do :

unsigned long address;
address = (unsigned long)kernel_map((unsigned long)cd->cd_BoardAddr,
	cd->cd_BoardSize, KERNELMAP_NOCACHE_SER, NULL);

does this give me the address of the board back ? (supposeddly
0x80f00000), and then i could do
address+0x40000 instead of 0x80f40000 ? i tried to print this address,
but i did a printk %ld, and got
-805 303 256, i suppose printk %xp is the way to go ?

Friendly,

Sven LUTHER
--------------868AC21BD6DBE5AB6B8F8A79
Content-Type: text/plain; charset=us-ascii;
 name="sven-2.1.115-m68k-scsi.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="sven-2.1.115-m68k-scsi.diff"

--- linux-2.1.115/Documentation/Configure.help	Fri Aug  7 16:52:53 1998
+++ linux-2.1.115-scsi/Documentation/Configure.help	Tue Aug 11 21:57:49 1998
@@ -9046,6 +9046,11 @@
   1260 accelerator, and the optional SCSI module, say Y.  Otherwise,
   say N.
 
+Blizzard PowerUP 603e+ SCSI support
+CONFIG_BLZ603EPLUS_SCSI
+  If you have an Amiga 1200 with a Phase5 Blizzard PowerUP 603e+
+  accelerator, say Y.  Otherwise, say N.
+
 Fastlane SCSI support
 CONFIG_FASTLANE_SCSI
   If you have the Phase5 Fastlane Z3 SCSI controller, or plan to use
--- linux-2.1.115/arch/m68k/config.in	Fri Aug  7 18:14:06 1998
+++ linux-2.1.115-scsi/arch/m68k/config.in	Tue Aug 11 21:57:49 1998
@@ -154,6 +154,7 @@
   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
     bool 'A4091 SCSI support' CONFIG_A4091_SCSI
     bool 'WarpEngine SCSI support' CONFIG_WARPENGINE_SCSI
+    bool 'Blizzard PowerUP 603e+ SCSI' CONFIG_BLZ603EPLUS_SCSI
 #    bool 'Cyberstorm Mk III SCSI support' CONFIG_CYBERSTORMIII_SCSI
 #    bool 'GVP Turbo 040/060 SCSI support' CONFIG_GVP_TURBO_SCSI
   fi
--- linux-2.1.115/arch/m68k/defconfig	Fri Aug  7 16:53:14 1998
+++ linux-2.1.115-scsi/arch/m68k/defconfig	Tue Aug 11 21:58:36 1998
@@ -135,6 +135,7 @@
 # CONFIG_A4000T_SCSI is not set
 # CONFIG_A4091_SCSI is not set
 # CONFIG_WARPENGINE_SCSI is not set
+# CONFIG_BLZ603EPLUS_SCSI is not set
 CONFIG_ATARI_SCSI=y
 # CONFIG_ATARI_SCSI_TOSHIBA_DELAY is not set
 # CONFIG_ATARI_SCSI_RESET_BOOT is not set
--- linux-2.1.115/drivers/scsi/Makefile	Fri Aug  7 16:55:23 1998
+++ linux-2.1.115-scsi/drivers/scsi/Makefile	Tue Aug 11 21:58:37 1998
@@ -147,6 +147,14 @@
   endif
 endif
 
+ifeq ($(CONFIG_BLZ603EPLUS_SCSI),y)
+L_OBJS += amiga7xx.o 53c7xx.o
+else
+  ifeq ($(CONFIG_BLZ603EPLUS_SCSI),m)
+  M_OBJS += amiga7xx.o 53c7xx.o
+  endif
+endif
+
 ifeq ($(CONFIG_WARPENGINE_SCSI),y)
 L_OBJS += amiga7xx.o 53c7xx.o
 else
--- linux-2.1.115/drivers/scsi/hosts.c	Fri Aug  7 18:15:30 1998
+++ linux-2.1.115-scsi/drivers/scsi/hosts.c	Tue Aug 11 21:58:37 1998
@@ -41,7 +41,7 @@
 
 #include "hosts.h"
 
-#if defined(CONFIG_A4000T_SCSI) || defined(CONFIG_WARPENGINE_SCSI) || defined(CONFIG_A4091_SCSI) || defined (CONFIG_GVP_TURBO_SCSI)
+#if defined(CONFIG_A4000T_SCSI) || defined(CONFIG_WARPENGINE_SCSI) || defined(CONFIG_A4091_SCSI) || defined (CONFIG_GVP_TURBO_SCSI) || defined (CONFIG_BLZ603EPLUS_SCSI)
 #include "amiga7xx.h"
 #endif
 
@@ -319,7 +319,7 @@
 static Scsi_Host_Template builtin_scsi_hosts[] =
 {
 #ifdef CONFIG_AMIGA
-#if defined(CONFIG_WARPENGINE_SCSI) || defined(CONFIG_A4000T_SCSI) || defined(CONFIG_A4091_SCSI) || defined (CONFIG_GVP_TURBO_SCSI)
+#if defined(CONFIG_WARPENGINE_SCSI) || defined(CONFIG_A4000T_SCSI) || defined(CONFIG_A4091_SCSI) || defined (CONFIG_GVP_TURBO_SCSI) || defined (CONFIG_BLZ603EPLUS_SCSI)
 	AMIGA7XX_SCSI,
 #endif
 #ifdef CONFIG_A3000_SCSI
--- linux-2.1.115/drivers/scsi/amiga7xx.c	Wed Jan  7 18:09:45 1998
+++ linux-2.1.115-scsi/drivers/scsi/amiga7xx.c	Wed Aug 12 09:02:26 1998
@@ -50,6 +50,28 @@
 
     tpnt->proc_dir = &proc_scsi_amiga7xx;
 
+#ifdef CONFIG_BLZ603EPLUS_SCSI
+    if ((key = zorro_find(ZORRO_PROD_PHASE5_BLIZZARD_603E_PLUS, 0, 0)))
+    {
+	cd = zorro_get_board(key);
+/*
+	unsigned long address;
+	address = (unsigned long)kernel_map((unsigned long)cd->cd_BoardAddr,
+		cd->cd_BoardSize, KERNELMAP_NOCACHE_SER, NULL);
+*/
+	options = OPTION_MEMORY_MAPPED|OPTION_DEBUG_TEST1|OPTION_INTFLY|OPTION_SYNCHRONOUS|OPTION_ALWAYS_SYNCHRONOUS|OPTION_DISCONNECT;
+
+	clock = 50000000;	/* 50MHz SCSI Clock */
+
+	ncr53c7xx_init(tpnt, 0, 710, (u32)(unsigned char *)(0x80f40000),
+			0, IRQ_AMIGA_PORTS, DMA_NONE, 
+			options, clock);
+
+	zorro_config_board(key, 0);
+	num++;
+    }
+#endif
+
 #ifdef CONFIG_WARPENGINE_SCSI
     if ((key = zorro_find(ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE_40xx, 0, 0)))
     {
--- linux-2.1.115/drivers/scsi/53c7xx.c	Sun Jul 19 19:18:09 1998
+++ linux-2.1.115-scsi/drivers/scsi/53c7xx.c	Tue Aug 11 22:19:35 1998
@@ -4746,8 +4746,11 @@
 	case SBCL_PHASE_CMDOUT:
 	    hostdata->dsp = dsp + 2 /* two _words_ */;
 	    hostdata->dsp_changed = 1;
+#ifdef CONFIG_BLZ603EPLUS_SCSI
+#else
 	    printk ("scsi%d : target %d ignored SDTR and went into COMMAND OUT\n", 
 		host->host_no, cmd->cmd->target);
+#endif
 	    cmd->flags &= ~CMD_FLAG_SDTR;
 	    action = ACTION_CONTINUE;
 	    break;

--------------868AC21BD6DBE5AB6B8F8A79--

