2003-09-05 Marcel Telka <marcel@telka.sk>
* include/bus.h (bus_drivers): Added constant declaration. (new_sa1110_bus, new_pxa250_bus, new_ixp425_bus, new_sh7727_bus, new_sh7750r_bus, new_sh7751r_bus) (new_bcm1250_bus): Function declarations removed. * src/bus/buses.c (bus_drivers): New constant definition. * src/bus/buses.h: New file. * src/bus/Makefile.am (libbus_a_SOURCES): Added buses.h. * src/bus/bcm1250.c (bcm1250_bus_printinfo): Added new function parameter 'bus'. (bcm1250_bus): Changed structure type to bus_driver_t. Changed members. (new_bcm1250_bus): Function renamed ... (bcm1250_bus_new): ... to this one. Changed parameter list to void (and function body updated). * src/bus/ixp425.c (ixp425_bus_printinfo): Added new function parameter 'bus'. (ixp425_bus): Changed structure type to bus_driver_t. Changed members. (new_ixp425_bus): Function renamed ... (ixp425_bus_new): ... to this one. Changed parameter list to void (and function body updated). * src/bus/pxa2x0.c (pxa2x0_bus_printinfo): Added new function parameter 'bus'. (pxa250_bus): Structure transformed ... (pxa2x0_bus): ... to this constant (changed type to bus_driver_t, changed members). (new_pxa250_bus): Function renamed ... (pxa2x0_bus_new): ... to this one. Changed parameter list to void (and function body updated). * src/bus/s3c4510x.c (s3c4510_bus_printinfo): Added new function parameter 'bus'. (s3c4510_bus): Changed structure type to bus_driver_t. Changed members. (new_s3c4510_bus): Function renamed ... (s3c4510_bus_new): ... to this one. Changed parameter list to void (and function body updated). * src/bus/sa1110.c (sa1110_bus_printinfo): Added new function parameter 'bus'. (sa1110_bus): Changed structure type to bus_driver_t. Changed members. (new_sa1110_bus): Function renamed ... (sa1110_bus_new): ... to this one. Changed parameter list to void (and function body updated). * src/bus/sh7727.c (sh7727_bus_printinfo): Added new function parameter 'bus'. (sh7727_bus): Changed structure type to bus_driver_t. Changed members. (new_sh7727_bus): Function renamed ... (sh7727_bus_new): ... to this one. Changed parameter list to void (and function body updated). * src/bus/sh7750r.c (sh7750r_bus_printinfo): Added new function parameter 'bus'. (sh7750r_bus): Changed structure type to bus_driver_t. Changed members. (new_sh7750r_bus): Function renamed ... (sh7750r_bus_new): ... to this one. Changed parameter list to void (and function body updated). * src/bus/sh7751r.c (sh7751r_bus_printinfo): Added new function parameter 'bus'. (sh7751r_bus): Changed structure type to bus_driver_t. Changed members. (new_sh7751r_bus): Function renamed ... (sh7751r_bus_new): ... to this one. Changed parameter list to void (and function body updated). * src/cmd/cable.c (cmd_cable_run): Replaced bus->free() call with bus_free(). * src/jtag.c (main): Ditto. * src/cmd/cmd.c (cmds): Added cmd_initbus. * src/cmd/detect.c (cmd_detect_run): Removed explicit bus driver detection. * src/cmd/initbus.c: New file. * src/cmd/Makefile.am (libcmd_a_SOURCES): Added initbus.c. * data/broadcom/bcm1250/bcm1250: Added 'initbus' command call. * data/hitachi/sh7727/sh7727: Ditto. * data/intel/ixp425/ixp425: Ditto. * data/intel/pxa250/pxa250: Ditto. * data/intel/pxa250/pxa250c0: Ditto. * data/intel/sa1110/sa1110: Ditto. * data/samsung/s3c4510b/s3c4510b: Ditto. git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@558 b68d4a1b-bc3d-0410-92ed-d4ac073336b7master
parent
3c5ccb40ec
commit
b05cffa059
@ -1,7 +1,6 @@
|
||||
$Id$
|
||||
|
||||
* Write documentation.
|
||||
* Add 'initbus' command to allow dynamic bus driver loading.
|
||||
* Support for display the result of a boundary scan formated according to the CPU definitions (e.g. MA[0-26] = 0x00001c00).
|
||||
* Remove direct relation between JTAG instruction and data register (e.g. ARM7TDMI).
|
||||
* SVF player.
|
||||
|
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 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>, 2003.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef BUSES_H
|
||||
#define BUSES_H
|
||||
|
||||
extern const bus_driver_t bcm1250_bus;
|
||||
extern const bus_driver_t ixp425_bus;
|
||||
extern const bus_driver_t pxa2x0_bus;
|
||||
extern const bus_driver_t s3c4510_bus;
|
||||
extern const bus_driver_t sa1110_bus;
|
||||
extern const bus_driver_t sh7727_bus;
|
||||
extern const bus_driver_t sh7750r_bus;
|
||||
extern const bus_driver_t sh7751r_bus;
|
||||
|
||||
#endif /* BUSES_H */
|
@ -0,0 +1,95 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 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>, 2003.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "sysdep.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "cmd.h"
|
||||
#include "jtag.h"
|
||||
|
||||
static int
|
||||
cmd_initbus_run( char *params[] )
|
||||
{
|
||||
int i;
|
||||
|
||||
if (cmd_params( params ) != 2)
|
||||
return -1;
|
||||
|
||||
if (!cmd_test_cable())
|
||||
return 1;
|
||||
|
||||
if (!chain->parts) {
|
||||
printf( _("Run \"detect\" first.\n") );
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (chain->active_part >= chain->parts->len) {
|
||||
printf( _("%s: no active part\n"), "initbus" );
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (i = 0; bus_drivers[i] != NULL; i++) {
|
||||
if (strcmp( bus_drivers[i]->name, params[1] ) == 0) {
|
||||
bus_t *bus = bus_drivers[i]->new_bus();
|
||||
if (bus == NULL) {
|
||||
printf( _("bus initialization failed!\n") );
|
||||
return 1;
|
||||
}
|
||||
buses_add( bus );
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
printf( _("Unknown bus: %s\n"), params[1] );
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
cmd_initbus_help( void )
|
||||
{
|
||||
int i;
|
||||
|
||||
printf( _(
|
||||
"Usage: %s BUSNAME\n"
|
||||
"Initialize new bus driver for active part.\n"
|
||||
"\n"
|
||||
"BUSNAME Name of the bus\n"
|
||||
"\n"
|
||||
"List of available buses:\n"
|
||||
), "initbus" );
|
||||
|
||||
for (i = 0; bus_drivers[i] != NULL; i++)
|
||||
printf( _("%-10s %s\n"), bus_drivers[i]->name, bus_drivers[i]->description );
|
||||
}
|
||||
|
||||
const cmd_t cmd_initbus = {
|
||||
"initbus",
|
||||
N_("initialize bus driver for active part"),
|
||||
cmd_initbus_help,
|
||||
cmd_initbus_run
|
||||
};
|
Loading…
Reference in New Issue