Tim,
Can you forward the epat c7/c8 support patch on to Alan for the 2.2.x
kernel? I'll do a 2.4 patch sometime if no one does it before me. The only
thing that'd have to be changed is the Config.in, Makefile and
Documentation/um....configuration help (or something like that).
Josh Jore
diff -ur linux/Documentation/Configure.help epat/Documentation/Configure.help
--- linux/Documentation/Configure.help Mon Sep 4 12:39:15 2000
+++ epat/Documentation/Configure.help Fri Sep 29 02:02:39 2000
@@ -850,6 +850,12 @@
have a high-level driver for the type of device that you want to
support.
+Shuttle EPAT c7/c8 extension
+CONFIG_PARIDE_EPATC8
+ This option enables support for the newer Shuttle EP1284 (aka c7 and
+ c8) chip. You need this if you are using any recent Imation SuperDisk
+ (LS-120) drive.
+
Shuttle EPIA protocol
CONFIG_PARIDE_EPIA
This option enables support for the (obsolete) EPIA parallel port
diff -ur linux/drivers/block/paride/Config.in epat/drivers/block/paride/Config.in
--- linux/drivers/block/paride/Config.in Tue Dec 22 10:29:00 1998
+++ epat/drivers/block/paride/Config.in Sun Sep 24 14:19:36 2000
@@ -15,6 +15,12 @@
dep_tristate ' FIT TD-2000 protocol' CONFIG_PARIDE_FIT2 $CONFIG_PARIDE
dep_tristate ' FIT TD-3000 protocol' CONFIG_PARIDE_FIT3 $CONFIG_PARIDE
dep_tristate ' Shuttle EPAT/EPEZ protocol' CONFIG_PARIDE_EPAT $CONFIG_PARIDE
+if [ $CONFIG_PARIDE_EPAT != "n" ]; then
+ if [ $CONFIG_EXPERIMENTAL = "y" ]; then
+ bool ' Support c7/c8 chips (EXPERIMENTAL)' CONFIG_PARIDE_EPATC8 $CONFIG_PARIDE
+ fi
+fi
+
dep_tristate ' Shuttle EPIA protocol' CONFIG_PARIDE_EPIA $CONFIG_PARIDE
dep_tristate ' Freecom IQ ASIC-2 protocol' CONFIG_PARIDE_FRIQ $CONFIG_PARIDE
dep_tristate ' FreeCom power protocol' CONFIG_PARIDE_FRPW $CONFIG_PARIDE
diff -ur linux/drivers/block/paride/epat.c epat/drivers/block/paride/epat.c
--- linux/drivers/block/paride/epat.c Thu May 14 21:11:48 1998
+++ epat/drivers/block/paride/epat.c Fri Sep 29 02:07:11 2000
@@ -12,10 +12,11 @@
/* Changes:
1.01 GRG 1998.05.06 init_proto, release_proto
+ 1.02 Joshua b. Jore CPP(renamed), epat_connect, epat_disconnect
*/
-#define EPAT_VERSION "1.01"
+#define EPAT_VERSION "1.02"
#include <linux/module.h>
#include <linux/delay.h>
@@ -196,30 +197,50 @@
#define WRi(r,v) epat_write_regr(pi,0,r,v)
#define RRi(r) (epat_read_regr(pi,0,r))
-/* FIXME: the CCP stuff should be fixed to handle multiple EPATs on a chain */
+/* FIXME: the CPP stuff should be fixed to handle multiple EPATs on a chain */
-#define CCP(x) w2(4);w0(0x22);w0(0xaa);w0(0x55);w0(0);w0(0xff);\
+#define CPP(x) w2(4);w0(0x22);w0(0xaa);w0(0x55);w0(0);w0(0xff);\
w0(0x87);w0(0x78);w0(x);w2(4);w2(5);w2(4);w0(0xff);
static void epat_connect ( PIA *pi )
{ pi->saved_r0 = r0();
pi->saved_r2 = r2();
- CCP(0); CCP(0xe0);
+
+#ifdef CONFIG_PARIDE_EPATC8
+ /* Initialize the chip */
+ CPP(0);CPP(0x40);CPP(0xe0);
+ w0(0);w2(1);w2(4);
+ WR(0x8,0x12);WR(0xc,0x14);WR(0x12,0x10);
+ WR(0xe,0xf);WR(0xf,4);
+ /* WR(0xe,0xa);WR(0xf,4); */
+ WR(0xe,0xd);WR(0xf,0);
+ /* CPP(0x30); */
+
+ /* Connect to the chip */
+ CPP(0xe0);
+ w0(0);w2(1);w2(4); /* Idle into SPP */
+ if (pi->mode >= 3) {
+ w0(0);w2(1);w2(4);w2(0xc);
+ /* Request EPP */
+ w0(0x40);w2(6);w2(7);w2(4);w2(0xc);w2(4);
+ }
+#else
+ CPP(0); CPP(0xe0);
w0(0); w2(1); w2(4);
if (pi->mode >= 3) {
w0(0); w2(1); w2(4); w2(0xc);
w0(0x40); w2(6); w2(7); w2(4); w2(0xc); w2(4);
}
WR(8,0x10); WR(0xc,0x14); WR(0xa,0x38); WR(0x12,0x10);
+#endif
}
-static void epat_disconnect ( PIA *pi )
-
-{ CCP(0x30);
- w0(pi->saved_r0);
- w2(pi->saved_r2);
-}
+static void epat_disconnect (PIA *pi)
+{ CPP(0x30);
+ w0(pi->saved_r0);
+ w2(pi->saved_r2);
+}
static int epat_test_proto( PIA *pi, char * scratch, int verbose )
@@ -281,6 +302,7 @@
static void epat_init_proto( PIA *pi)
{ MOD_INC_USE_COUNT;
+ printk("epat_init_proto");
}
static void epat_release_proto( PIA *pi)
-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2b29 : Wed Nov 08 2000 - 16:19:35 EST