Removed code for "setdevice" command (introduced in #741)

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@853 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Kolja Waschk 17 years ago
parent 960621b05a
commit a224cab4b0

@ -429,6 +429,10 @@ example usage.
*signal*:: define new signal for a part
*svf*:: execute svf commands from file
Some tools derived from the same openwince JTAG Tools code base as UrJTAG
know additional commands, which are not supported in UrJTAG. See the section
about "Unsupported commands", below, about workarounds.
==== Basic commands ====
===== quit =====
@ -516,18 +520,16 @@ Detects devices on the bus. Example:
Stepping: C0
Filename: /usr/local/share/jtag/intel/pxa250/pxa250c0
===== setdevice =====
//From README_21065L
==== Unsupported commands ====
This command is currently only there to support the SHARC 21065L processor,
which has no IDCODE.
===== setdevice =====
In jtag prompt type command "setdevice sharc21065L", now the mode changes to
SHARC 21065L specific. Note that this mode works only with SHARC 21065L
processor. If you want to try another device, please restart the JTAG tool.
This command was only there to support the SHARC 21065L processor,
which has no IDCODE and therefore can't be initialized correctly by
just running "detect". However, the proper initialization can be done
after "detect" by loading the proper declarations and bus driver manually:
jtag> setdevice sharc21065L
Device is set to SHARC 21065L
jtag> include analog/sharc21065l/sharc21065l
//========================================================================

@ -41,6 +41,5 @@ noinst_HEADERS = \
jtag.h \
tap.h \
fclock.h \
setdevice.h \
svf.h \
xpcu.h

@ -1,10 +0,0 @@
#define AUTO_DETECT 0
#define SHARC_21065L 0x327A70CB //should be the dummy device id
typedef struct
{
unsigned long deviceID;
unsigned long flash;
unsigned short algorithm;
unsigned short unlock_bypass;
}forced_detection_t;

@ -27,8 +27,7 @@ SUBDIRS = po
noinst_HEADERS = \
sysdep.h \
gettext.h \
setdevice.h
gettext.h
EXTRA_DIST = \
Makefile.rules

@ -40,7 +40,6 @@
#include <brux/bus.h>
#include <brux/cfi.h>
#include "setdevice.h"
//write specific
#define AMD_SECTOR_PROTECTED
@ -67,8 +66,13 @@
#define AMD_BYPASS_UNLOCK_MODE 1
#define AMD_STANDARD_MODE 0
forced_detection_t var_forced_detection;
struct
{
unsigned long flash;
unsigned short algorithm;
unsigned short unlock_bypass;
}
var_forced_detection;
int amd_detect(bus_t *bus, uint32_t adr, cfi_array_t **cfi_array );
static int amd_29xx040_autodetect( cfi_array_t *cfi_array );

@ -1,10 +0,0 @@
#define AUTO_DETECT 0
#define SHARC_21065L 0x327A70CB //should be the dummy device id
typedef struct
{
unsigned long deviceID;
unsigned long flash;
unsigned short algorithm;
unsigned short unlock_bypass;
}forced_detection_t;

@ -56,7 +56,6 @@ libcmd_a_SOURCES = \
script.c \
include.c \
cmd.c \
setdevice.c \
svf.c
INCLUDES = -DJTAG_DATA_DIR=\"$(pkgdatadir)\"

@ -65,7 +65,6 @@ extern cmd_t cmd_script;
extern cmd_t cmd_include;
extern cmd_t cmd_svf;
extern cmd_t cmd_debug;
extern cmd_t cmd_setdevice;
const cmd_t *cmds[] = {
&cmd_quit,
@ -102,7 +101,6 @@ const cmd_t *cmds[] = {
&cmd_include,
&cmd_svf,
&cmd_debug,
&cmd_setdevice,
NULL /* last must be NULL */
};

@ -1,104 +0,0 @@
/*
* $Id: setdevice.c,v 1.0 20/09/2006 12:38:01 $
*
* Copyright (C) 2006 Kila Medical Systems.
*
* 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 Ajith Kumar P.C <ajithpc@kila.com>
*
*/
#include "sysdep.h"
#include <stdio.h>
#include <string.h>
#include "jtag.h"
#include "cmd.h"
#include "bus.h"
#include "setdevice.h"
extern chain_t *chain;
extern forced_detection_t var_forced_detection;
static int cmd_setdevice_run( char *params[] )
{
if(cmd_params(params) != 2)
return -1;
if (strcasecmp( params[1], "sharc21065L" ) == 0)
{
#if 0
buses_free();
parts_free( chain->parts );
chain->parts = NULL;
#endif
var_forced_detection.deviceID = SHARC_21065L;
printf( _("Device is set to SHARC 21065L\n") );
}
#if 0
else
{
buses_free();
parts_free( chain->parts );
chain->parts = NULL;
var_forced_detection.deviceID = AUTO_DETECT;
printf( _("Automatic Device selection\n") );
}
#endif
#if 1
else
{
if(var_forced_detection.deviceID == SHARC_21065L)
{
printf( _("Support is only for SHARC 21065L\n") );
printf( _("If you want to try another device:\n") );
printf( _("\tPlease restart the JTAG tool\n\n") );
}
else
{
var_forced_detection.deviceID = AUTO_DETECT;
//printf( _("Supports devices which posses device ID\n") );
printf( _("If you want to try SHARC 21065L, type command:\n") );
printf( _("\tsetdevice sharc21065L \n\n") );
}
}
#endif
return 1;
}
static void cmd_setdevice_help( void )
{
printf( _("Provision for supporting devices which do not have device ID\n"
"Usage: %s sharc21065L\n"
"\t For setting to SHARC Processor\n"
#if 0
"Or %s auto\n"
"\t For auto selection of the device\n"
"Default is Auto Selection\n"
#endif
),"setdevice" );
}
cmd_t cmd_setdevice = {
"setdevice",
N_("Provision for supporting devices which do not have device ID\n"),
cmd_setdevice_help,
cmd_setdevice_run
};

@ -19,7 +19,6 @@
* 02111-1307, USA.
*
* Written by Marcel Telka <marcel@telka.sk>, 2002.
* Modified by Ajith Kumar P.C <ajithpc@kila.com>, 20/09/2006.
*
*/
@ -40,9 +39,6 @@
#include "jtag.h"
#include "setdevice.h"
extern forced_detection_t var_forced_detection;
struct id_record {
char name[20];
char fullname[100];
@ -266,28 +262,6 @@ detect_parts( chain_t *chain, char *db_path )
printf( _("Device Id: %s (0x%016lX)\n"), register_get_string( did ), bits_to_uint64(did) );
if (var_forced_detection.deviceID != AUTO_DETECT)
{
const char *tmp_id_data;
did = id;
switch(var_forced_detection.deviceID)
{
case SHARC_21065L:
printf("\n\n\tAttention !!!!: This mode supports only SHARC 21065L\n\n");
break;
default:
break;
}
tmp_id_data = register_get_string( did );
for( i=0; i<32; i++)
{
did->data[i] = ((var_forced_detection.deviceID >> i) & 1) ? 1 : 0;
}
tmp_id_data = register_get_string( did );
printf(" Dummy device ID : %s\n ",tmp_id_data);
}
part = part_alloc( did );
if (part == NULL) {
printf( _("Out of memory\n") );

@ -496,22 +496,6 @@ main( int argc, const char **argv )
if(!norc) go = jtag_parse_rc();
if (go) {
/* ajk: always run "setdevice auto" command */
char **s;
s = malloc(25*sizeof(char));
if (!s)
{
free( s );
printf( _("Out of memory\n") );
}
else
{
s[0] = "setdevice";
s[1] = "auto";
s[2] = NULL;
cmd_run(s);
free(s);
}
#ifdef HAVE_READLINE_HISTORY
/* Load history */

Loading…
Cancel
Save