2003-05-30 Marcel Telka <marcel@telka.sk>

* src/tap/parport/direct.c (direct_set_control): Inverted SELECT, AUTOFD, and STROBE
		signals (bug 745824).
	* src/tap/parport/ppdev.c (ppdev_set_control): Ditto.
	* src/tap/cable/mpcbdm.c (mpcbdm_init, mpcbdm_set_trst): Changed (inverted) TRST handling.
	(mpcbdm_clock, mpcbdm_get_tdo): Removed TRST setting.


git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@451 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Marcel Telka 22 years ago
parent 6ad846a272
commit 3a79e71598

@ -1,3 +1,11 @@
2003-05-30 Marcel Telka <marcel@telka.sk>
* src/tap/parport/direct.c (direct_set_control): Inverted SELECT, AUTOFD, and STROBE
signals (bug 745824).
* src/tap/parport/ppdev.c (ppdev_set_control): Ditto.
* src/tap/cable/mpcbdm.c (mpcbdm_init, mpcbdm_set_trst): Changed (inverted) TRST handling.
(mpcbdm_clock, mpcbdm_get_tdo): Removed TRST setting.
2003-05-29 Marcel Telka <marcel@telka.sk>
Version 0.4 released.

@ -1,5 +1,7 @@
$Id$
* Fixed bug with SELECT, AUTOFD, and STROBE signals handling (bug 745824).
jtag-0.4 (2003-05-29):
* Added support for executing scripts directly from stdin (parameter '-').

@ -45,8 +45,9 @@
/*
* control
*/
#define TRST 1
#define TRST1 3
#define HRESET 3 /* the signal is inverted by cable hardware */
#define SRESET 1 /* the signal is inverted by cable hardware */
#define TRST 0 /* the signal is inverted by cable hardware */
/*
* status
@ -59,7 +60,7 @@ mpcbdm_init( cable_t *cable )
if (parport_open( cable->port ))
return -1;
parport_set_control( cable->port, (1 << TRST) | (1 << TRST1) );
parport_set_control( cable->port, 0 << TRST );
PARAM_TRST(cable) = 1;
return 0;
@ -72,10 +73,8 @@ mpcbdm_clock( cable_t *cable, int tms, int tdi )
tdi = tdi ? 1 : 0;
parport_set_data( cable->port, (0 << TCK) | (tms << TMS) | (tdi << TDI) );
parport_set_control( cable->port, (PARAM_TRST(cable) << TRST) | (PARAM_TRST(cable) << TRST1) );
cable_wait();
parport_set_data( cable->port, (1 << TCK) | (tms << TMS) | (tdi << TDI) );
parport_set_control( cable->port, (PARAM_TRST(cable) << TRST) | (PARAM_TRST(cable) << TRST1) );
cable_wait();
}
@ -83,7 +82,6 @@ static int
mpcbdm_get_tdo( cable_t *cable )
{
parport_set_data( cable->port, 0 << TCK );
parport_set_control( cable->port, (PARAM_TRST(cable) << TRST) | (PARAM_TRST(cable) << TRST1) );
cable_wait();
return (parport_get_status( cable->port ) >> TDO) & 1;
}
@ -93,7 +91,7 @@ mpcbdm_set_trst( cable_t *cable, int trst )
{
PARAM_TRST(cable) = trst ? 1 : 0;
parport_set_control( cable->port, (PARAM_TRST(cable) << TRST) | (PARAM_TRST(cable) << TRST1) );
parport_set_control( cable->port, (PARAM_TRST(cable) ^ 1) << TRST );
return PARAM_TRST(cable);
}

@ -248,7 +248,7 @@ static int
direct_set_control( parport_t *parport, uint8_t data )
{
unsigned int port = ((direct_params_t *) parport->params)->port;
outb( data, port + 2 );
outb( data ^ 0x0B, port + 2 ); /* SELECT, AUTOFD, and STROBE are inverted */
return 0;
}

@ -229,6 +229,8 @@ ppdev_set_control( parport_t *parport, uint8_t data )
{
ppdev_params_t *p = parport->params;
data ^= 0x0B; /* SELECT, AUTOFD, and STROBE are inverted */
if (ioctl( p->fd, PPWCONTROL, &data ) == -1)
return -1;

Loading…
Cancel
Save