Notify which bus is active when a new bus is initialized

(Jon Smirl)


git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1463 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Arnim Läuger 16 years ago
parent 1491071e98
commit 3023f02171

@ -1,5 +1,8 @@
2009-03-26 Arnim Laeuger <arniml>
* src/cmd/initbus.c: Notify which bus is active when a new bus is initialized
(Jon Smirl)
* src/bus/mpc5200.c, THANKS: Support the MUX parameter on the mpc5200
local bus for hardware (Jon Smirl)

@ -54,14 +54,21 @@ cmd_initbus_run( chain_t *chain, 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( chain, bus_drivers[i], params );
if (bus == NULL) {
bus_t *abus = bus_drivers[i]->new_bus( chain, bus_drivers[i], params );
if (abus == NULL) {
printf( _("bus alloc/attach failed!\n") );
return 1;
}
buses_add( bus );
if (bus_init( bus ) != URJTAG_STATUS_OK)
buses_add( abus );
if (bus_init( abus ) != URJTAG_STATUS_OK)
printf( _("bus initialization failed!\n") );
for (i = 0; i < buses.len; i++)
if (buses.buses[i] == bus)
break;
if (i != buses.len - 1)
printf( _("Initialized bus %d, active bus %d\n"), buses.len - 1, i );
return 1;
}
}

Loading…
Cancel
Save