2003-02-14 Marcel Telka <marcel@telka.sk>

* src/cfi.c (detect_cfi): Added support for 1 x 16 bit flash configuration (Christian
		Pellegrin).
	* src/detect.c (find_record): Added error message if file cannot be opened (Christian
		Pellegrin).


git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@351 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Marcel Telka 22 years ago
parent 5ce6019aee
commit 4e2c69c38b

@ -1,3 +1,10 @@
2003-02-14 Marcel Telka <marcel@telka.sk>
* src/cfi.c (detect_cfi): Added support for 1 x 16 bit flash configuration (Christian
Pellegrin).
* src/detect.c (find_record): Added error message if file cannot be opened (Christian
Pellegrin).
2003-02-14 Marcel Telka <marcel@telka.sk>
* data/xilinx/xc2c256-tq144/xc2c256-tq144: Added JTAG declarations for Xilinx

@ -9,6 +9,7 @@ $Id$
* Added JTAG declarations for Intel IXP425 (Christian Pellegrin).
* Added bus driver for Intel IXP425 (Christian Pellegrin).
* Added JTAG declarations for Xilinx XC2C256-TQ144 (Alessandro Zummo).
* Added support for 1 x 16 bit flash memory detection (Christian Pellegrin).
jtag-0.2.2 (2003-02-04):

@ -34,6 +34,9 @@
#include "bus.h"
/* function to cover 2x16 and 1x16 modes */
#define BW16(x) ( (bus_width(ps) == 16) ? x : ( (x<<16) | x ) )
static uint16_t
read2( parts *ps, uint32_t adr, int o )
{
@ -51,24 +54,25 @@ detect_cfi( parts *ps )
int o = 2;
uint32_t tmp;
/* TODO: 2 x 16 bit only */
if (bus_width(ps) == 16)
o = 1;
/* detect CFI capable devices - see Table 1 in [1] */
bus_write( ps, CFI_CMD_QUERY_OFFSET << o, (CFI_CMD_QUERY << 16) | CFI_CMD_QUERY );
if (bus_read( ps, CFI_QUERY_ID_OFFSET << o ) != (('Q' << 16) | 'Q')) {
bus_write( ps, CFI_CMD_QUERY_OFFSET << o, BW16(CFI_CMD_QUERY) );
if (bus_read( ps, CFI_QUERY_ID_OFFSET << o ) != BW16('Q')) {
printf( "No CFI device detected (Q)!\n" );
return NULL;
}
if (bus_read( ps, (CFI_QUERY_ID_OFFSET + 1) << o ) != (('R' << 16) | 'R')) {
if (bus_read( ps, (CFI_QUERY_ID_OFFSET + 1) << o ) != BW16('R')) {
printf( "No CFI device detected (R)!\n" );
return NULL;
}
if (bus_read( ps, (CFI_QUERY_ID_OFFSET + 2) << o ) != (('Y' << 16) | 'Y')) {
if (bus_read( ps, (CFI_QUERY_ID_OFFSET + 2) << o ) != BW16('Y')) {
printf( "No CFI device detected (Y)!\n" );
return NULL;
}
printf( "\n2 x 16 bit CFI devices detected (QRY ok)!\n\n" );
printf( "\n%d x 16 bit CFI devices detected (QRY ok)!\n\n", o);
cfi = malloc( sizeof *cfi );
if (!cfi)

@ -47,8 +47,10 @@ find_record( char *filename, tap_register *key, struct id_record *idr )
int r = 0;
file = fopen( filename, "r" );
if (!file)
if (!file) {
printf( "Cannot open %s\n", filename );
return 0;
}
tr = register_alloc( key->len );

Loading…
Cancel
Save