|
From: Dave A. <ai...@us...> - 2003-06-10 01:14:59
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/parport
In directory sc8-pr-cvs1:/tmp/cvs-serv7538/drivers/parport
Modified Files:
ChangeLog Config.in daisy.c ieee1284_ops.c parport_cs.c
parport_pc.c parport_serial.c
Log Message:
DA: sync with Marcelo 2.4.17
Index: ChangeLog
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/parport/ChangeLog,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ChangeLog 9 Apr 2002 16:45:52 -0000 1.2
+++ ChangeLog 10 Jun 2003 01:13:53 -0000 1.3
@@ -1,3 +1,33 @@
+2001-12-07 Tim Waugh <tw...@re...>
+
+ * ieee1284_ops.c (parport_ieee1284_epp_write_addr,
+ parport_ieee1284_epp_read_addr): Actually do something useful.
+
+2001-12-07 Tim Waugh <tw...@re...>
+
+ * parport_pc.c (dmaval): Don't use DMA by default. It seems to be
+ too buggy at the moment. Use 'dma=auto' to restore the previous
+ behaviour.
+
+2001-12-03 Rich Liu <Ric...@it...>
+
+ * parport_pc.c (sio_ite_8872_probe): ITE8873 is a single-port
+ serial board, not a serial+parallel.
+
+2001-11-30 Niels Kristian Bech Jensen <nk...@im...>
+
+ * parport_pc.c: Fix compiler warning.
+
+2001-12-07 Tim Waugh <tw...@re...>
+
+ * daisy.c (DEBUG): Undefine.
+
+2001-12-06 Tim Waugh <tw...@re...>
+
+ * ieee1284_ops.c (parport_ieee1284_ecp_read_data): Mask off
+ PARPORT_CONTROL_AUTOFD as well. Bug spotted by Joe
+ <jo...@mi...>.
+
2001-11-12 Tim Waugh <tw...@re...>
* parport_pc.c (init_module): Warn when parameters are ignored.
Index: Config.in
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/parport/Config.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Config.in 9 Apr 2002 16:45:52 -0000 1.2
+++ Config.in 10 Jun 2003 01:13:53 -0000 1.3
@@ -24,9 +24,13 @@
bool ' Use FIFO/DMA if available (EXPERIMENTAL)' CONFIG_PARPORT_PC_FIFO
bool ' SuperIO chipset support (EXPERIMENTAL)' CONFIG_PARPORT_PC_SUPERIO
fi
- fi
- if [ "$CONFIG_HOTPLUG" = "y" -a "$CONFIG_PCMCIA" != "n" ]; then
- dep_tristate ' Support for PCMCIA management for PC-style ports' CONFIG_PARPORT_PC_PCMCIA $CONFIG_PCMCIA
+ if [ "$CONFIG_HOTPLUG" = "y" -a "$CONFIG_PCMCIA" != "n" ]; then
+ if [ "$CONFIG_PARPORT_PC" = "y" ]; then
+ dep_tristate ' Support for PCMCIA management for PC-style ports' CONFIG_PARPORT_PC_PCMCIA $CONFIG_PCMCIA
+ else
+ dep_tristate ' Support for PCMCIA management for PC-style ports' CONFIG_PARPORT_PC_PCMCIA $CONFIG_PARPORT_PC
+ fi
+ fi
fi
if [ "$CONFIG_ARM" = "y" ]; then
dep_tristate ' Archimedes hardware' CONFIG_PARPORT_ARC $CONFIG_PARPORT
Index: daisy.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/parport/daisy.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- daisy.c 14 Jan 2001 19:08:58 -0000 1.1.1.1
+++ daisy.c 10 Jun 2003 01:13:53 -0000 1.2
@@ -23,7 +23,7 @@
#include <linux/delay.h>
#include <asm/uaccess.h>
-#define DEBUG /* undef me for production */
+#undef DEBUG /* undef me for production */
#ifdef DEBUG
#define DPRINTK(stuff...) printk (stuff)
Index: ieee1284_ops.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/parport/ieee1284_ops.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ieee1284_ops.c 9 Apr 2002 16:45:52 -0000 1.2
+++ ieee1284_ops.c 10 Jun 2003 01:13:53 -0000 1.3
@@ -514,7 +514,8 @@
/* Set HostAck low to start accepting data. */
ctl = parport_read_control (port);
- ctl &= ~(PARPORT_CONTROL_STROBE | PARPORT_CONTROL_INIT);
+ ctl &= ~(PARPORT_CONTROL_STROBE | PARPORT_CONTROL_INIT |
+ PARPORT_CONTROL_AUTOFD);
parport_write_control (port,
ctl | PARPORT_CONTROL_AUTOFD);
while (count < len) {
@@ -823,35 +824,40 @@
const void *buffer, size_t len,
int flags)
{
- /* This is untested */
unsigned char *bp = (unsigned char *) buffer;
size_t ret = 0;
+ /* set EPP idle state (just to make sure) with strobe low */
parport_frob_control (port,
PARPORT_CONTROL_STROBE |
+ PARPORT_CONTROL_AUTOFD |
PARPORT_CONTROL_SELECT |
- PARPORT_CONTROL_AUTOFD,
+ PARPORT_CONTROL_INIT,
PARPORT_CONTROL_STROBE |
- PARPORT_CONTROL_SELECT);
+ PARPORT_CONTROL_INIT);
port->ops->data_forward (port);
for (; len > 0; len--, bp++) {
- /* Write data and assert nAStrb. */
+ /* Event 56: Write data and set nAStrb low. */
parport_write_data (port, *bp);
parport_frob_control (port, PARPORT_CONTROL_SELECT,
PARPORT_CONTROL_SELECT);
- if (parport_poll_peripheral (port, PARPORT_STATUS_BUSY,
- PARPORT_STATUS_BUSY, 10))
+ /* Event 58: wait for busy (nWait) to go high */
+ if (parport_poll_peripheral (port, PARPORT_STATUS_BUSY, 0, 10))
break;
+ /* Event 59: set nAStrb high */
parport_frob_control (port, PARPORT_CONTROL_SELECT, 0);
- if (parport_poll_peripheral (port, PARPORT_STATUS_BUSY, 0, 5))
+ /* Event 60: wait for busy (nWait) to go low */
+ if (parport_poll_peripheral (port, PARPORT_STATUS_BUSY,
+ PARPORT_STATUS_BUSY, 5))
break;
ret++;
}
+ /* Event 61: set strobe (nWrite) high */
parport_frob_control (port, PARPORT_CONTROL_STROBE, 0);
return ret;
@@ -862,28 +868,36 @@
void *buffer, size_t len,
int flags)
{
- /* This is untested. */
unsigned char *bp = (unsigned char *) buffer;
unsigned ret = 0;
+ /* Set EPP idle state (just to make sure) with strobe high */
parport_frob_control (port,
PARPORT_CONTROL_STROBE |
- PARPORT_CONTROL_AUTOFD, 0);
+ PARPORT_CONTROL_AUTOFD |
+ PARPORT_CONTROL_SELECT |
+ PARPORT_CONTROL_INIT,
+ PARPORT_CONTROL_INIT);
port->ops->data_reverse (port);
for (; len > 0; len--, bp++) {
- parport_frob_control (port, PARPORT_CONTROL_SELECT, 0);
+ /* Event 64: set nSelectIn (nAStrb) low */
+ parport_frob_control (port, PARPORT_CONTROL_SELECT,
+ PARPORT_CONTROL_SELECT);
- /* Event 58 */
- if (parport_poll_peripheral (port, PARPORT_STATUS_BUSY,
- PARPORT_STATUS_BUSY, 10))
+ /* Event 58: wait for Busy to go high */
+ if (parport_wait_peripheral (port, PARPORT_STATUS_BUSY, 0)) {
break;
+ }
*bp = parport_read_data (port);
+ /* Event 59: set nSelectIn (nAStrb) high */
parport_frob_control (port, PARPORT_CONTROL_SELECT,
PARPORT_CONTROL_SELECT);
- if (parport_poll_peripheral (port, PARPORT_STATUS_BUSY, 0, 5))
+ /* Event 60: wait for Busy to go low */
+ if (parport_poll_peripheral (port, PARPORT_STATUS_BUSY,
+ PARPORT_STATUS_BUSY, 5))
break;
ret++;
Index: parport_cs.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/parport/parport_cs.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- parport_cs.c 9 Apr 2002 16:45:52 -0000 1.1
+++ parport_cs.c 10 Jun 2003 01:13:53 -0000 1.2
@@ -5,7 +5,7 @@
(specifically, for the Quatech SPP-100 EPP card: other cards will
probably require driver tweaks)
- parport_cs.c 1.20 2000/11/02 23:15:05
+ parport_cs.c 1.24 2001/10/13 14:04:05
The contents of this file are subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file
@@ -57,32 +57,31 @@
#include <pcmcia/cisreg.h>
#include <pcmcia/ciscode.h>
-#ifdef PCMCIA_DEBUG
-static int pc_debug = PCMCIA_DEBUG;
-MODULE_PARM(pc_debug, "i");
-#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
-static char *version =
-"parport_cs.c 1.20 2000/11/02 23:15:05 (David Hinds)";
-#else
-#define DEBUG(n, args...)
-#endif
+/*====================================================================*/
-#ifndef VERSION
-#define VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
-#endif
+/* Module parameters */
-/*====================================================================*/
+MODULE_AUTHOR("David Hinds <da...@us...>");
+MODULE_DESCRIPTION("PCMCIA parallel port card driver");
+MODULE_LICENSE("Dual MPL/GPL");
-/* Parameters that can be set with 'insmod' */
+#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i")
/* Bit map of interrupts to choose from */
-static u_int irq_mask = 0xdeb8;
+INT_MODULE_PARM(irq_mask, 0xdeb8);
static int irq_list[4] = { -1 };
-static int epp_mode = 1;
-
-MODULE_PARM(irq_mask, "i");
MODULE_PARM(irq_list, "1-4i");
-MODULE_PARM(epp_mode, "i");
+
+INT_MODULE_PARM(epp_mode, 1);
+
+#ifdef PCMCIA_DEBUG
+INT_MODULE_PARM(pc_debug, PCMCIA_DEBUG);
+#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
+static char *version =
+"parport_cs.c 1.24 2001/10/13 14:04:05 (David Hinds)";
+#else
+#define DEBUG(n, args...)
+#endif
/*====================================================================*/
@@ -105,9 +104,6 @@
static dev_info_t dev_info = "parport_cs";
static dev_link_t *dev_list = NULL;
-extern struct parport_operations parport_pc_ops;
-static struct parport_operations parport_cs_ops;
-
/*====================================================================*/
static void cs_error(client_handle_t handle, int func, int ret)
@@ -307,19 +303,6 @@
goto failed;
}
-#if (LINUX_VERSION_CODE < VERSION(2,3,6))
-#if (LINUX_VERSION_CODE >= VERSION(2,2,8))
- p->private_data = kmalloc(sizeof(struct parport_pc_private),
- GFP_KERNEL);
- ((struct parport_pc_private *)(p->private_data))->ctr = 0x0c;
-#endif
- parport_proc_register(p);
- p->flags |= PARPORT_FLAG_COMA;
- parport_pc_write_econtrol(p, 0x00);
- parport_pc_write_control(p, 0x0c);
- parport_pc_write_data(p, 0x00);
-#endif
-
p->modes |= PARPORT_MODE_PCSPP;
if (epp_mode)
p->modes |= PARPORT_MODE_TRISTATE | PARPORT_MODE_EPP;
@@ -365,14 +348,8 @@
if (info->ndev) {
struct parport *p = info->port;
-#if (LINUX_VERSION_CODE < VERSION(2,3,6))
- if (!(p->flags & PARPORT_FLAG_COMA))
- parport_quiesce(p);
-#endif
parport_proc_unregister(p);
-#if (LINUX_VERSION_CODE >= VERSION(2,2,8))
kfree(p->private_data);
-#endif
parport_unregister_port(p);
}
info->ndev = 0;
@@ -430,24 +407,6 @@
/*====================================================================*/
-#if (LINUX_VERSION_CODE < VERSION(2,3,6))
-
-static void inc_use_count(void)
-{
- MOD_INC_USE_COUNT;
- parport_pc_ops.inc_use_count();
-}
-
-static void dec_use_count(void)
-{
- MOD_DEC_USE_COUNT;
- parport_pc_ops.dec_use_count();
-}
-
-#endif
-
-/*====================================================================*/
-
static int __init init_parport_cs(void)
{
servinfo_t serv;
@@ -459,13 +418,6 @@
return -1;
}
-#if (LINUX_VERSION_CODE < VERSION(2,3,6))
- /* This is to protect against unloading modules out of order */
- parport_cs_ops = parport_pc_ops;
- parport_cs_ops.inc_use_count = &inc_use_count;
- parport_cs_ops.dec_use_count = &dec_use_count;
-#endif
-
register_pccard_driver(&dev_info, &parport_attach, &parport_detach);
return 0;
}
@@ -480,4 +432,3 @@
module_init(init_parport_cs);
module_exit(exit_parport_cs);
-MODULE_LICENSE("Dual MPL/GPL");
Index: parport_pc.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/parport/parport_pc.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- parport_pc.c 9 Apr 2002 16:45:52 -0000 1.2
+++ parport_pc.c 10 Jun 2003 01:13:53 -0000 1.3
@@ -91,7 +91,9 @@
} superios[NR_SUPERIOS] __devinitdata = { {0,},};
static int user_specified __devinitdata = 0;
+#if defined(CONFIG_PARPORT_PC_FIFO) || defined(CONFIG_PARPORT_PC_SUPERIO)
static int verbose_probing;
+#endif
static int registered_parport;
/* frob_control, but for ECR */
@@ -1780,6 +1782,7 @@
return ok;
}
+#ifdef CONFIG_PARPORT_PC_FIFO
static int __devinit parport_ECP_supported(struct parport *pb)
{
int i;
@@ -1905,6 +1908,7 @@
return 1;
}
+#endif
static int __devinit parport_ECPPS2_supported(struct parport *pb)
{
@@ -2004,7 +2008,9 @@
/* Don't bother probing for modes we know we won't use. */
static int __devinit parport_PS2_supported(struct parport *pb) { return 0; }
+#ifdef CONFIG_PARPORT_PC_FIFO
static int __devinit parport_ECP_supported(struct parport *pb) { return 0; }
+#endif
static int __devinit parport_EPP_supported(struct parport *pb) { return 0; }
static int __devinit parport_ECPEPP_supported(struct parport *pb){return 0;}
static int __devinit parport_ECPPS2_supported(struct parport *pb){return 0;}
@@ -2453,9 +2459,8 @@
ite8872set = 0x64e00000;
break;
case 0x6:
- printk (KERN_INFO "parport_pc: ITE8873 found (1S1P)\n");
- ite8872set = 0x64a00000;
- break;
+ printk (KERN_INFO "parport_pc: ITE8873 found (1S)\n");
+ return 0;
case 0x8:
DPRINTK (KERN_DEBUG "parport_pc: ITE8874 found (2S)\n");
return 0;
@@ -3007,7 +3012,7 @@
static int io[PARPORT_PC_MAX_PORTS+1] = { [0 ... PARPORT_PC_MAX_PORTS] = 0 };
static int io_hi[PARPORT_PC_MAX_PORTS+1] =
{ [0 ... PARPORT_PC_MAX_PORTS] = PARPORT_IOHI_AUTO };
-static int dmaval[PARPORT_PC_MAX_PORTS] = { [0 ... PARPORT_PC_MAX_PORTS-1] = PARPORT_DMA_AUTO };
+static int dmaval[PARPORT_PC_MAX_PORTS] = { [0 ... PARPORT_PC_MAX_PORTS-1] = PARPORT_DMA_NONE };
static int irqval[PARPORT_PC_MAX_PORTS] = { [0 ... PARPORT_PC_MAX_PORTS-1] = PARPORT_IRQ_PROBEONLY };
static const char *irq[PARPORT_PC_MAX_PORTS] = { NULL, };
static const char *dma[PARPORT_PC_MAX_PORTS] = { NULL, };
@@ -3024,8 +3029,10 @@
MODULE_PARM(irq, "1-" __MODULE_STRING(PARPORT_PC_MAX_PORTS) "s");
MODULE_PARM_DESC(dma, "DMA channel");
MODULE_PARM(dma, "1-" __MODULE_STRING(PARPORT_PC_MAX_PORTS) "s");
-MODULE_PARM(verbose_probing, "i");
+#if defined(CONFIG_PARPORT_PC_FIFO) || defined(CONFIG_PARPORT_PC_SUPERIO)
MODULE_PARM_DESC(verbose_probing, "Log chit-chat during initialisation");
+MODULE_PARM(verbose_probing, "i");
+#endif
int init_module(void)
{
Index: parport_serial.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/parport/parport_serial.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- parport_serial.c 9 Apr 2002 16:45:52 -0000 1.1
+++ parport_serial.c 10 Jun 2003 01:13:54 -0000 1.2
@@ -331,7 +331,7 @@
name: "parport_serial",
id_table: parport_serial_pci_tbl,
probe: parport_serial_pci_probe,
- remove: parport_serial_pci_remove,
+ remove: __devexit_p(parport_serial_pci_remove),
};
|