2004-08-20 Marcel Telka <marcel@telka.sk>

* src/tap/Makefile.am (libtap_a_SOURCES): Added cable/lattice.c.
	* src/tap/cable.c (cable_drivers): Added lattice_cable_driver (patch 1012138, Jerome Debard).
	* src/tap/cable/lattice.c: New file (patch 1012138, Jerome Debard).


git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@609 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Marcel Telka 21 years ago
parent 45c4c56644
commit 516caa46b0

@ -1,3 +1,9 @@
2004-08-20 Marcel Telka <marcel@telka.sk>
* src/tap/Makefile.am (libtap_a_SOURCES): Added cable/lattice.c.
* src/tap/cable.c (cable_drivers): Added lattice_cable_driver (patch 1012138, Jerome Debard).
* src/tap/cable/lattice.c: New file (patch 1012138, Jerome Debard).
2004-08-19 Marcel Telka <marcel@telka.sk>
* src/bus/Makefile.am (libbus_a_SOURCES): Added tx4925.c (patch 972625, Andrew Dyer).

@ -14,6 +14,7 @@ See libbrux/NEWS for more news.
- Motorola MPC824x
- AMD Alchemy Solutions Au1500 (patch 853883, Zhang Wei)
- Toshiba TX4925 (patch 972625, Andrew Dyer)
* Added support for Lattice Parallel Port JTAG Cable (patch 1012138, Jerome Debard).
* Added new command 'salias'.
* Explicit 'detectflash' command call is required before 'flashmem' command.
* Fixed minor bugs (including bug 857039).

@ -36,6 +36,7 @@ JTAG adapters/cables (see 'help cable' command for more info):
- ETC EA253 JTAG Cable
- ETC EI012 JTAG Cable
- Keith & Koep JTAG Cable
- Lattice Parallel Port JTAG Cable
- Mpcbdm JTAG Cable
- Ka-Ro TRITON (PXA255/250) JTAG Cable
- Macraigor Wiggler JTAG Cable

@ -6,6 +6,7 @@ Beregnyei Balazs
Martin Buck
Ian Campbell
Alex (d18c7db)
Jerome Debard
Rainer Dörken
Andrew Dyer
Chris Ellec

@ -42,6 +42,7 @@ libtap_a_SOURCES = \
cable/ea253.c \
cable/ei012.c \
cable/keithkoep.c \
cable/lattice.c \
cable/mpcbdm.c \
cable/triton.c \
cable/wiggler.c

@ -37,6 +37,7 @@ extern cable_driver_t dlc5_cable_driver;
extern cable_driver_t ea253_cable_driver;
extern cable_driver_t ei012_cable_driver;
extern cable_driver_t keithkoep_cable_driver;
extern cable_driver_t lattice_cable_driver;
extern cable_driver_t mpcbdm_cable_driver;
extern cable_driver_t triton_cable_driver;
extern cable_driver_t wiggler_cable_driver;
@ -50,6 +51,7 @@ cable_driver_t *cable_drivers[] = {
&ea253_cable_driver,
&ei012_cable_driver,
&keithkoep_cable_driver,
&lattice_cable_driver,
&mpcbdm_cable_driver,
&triton_cable_driver,
&wiggler_cable_driver,

@ -0,0 +1,102 @@
/*
* $Id$
*
* Lattice Parallel Port Download Cable Driver
* Copyright (C) 2002, 2003 ETC s.r.o.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* Written by Marcel Telka <marcel@telka.sk>, 2002, 2003.
*
*/
#include "sysdep.h"
#include "cable.h"
#include "parport.h"
#include "chain.h"
#include "generic.h"
/*
* 0 - STROBE (pin 1)
* 1 - AUTOFD (pin 14)
* 2 - INIT (pin 16)
* 3 - SELECT (pin 17)
* data D[7:0] (pins 9:2)
* 7 - BUSY (pin 11)
* 6 - ACK (pin 10)
* 5 - PE (pin 12)
* 4 - SEL (pin 13)
* 3 - ERROR (pin 15)
*/
#define TDI 0
#define TCK 1
#define TMS 2
#define TRST 4
#define TDO 6
static int
lattice_init( cable_t *cable )
{
if (parport_open( cable->port ))
return -1;
PARAM_TRST(cable) = 1;
return 0;
}
static void
lattice_clock( cable_t *cable, int tms, int tdi )
{
tms = tms ? 1 : 0;
tdi = tdi ? 1 : 0;
parport_set_data( cable->port, (0 << TCK) | (tms << TMS) | (tdi << TDI) | (1 << TRST) );
cable_wait();
parport_set_data( cable->port, (1 << TCK) | (tms << TMS) | (tdi << TDI) | (1 << TRST) );
cable_wait();
}
static int
lattice_get_tdo( cable_t *cable )
{
parport_set_data( cable->port, (0 << TCK) | (1 << TRST) );
cable_wait();
return (parport_get_status( cable->port ) >> TDO) & 1;
}
static int
lattice_set_trst( cable_t *cable, int trst )
{
return parport_set_data( cable->port, trst << TRST );
}
cable_driver_t lattice_cable_driver = {
"Lattice",
N_("Lattice Parallel Port JTAG Cable"),
generic_connect,
generic_disconnect,
generic_cable_free,
lattice_init,
generic_done,
lattice_clock,
lattice_get_tdo,
lattice_set_trst,
generic_get_trst
};
Loading…
Cancel
Save