patch-2.2.15 linux/drivers/misc/parport_ax.c
Next file: linux/drivers/misc/parport_pc.c
Previous file: linux/drivers/macintosh/macserial.c
Back to the patch index
Back to the overall index
- Lines: 63
- Date:
Fri Apr 21 12:46:14 2000
- Orig file:
v2.2.14/drivers/misc/parport_ax.c
- Orig date:
Tue Mar 16 00:11:30 1999
diff -u --new-file --recursive --exclude-from ../../exclude v2.2.14/drivers/misc/parport_ax.c linux/drivers/misc/parport_ax.c
@@ -1,4 +1,4 @@
-/* $Id: parport_ax.c,v 1.17 1999/01/20 06:18:54 davem Exp $
+/* $Id: parport_ax.c,v 1.17.2.1 2000/01/09 18:29:28 ecd Exp $
* Parallel-port routines for Sun Ultra/AX architecture
*
* Author: Eddie C. Dost <ecd@skynet.be>
@@ -30,13 +30,6 @@
#include <asm/irq.h>
-/*
- * Define this if you have Devices which don't support short
- * host read/write cycles.
- */
-#undef HAVE_SLOW_DEVICES
-
-
#define DATA 0x00
#define STATUS 0x01
#define CONTROL 0x02
@@ -513,7 +506,6 @@
struct parport tmpport, *p;
unsigned long base;
unsigned long config;
- unsigned char tmp;
int irq, dma;
/* Pointer to NS87303 Configuration Registers */
@@ -523,29 +515,15 @@
tmpport.base = dev->base_address[0];
tmpport.ops = &parport_ax_ops;
+ /* Configure IRQ to Push Pull, Level Low */
/* Enable ECP mode, set bit 2 of the CTR first */
tmpport.ops->write_control(&tmpport, 0x04);
- tmp = ns87303_readb(config, PCR);
- tmp |= (PCR_EPP_IEEE | PCR_ECP_ENABLE | PCR_ECP_CLK_ENA);
- ns87303_writeb(config, PCR, tmp);
+ ns87303_modify(config, PCR,
+ PCR_EPP_ENABLE | PCR_IRQ_ODRAIN,
+ PCR_ECP_ENABLE | PCR_ECP_CLK_ENA | PCR_IRQ_POLAR);
/* LPT CTR bit 5 controls direction of parallel port */
- tmp = ns87303_readb(config, PTR);
- tmp |= PTR_LPT_REG_DIR;
- ns87303_writeb(config, PTR, tmp);
-
- /* Configure IRQ to Push Pull, Level Low */
- tmp = ns87303_readb(config, PCR);
- tmp &= ~(PCR_IRQ_ODRAIN);
- tmp |= PCR_IRQ_POLAR;
- ns87303_writeb(config, PCR, tmp);
-
-#ifndef HAVE_SLOW_DEVICES
- /* Enable Zero Wait State for ECP */
- tmp = ns87303_readb(config, FCR);
- tmp |= FCR_ZWS_ENA;
- ns87303_writeb(config, FCR, tmp);
-#endif
+ ns87303_modify(config, PTR, 0, PTR_LPT_REG_DIR);
/*
* Now continue initializing the port
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)