diff --git a/jtag/ChangeLog b/jtag/ChangeLog index 028186b5..1b67fa67 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,33 @@ +2008-01-08 Arnim Laeuger + + * src/bus/prototype.c: new prototype bus driver (Detrick Martin) + * src/bus/zefant-xs3.c (zefant_xs3_bus_new): API extension: cmd_params for new_bus() + * src/bus/sharc21065l.c (sharc_21065L_bus_new): API extension + * src/bus/jopcyc.c (jopcyc_bus_new): API extension + * src/bus/tx4925.c (tx4925_bus_new): API extension + * src/bus/slsup3.c (slsup3_bus_new): API extension + * src/bus/sh7751r.c (sh7751r_bus_new): API extension + * src/bus/sh7750r.c (sh7750r_bus_new): API extension + * src/bus/sh7727.c (sh7727_bus_new): API extension + * src/bus/s3c4510x.c (s3c4510_bus_new): API extension + * src/bus/sa1110.c (sa1110_bus_new): API extension + * src/bus/pxa2x0.c (pxa2x0_bus_new): API extension + (pxa27x_bus_new): API extension + * src/bus/ppc405ep.c (ppc405ep_bus_new): API extension + * src/bus/ppc440gx_ebc8.c (ppc440gx_ebc8_bus_new): API extension + * src/bus/mpc5200.c (mpc5200_bus_new): API extension + * src/bus/mpc824x.c (mpc824x_bus_new): API extension + * src/bus/lh7a400.c (lh7a400_bus_new): API extension + * src/bus/ixp425.c (ixp425_bus_new): API extension + * src/bus/bf533_ezkit.c (bf533_ezkit_bus_new): API extension + * src/bus/bf533_stamp.c (bf533_stamp_bus_new): API extension + * src/bus/ejtag.c (ejtag_bus_new): API extension + * src/bus/bcm1250.c (bcm1250_bus_new): API extension + * src/bus/au1500.c (au1500_bus_new): API extension + * src/bus/Makefile.am (libbus_a_SOURCES): added prototype.c + * src/bus/buses.c: added prototype_bus (Detrick Martin) + * src/cmd/initbus.c (cmd_initbus_run): hand down command parameters to bus_new() + 2008-01-06 Arnim Laeuger * src/tap/cable/wiggler.c (wiggler_connect): enable bit<->pin mapping from parameter string diff --git a/jtag/NEWS b/jtag/NEWS index f520345e..6fa028e3 100644 --- a/jtag/NEWS +++ b/jtag/NEWS @@ -5,6 +5,8 @@ Also see libbrux/NEWS for more news, especially regarding the flash support. urjtag-n/a * Integration of BSDL parser (Arnim Laeuger) + * New and updated bus drivers + - Prototype bus driver (Detrick Martin) * New and updated cable drivers - Vision EP9307 GPIO (Hartley Sweeten) * Added new JTAG declarations for diff --git a/jtag/THANKS b/jtag/THANKS index 70c4109b..5cf6d1da 100644 --- a/jtag/THANKS +++ b/jtag/THANKS @@ -33,6 +33,7 @@ Guennadi Liakhovetski Lesly A. M Raphael Mack Trevor Man +Detrick Martin Andreas Mohr Jani Monoses Tony K Nadackal diff --git a/jtag/inclow/ChangeLog b/jtag/inclow/ChangeLog index 699246ce..c19fa3d9 100644 --- a/jtag/inclow/ChangeLog +++ b/jtag/inclow/ChangeLog @@ -1,3 +1,7 @@ +2008-01-08 Arnim Laeuger + + * brux/bus.h: new_bus gets command parameters to enable configuration from comamnd lien + 2007-12-02 17:56 kawk * openwince "include" package moved into "jtag" (now named "inclow") diff --git a/jtag/inclow/brux/bus.h b/jtag/inclow/brux/bus.h index f0d5c4cc..1dbb0508 100644 --- a/jtag/inclow/brux/bus.h +++ b/jtag/inclow/brux/bus.h @@ -49,7 +49,7 @@ typedef struct bus bus_t; typedef struct bus_driver { const char *name; const char *description; - bus_t *(*new_bus)( void ); + bus_t *(*new_bus)( char *cmd_params[] ); void (*free_bus)( bus_t *bus ); void (*printinfo)( bus_t *bus ); void (*prepare)( bus_t *bus ); diff --git a/jtag/src/bus/Makefile.am b/jtag/src/bus/Makefile.am index 71d11d35..bf98a017 100644 --- a/jtag/src/bus/Makefile.am +++ b/jtag/src/bus/Makefile.am @@ -39,6 +39,7 @@ libbus_a_SOURCES = \ mpc5200.c \ ppc440gx_ebc8.c \ ppc405ep.c \ + prototype.c \ pxa2x0.c \ sa1110.c \ s3c4510x.c \ diff --git a/jtag/src/bus/au1500.c b/jtag/src/bus/au1500.c index cb9b1de7..0c40ccb5 100644 --- a/jtag/src/bus/au1500.c +++ b/jtag/src/bus/au1500.c @@ -114,7 +114,7 @@ setup_data( bus_t *bus, uint32_t d) part_set_signal( p, RD[i], 1, ( d>>i ) & 1 ); } -static bus_t *au1500_bus_new(void) +static bus_t *au1500_bus_new( char *cmd_params[] ) { bus_t *bus; char buff[10]; diff --git a/jtag/src/bus/bcm1250.c b/jtag/src/bus/bcm1250.c index c465e56b..d7cd5296 100644 --- a/jtag/src/bus/bcm1250.c +++ b/jtag/src/bus/bcm1250.c @@ -268,7 +268,7 @@ bcm1250_bus_free( bus_t *bus ) free( bus ); } -static bus_t *bcm1250_bus_new( void ); +static bus_t *bcm1250_bus_new( char *cmd_params[] ); const bus_driver_t bcm1250_bus = { "bcm1250", @@ -287,7 +287,7 @@ const bus_driver_t bcm1250_bus = { }; static bus_t * -bcm1250_bus_new( void ) +bcm1250_bus_new( char *cmd_params[] ) { bus_t *bus; char buff[10]; diff --git a/jtag/src/bus/bf533_ezkit.c b/jtag/src/bus/bf533_ezkit.c index 4a3d4cf3..fc98fce7 100644 --- a/jtag/src/bus/bf533_ezkit.c +++ b/jtag/src/bus/bf533_ezkit.c @@ -252,7 +252,7 @@ bf533_ezkit_bus_free( bus_t *bus ) free( bus ); } -static bus_t *bf533_ezkit_bus_new( void ); +static bus_t *bf533_ezkit_bus_new( char *cmd_params[] ); const bus_driver_t bf533_ezkit_bus = { "bf533_ezkit", @@ -270,7 +270,7 @@ const bus_driver_t bf533_ezkit_bus = { }; static bus_t * -bf533_ezkit_bus_new( void ) +bf533_ezkit_bus_new( char *cmd_params[] ) { bus_t *bus; char buff[15]; diff --git a/jtag/src/bus/bf533_stamp.c b/jtag/src/bus/bf533_stamp.c index d56c9070..bb866e0b 100644 --- a/jtag/src/bus/bf533_stamp.c +++ b/jtag/src/bus/bf533_stamp.c @@ -252,7 +252,7 @@ bf533_stamp_bus_free( bus_t *bus ) free( bus ); } -static bus_t *bf533_stamp_bus_new( void ); +static bus_t *bf533_stamp_bus_new( char *cmd_params[] ); const bus_driver_t bf533_stamp_bus = { "bf533_stamp", @@ -270,7 +270,7 @@ const bus_driver_t bf533_stamp_bus = { }; static bus_t * -bf533_stamp_bus_new( void ) +bf533_stamp_bus_new( char *cmd_params[] ) { bus_t *bus; char buff[15]; diff --git a/jtag/src/bus/buses.c b/jtag/src/bus/buses.c index 573b860f..b09109d7 100644 --- a/jtag/src/bus/buses.c +++ b/jtag/src/bus/buses.c @@ -41,6 +41,7 @@ const bus_driver_t *bus_drivers[] = { &mpc5200_bus, &ppc440gx_ebc8_bus, &ppc405ep_bus, + &prototype_bus, &pxa2x0_bus, &pxa27x_bus, &s3c4510_bus, diff --git a/jtag/src/bus/buses.h b/jtag/src/bus/buses.h index 1817b76b..4b57b853 100644 --- a/jtag/src/bus/buses.h +++ b/jtag/src/bus/buses.h @@ -36,6 +36,7 @@ extern const bus_driver_t mpc824x_bus; extern const bus_driver_t mpc5200_bus; extern const bus_driver_t ppc440gx_ebc8_bus; extern const bus_driver_t ppc405ep_bus; +extern const bus_driver_t prototype_bus; extern const bus_driver_t pxa2x0_bus; extern const bus_driver_t pxa27x_bus; extern const bus_driver_t s3c4510_bus; diff --git a/jtag/src/bus/ejtag.c b/jtag/src/bus/ejtag.c index 1f33e813..5f3df2a0 100644 --- a/jtag/src/bus/ejtag.c +++ b/jtag/src/bus/ejtag.c @@ -449,7 +449,7 @@ ejtag_bus_free( bus_t *bus ) free( bus ); } -static bus_t *ejtag_bus_new( void ); +static bus_t *ejtag_bus_new( char *cmd_params[] ); const bus_driver_t ejtag_bus = { "ejtag", @@ -467,7 +467,7 @@ const bus_driver_t ejtag_bus = { }; static bus_t * -ejtag_bus_new( void ) +ejtag_bus_new( char *cmd_params[] ) { bus_t *bus; diff --git a/jtag/src/bus/ixp425.c b/jtag/src/bus/ixp425.c index 67f22ef0..4f750d8f 100644 --- a/jtag/src/bus/ixp425.c +++ b/jtag/src/bus/ixp425.c @@ -231,7 +231,7 @@ ixp425_bus_free( bus_t *bus ) free( bus ); } -static bus_t *ixp425_bus_new( void ); +static bus_t *ixp425_bus_new( char *cmd_params[] ); const bus_driver_t ixp425_bus = { "ixp425", @@ -250,7 +250,7 @@ const bus_driver_t ixp425_bus = { }; static bus_t * -ixp425_bus_new( void ) +ixp425_bus_new( char *cmd_params[] ) { bus_t *bus; char buff[15]; diff --git a/jtag/src/bus/jopcyc.c b/jtag/src/bus/jopcyc.c index 1a006905..2a24acda 100644 --- a/jtag/src/bus/jopcyc.c +++ b/jtag/src/bus/jopcyc.c @@ -500,7 +500,7 @@ attach_sig( bus_t *bus, signal_t **sig, char *id ) } static bus_t * -jopcyc_bus_new( void ) +jopcyc_bus_new( char *cmd_params[] ) { bus_t *bus; int failed = 0; diff --git a/jtag/src/bus/lh7a400.c b/jtag/src/bus/lh7a400.c index 2131eac4..e04c4ba1 100644 --- a/jtag/src/bus/lh7a400.c +++ b/jtag/src/bus/lh7a400.c @@ -257,7 +257,7 @@ lh7a400_bus_free( bus_t *bus ) free( bus ); } -static bus_t *lh7a400_bus_new( void ); +static bus_t *lh7a400_bus_new( char *cmd_params[] ); const bus_driver_t lh7a400_bus = { "lh7a400", @@ -276,7 +276,7 @@ const bus_driver_t lh7a400_bus = { }; static bus_t * -lh7a400_bus_new( void ) +lh7a400_bus_new( char *cmd_params[] ) { bus_t *bus; char buff[10]; diff --git a/jtag/src/bus/mpc5200.c b/jtag/src/bus/mpc5200.c index 0abb6a52..774bc907 100644 --- a/jtag/src/bus/mpc5200.c +++ b/jtag/src/bus/mpc5200.c @@ -243,7 +243,7 @@ mpc5200_bus_free( bus_t *bus ) } static bus_t * -mpc5200_bus_new( void ) +mpc5200_bus_new( char *cmd_params[] ) { bus_t *bus; char buff[10]; diff --git a/jtag/src/bus/mpc824x.c b/jtag/src/bus/mpc824x.c index 8673f6e3..386251e7 100644 --- a/jtag/src/bus/mpc824x.c +++ b/jtag/src/bus/mpc824x.c @@ -270,7 +270,7 @@ mpc824x_bus_free( bus_t *bus ) } static bus_t * -mpc824x_bus_new( void ) +mpc824x_bus_new( char *cmd_params[] ) { bus_t *bus; char buff[10]; diff --git a/jtag/src/bus/ppc405ep.c b/jtag/src/bus/ppc405ep.c index 54fd5c19..52d2d11e 100644 --- a/jtag/src/bus/ppc405ep.c +++ b/jtag/src/bus/ppc405ep.c @@ -216,7 +216,7 @@ ppc405ep_bus_free( bus_t *bus ) free( bus ); } -static bus_t *ppc405ep_bus_new( void ); +static bus_t *ppc405ep_bus_new( char *cmd_params[] ); const bus_driver_t ppc405ep_bus = { "ppc405ep", @@ -234,7 +234,7 @@ const bus_driver_t ppc405ep_bus = { }; static bus_t * -ppc405ep_bus_new( void ) +ppc405ep_bus_new( char *cmd_params[] ) { bus_t *bus; char buff[10]; diff --git a/jtag/src/bus/ppc440gx_ebc8.c b/jtag/src/bus/ppc440gx_ebc8.c index 458ac297..7b6c65e1 100644 --- a/jtag/src/bus/ppc440gx_ebc8.c +++ b/jtag/src/bus/ppc440gx_ebc8.c @@ -214,7 +214,7 @@ ppc440gx_ebc8_bus_free( bus_t *bus ) free( bus ); } -static bus_t *ppc440gx_ebc8_bus_new( void ); +static bus_t *ppc440gx_ebc8_bus_new( char *cmd_params[] ); const bus_driver_t ppc440gx_ebc8_bus = { "ppc440gx_ebc8", @@ -233,7 +233,7 @@ const bus_driver_t ppc440gx_ebc8_bus = { }; static bus_t * -ppc440gx_ebc8_bus_new( void ) +ppc440gx_ebc8_bus_new( char *cmd_params[] ) { bus_t *bus; char buff[10]; diff --git a/jtag/src/bus/pxa2x0.c b/jtag/src/bus/pxa2x0.c index d4316338..19e062df 100644 --- a/jtag/src/bus/pxa2x0.c +++ b/jtag/src/bus/pxa2x0.c @@ -606,8 +606,8 @@ pxa2xx_bus_free( bus_t *bus ) free( bus ); } -static bus_t *pxa2x0_bus_new( void ); -static bus_t *pxa27x_bus_new( void ); +static bus_t *pxa2x0_bus_new( char *cmd_params[] ); +static bus_t *pxa27x_bus_new( char *cmd_params[] ); const bus_driver_t pxa2x0_bus = { "pxa2x0", @@ -753,7 +753,7 @@ pxa2xx_bus_new_common(bus_t * bus) } static bus_t * -pxa2x0_bus_new( void ) +pxa2x0_bus_new( char *cmd_params[] ) { bus_t *bus; int failed = 0; @@ -790,7 +790,7 @@ pxa2x0_bus_new( void ) } static bus_t * -pxa27x_bus_new( void ) +pxa27x_bus_new( char *cmd_params[] ) { bus_t *bus; int failed = 0; diff --git a/jtag/src/bus/s3c4510x.c b/jtag/src/bus/s3c4510x.c index 6b6d6811..918c89aa 100644 --- a/jtag/src/bus/s3c4510x.c +++ b/jtag/src/bus/s3c4510x.c @@ -308,7 +308,7 @@ s3c4510_bus_free( bus_t *bus ) free( bus ); } -static bus_t *s3c4510_bus_new( void ); +static bus_t *s3c4510_bus_new( char *cmd_params[] ); const bus_driver_t s3c4510_bus = { "s3c4510x", @@ -327,7 +327,7 @@ const bus_driver_t s3c4510_bus = { }; static bus_t * -s3c4510_bus_new( void ) +s3c4510_bus_new( char *cmd_params[] ) { bus_t *bus; char buff[10]; diff --git a/jtag/src/bus/sa1110.c b/jtag/src/bus/sa1110.c index 2cf5ca27..dc00ddc8 100644 --- a/jtag/src/bus/sa1110.c +++ b/jtag/src/bus/sa1110.c @@ -245,7 +245,7 @@ sa1110_bus_free( bus_t *bus ) free( bus ); } -static bus_t *sa1110_bus_new( void ); +static bus_t *sa1110_bus_new( char *cmd_params[] ); const bus_driver_t sa1110_bus = { "sa1110", @@ -264,7 +264,7 @@ const bus_driver_t sa1110_bus = { }; static bus_t * -sa1110_bus_new( void ) +sa1110_bus_new( char *cmd_params[] ) { bus_t *bus; char buff[10]; diff --git a/jtag/src/bus/sh7727.c b/jtag/src/bus/sh7727.c index 93cd7fc9..6fd86630 100644 --- a/jtag/src/bus/sh7727.c +++ b/jtag/src/bus/sh7727.c @@ -277,7 +277,7 @@ sh7727_bus_free( bus_t *bus ) free( bus ); } -static bus_t *sh7727_bus_new( void ); +static bus_t *sh7727_bus_new( char *cmd_params[] ); const bus_driver_t sh7727_bus = { "sh7727", @@ -296,7 +296,7 @@ const bus_driver_t sh7727_bus = { }; static bus_t * -sh7727_bus_new( void ) +sh7727_bus_new( char *cmd_params[] ) { bus_t *bus; char buff[10]; diff --git a/jtag/src/bus/sh7750r.c b/jtag/src/bus/sh7750r.c index 678bb59a..217e801c 100644 --- a/jtag/src/bus/sh7750r.c +++ b/jtag/src/bus/sh7750r.c @@ -259,7 +259,7 @@ sh7750r_bus_free( bus_t *bus ) free( bus ); } -static bus_t *sh7750r_bus_new( void ); +static bus_t *sh7750r_bus_new( char *cmd_params[] ); const bus_driver_t sh7750r_bus = { "sh7750r", @@ -278,7 +278,7 @@ const bus_driver_t sh7750r_bus = { }; static bus_t * -sh7750r_bus_new( void ) +sh7750r_bus_new( char *cmd_params[] ) { bus_t *bus; char buff[10]; diff --git a/jtag/src/bus/sh7751r.c b/jtag/src/bus/sh7751r.c index 4eefcac2..284e146a 100644 --- a/jtag/src/bus/sh7751r.c +++ b/jtag/src/bus/sh7751r.c @@ -252,7 +252,7 @@ sh7751r_bus_free( bus_t *bus ) free( bus ); } -static bus_t *sh7751r_bus_new( void ); +static bus_t *sh7751r_bus_new( char *cmd_params[] ); const bus_driver_t sh7751r_bus = { "sh7751r", @@ -271,7 +271,7 @@ const bus_driver_t sh7751r_bus = { }; static bus_t * -sh7751r_bus_new( void ) +sh7751r_bus_new( char *cmd_params[] ) { bus_t *bus; char buff[10]; diff --git a/jtag/src/bus/sharc21065l.c b/jtag/src/bus/sharc21065l.c index ca388166..022dcae3 100644 --- a/jtag/src/bus/sharc21065l.c +++ b/jtag/src/bus/sharc21065l.c @@ -258,7 +258,7 @@ static void sharc_21065L_bus_free( bus_t *bus ) free( bus ); } -static bus_t *sharc_21065L_bus_new( void ); +static bus_t *sharc_21065L_bus_new( char *cmd_params[] ); const bus_driver_t sharc_21065L_bus = { "SHARC_21065L", @@ -276,7 +276,7 @@ const bus_driver_t sharc_21065L_bus = { }; -static bus_t *sharc_21065L_bus_new( void ) +static bus_t *sharc_21065L_bus_new( char *cmd_params[] ) { bus_t *bus; char buff[15]; diff --git a/jtag/src/bus/slsup3.c b/jtag/src/bus/slsup3.c index 35c67217..b019b317 100644 --- a/jtag/src/bus/slsup3.c +++ b/jtag/src/bus/slsup3.c @@ -356,7 +356,7 @@ slsup3_bus_free( bus_t *bus ) } static bus_t * -slsup3_bus_new( void ) +slsup3_bus_new( char *cmd_params[] ) { bus_t *bus; char buff[10]; diff --git a/jtag/src/bus/tx4925.c b/jtag/src/bus/tx4925.c index f3112b46..5a4cfdc6 100644 --- a/jtag/src/bus/tx4925.c +++ b/jtag/src/bus/tx4925.c @@ -249,7 +249,7 @@ tx4925_bus_free( bus_t *bus ) free( bus ); } -static bus_t *tx4925_bus_new( void ); +static bus_t *tx4925_bus_new( char *cmd_params[] ); const bus_driver_t tx4925_bus = { "tx4925", @@ -269,7 +269,7 @@ const bus_driver_t tx4925_bus = { static bus_t * -tx4925_bus_new( void ) +tx4925_bus_new( char *cmd_params[] ) { bus_t *bus; char buff[15]; diff --git a/jtag/src/bus/zefant-xs3.c b/jtag/src/bus/zefant-xs3.c index 613f3762..d5b6e6f4 100644 --- a/jtag/src/bus/zefant-xs3.c +++ b/jtag/src/bus/zefant-xs3.c @@ -723,7 +723,7 @@ attach_sig( bus_t *bus, signal_t **sig, char *id ) } static bus_t * -zefant_xs3_bus_new( void ) +zefant_xs3_bus_new( char *cmd_params[] ) { bus_t *bus; int failed = 0; diff --git a/jtag/src/cmd/initbus.c b/jtag/src/cmd/initbus.c index c93bc9d0..b9ce8205 100644 --- a/jtag/src/cmd/initbus.c +++ b/jtag/src/cmd/initbus.c @@ -36,7 +36,7 @@ cmd_initbus_run( char *params[] ) { int i; - if (cmd_params( params ) != 2) + if (cmd_params( params ) < 2) return -1; if (!cmd_test_cable()) @@ -54,7 +54,7 @@ cmd_initbus_run( char *params[] ) for (i = 0; bus_drivers[i] != NULL; i++) { if (strcasecmp( bus_drivers[i]->name, params[1] ) == 0) { - bus_t *bus = bus_drivers[i]->new_bus(); + bus_t *bus = bus_drivers[i]->new_bus( params ); if (bus == NULL) { printf( _("bus initialization failed!\n") ); return 1;