On Thu, Nov 29, 2001 at 06:18:34PM +0100, Christophe DELAERE wrote:
> I've recompiled the kernel including parport and ppdev in the kernel and
> setting CONFIG_PARPORT_1284 on.
Okay. I don't know why IEEE1284_MODE_EPP isn't working, but I can see
why IEEE1284_MODE_EPPSWE might not. Could you try this patch please,
and see if it makes IEEE1284_MODE_SWE work with address transfers?
Thanks,
Tim.
*/
--- linux/drivers/parport/ieee1284_ops.c.epp Thu Nov 29 15:55:02 2001
+++ linux/drivers/parport/ieee1284_ops.c Thu Nov 29 17:55:15 2001
@@ -827,31 +827,37 @@
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);
+ /* Event 58: wait for busy (nWait) to go high */
if (parport_poll_peripheral (port, PARPORT_STATUS_BUSY,
PARPORT_STATUS_BUSY, 10))
break;
+ /* Event 59: set nAStrb high */
parport_frob_control (port, PARPORT_CONTROL_SELECT, 0);
+ /* Event 60: wait for busy (nWait) to go low */
if (parport_poll_peripheral (port, PARPORT_STATUS_BUSY, 0, 5))
break;
ret++;
}
+ /* Event 61: set strobe (nWrite) high */
parport_frob_control (port, PARPORT_CONTROL_STROBE, 0);
return ret;
@@ -866,24 +872,33 @@
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 */
+ /* Event 58: wait for Busy to go high */
if (parport_poll_peripheral (port, PARPORT_STATUS_BUSY,
- PARPORT_STATUS_BUSY, 10))
+ 0, 10))
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++;
-- 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 : Thu Nov 29 2001 - 12:57:40 EST