[ 1984813 ] Bus driver cleanup

generic_bus_prepare function for all bus drivers that just load the EXTEST instruction
(Hartley Sweeten)


git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1286 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Arnim Läuger 17 years ago
parent 0da5bdae87
commit db1dd386f7

@ -1,3 +1,18 @@
2008-06-21 Arnim Laeuger <arniml@users.sourceforge.net>
* src/bus/bf548_ezkit.c, src/bus/fjmem.c, src/bus/ppc405ep.c,
src/bus/sh7727.c, src/bus/prototype.c, src/bus/sa1110.c,
src/bus/ppc440gx_ebc8.c, src/bus/tx4925.c, src/bus/sh7750r.c,
src/bus/pxa2x0.c, src/bus/bf533_stamp.c, src/bus/bf533_ezkit.c,
src/bus/bf537_stamp.c, src/bus/ixp425.c, src/bus/h7202.c,
src/bus/mpc824x.c, src/bus/bcm1250.c, src/bus/sharc21065l.c,
src/bus/au1500.c, src/bus/lh7a400.c, src/bus/sh7751r.c,
src/bus/generic_bus.c, src/bus/mpc5200.c, src/bus/bf561_ezkit.c,
src/bus/slsup3.c, src/bus/generic_bus.h:
[ 1984813 ] Bus driver cleanup, generic_bus_prepare function for
all bus drivers that just load the EXTEST instruction
(Hartley Sweeten)
2008-06-18 Arnim Laeuger <arniml@users.sourceforge.net>
* include/bus_driver.h, src/bus/bf548_ezkit.c, src/bus/fjmem.c,

@ -126,17 +126,6 @@ au1500_bus_printinfo( bus_t *bus)
printf( _("AU1500 compatible bus driver via BSR (JTAG part No. %d)\n"), i );
}
/**
* bus->driver->(*prepare)
*
*/
static void
au1500_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
/**
* bus->driver->(*area)
*
@ -309,7 +298,7 @@ const bus_driver_t au1500_bus = {
au1500_bus_new,
generic_bus_free,
au1500_bus_printinfo,
au1500_bus_prepare,
generic_bus_prepare_extest,
au1500_bus_area,
au1500_bus_read_start,
au1500_bus_read_next,

@ -120,17 +120,6 @@ bcm1250_bus_printinfo( bus_t *bus )
printf( _("Broadcom BCM1250 compatible bus driver via BSR (JTAG part No. %d)\n"), i );
}
/**
* bus->driver->(*prepare)
*
*/
static void
bcm1250_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
/**
* bus->driver->(*area)
*
@ -500,7 +489,7 @@ const bus_driver_t bcm1250_bus = {
bcm1250_bus_new,
generic_bus_free,
bcm1250_bus_printinfo,
bcm1250_bus_prepare,
generic_bus_prepare_extest,
bcm1250_bus_area,
bcm1250_bus_read_start,
bcm1250_bus_read_next,

@ -143,17 +143,6 @@ bf533_ezkit_bus_printinfo( bus_t *bus )
printf( _("Blackfin BF533 EZKit compatible bus driver via BSR (JTAG part No. %d)\n"), i );
}
/**
* bus->driver->(*prepare)
*
*/
static void
bf533_ezkit_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
/**
* bus->driver->(*area)
*
@ -336,7 +325,7 @@ const bus_driver_t bf533_ezkit_bus = {
bf533_ezkit_bus_new,
generic_bus_free,
bf533_ezkit_bus_printinfo,
bf533_ezkit_bus_prepare,
generic_bus_prepare_extest,
bf533_ezkit_bus_area,
bf533_ezkit_bus_read_start,
bf533_ezkit_bus_read_next,

@ -144,17 +144,6 @@ bf533_stamp_bus_printinfo( bus_t *bus )
printf( _("Blackfin BF533 compatible bus driver via BSR (JTAG part No. %d)\n"), i );
}
/**
* bus->driver->(*prepare)
*
*/
static void
bf533_stamp_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
/**
* bus->driver->(*area)
*
@ -337,7 +326,7 @@ const bus_driver_t bf533_stamp_bus = {
bf533_stamp_bus_new,
generic_bus_free,
bf533_stamp_bus_printinfo,
bf533_stamp_bus_prepare,
generic_bus_prepare_extest,
bf533_stamp_bus_area,
bf533_stamp_bus_read_start,
bf533_stamp_bus_read_next,

@ -127,17 +127,6 @@ bf537_stamp_bus_new_1( chain_t *chain, char *cmd_params[] )
return bus;
}
/**
* bus->driver->(*prepare)
*
*/
static void
bf537_stamp_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
/**
* bus->driver->(*area)
*
@ -351,7 +340,7 @@ const bus_driver_t bf537_stamp_bus = {
bf537_stamp_bus_new,
generic_bus_free,
bf537_stamp_bus_printinfo,
bf537_stamp_bus_prepare,
generic_bus_prepare_extest,
bf537_stamp_bus_area,
bf537_stamp_bus_read_start,
bf537_stamp_bus_read_next,
@ -400,7 +389,7 @@ const bus_driver_t bf537_ezkit_bus = {
bf537_ezkit_bus_new,
generic_bus_free,
bf537_ezkit_bus_printinfo,
bf537_stamp_bus_prepare,
generic_bus_prepare_extest,
bf537_stamp_bus_area,
bf537_stamp_bus_read_start,
bf537_stamp_bus_read_next,
@ -449,7 +438,7 @@ const bus_driver_t bf527_ezkit_bus = {
bf527_ezkit_bus_new,
generic_bus_free,
bf527_ezkit_bus_printinfo,
bf537_stamp_bus_prepare,
generic_bus_prepare_extest,
bf537_stamp_bus_area,
bf537_stamp_bus_read_start,
bf537_stamp_bus_read_next,

@ -142,17 +142,6 @@ bf548_ezkit_bus_printinfo( bus_t *bus )
printf( _("Blackfin BF548 EZ-KIT compatible bus driver via BSR (JTAG part No. %d)\n"), i );
}
/**
* bus->driver->(*prepare)
*
*/
static void
bf548_ezkit_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
/**
* bus->driver->(*area)
*
@ -325,7 +314,7 @@ const bus_driver_t bf548_ezkit_bus = {
bf548_ezkit_bus_new,
generic_bus_free,
bf548_ezkit_bus_printinfo,
bf548_ezkit_bus_prepare,
generic_bus_prepare_extest,
bf548_ezkit_bus_area,
bf548_ezkit_bus_read_start,
bf548_ezkit_bus_read_next,

@ -147,17 +147,6 @@ bf561_ezkit_bus_printinfo( bus_t *bus )
printf( _("Blackfin BF561 EZ-KIT compatible bus driver via BSR (JTAG part No. %d)\n"), i );
}
/**
* bus->driver->(*prepare)
*
*/
static void
bf561_ezkit_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
/**
* bus->driver->(*area)
*
@ -348,7 +337,7 @@ const bus_driver_t bf561_ezkit_bus = {
bf561_ezkit_bus_new,
generic_bus_free,
bf561_ezkit_bus_printinfo,
bf561_ezkit_bus_prepare,
generic_bus_prepare_extest,
bf561_ezkit_bus_area,
bf561_ezkit_bus_read_start,
bf561_ezkit_bus_read_next,

@ -480,12 +480,9 @@ fjmem_bus_printinfo( bus_t *bus )
static void
fjmem_bus_prepare( bus_t *bus )
{
part_t *p = PART;
chain_t *chain = CHAIN;
/* ensure FJMEM_INST is active */
part_set_instruction( p, FJMEM_INST_NAME );
chain_shift_instructions( chain );
part_set_instruction( PART, FJMEM_INST_NAME );
chain_shift_instructions( CHAIN );
}
static int

@ -53,6 +53,17 @@ generic_bus_free( bus_t *bus )
free( bus );
}
/**
* bus->driver->(*prepare)
*
*/
void
generic_bus_prepare_extest( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
/**
* bus->driver->(*read)
*

@ -30,6 +30,7 @@
int generic_bus_attach_sig( part_t *part, signal_t **sig, char *id );
void generic_bus_free( bus_t *bus );
void generic_bus_prepare_extest( bus_t *bus );
uint32_t generic_bus_read( bus_t *bus, uint32_t adr );
#endif /* GENERIC_BUS_H */

@ -124,17 +124,6 @@ h7202_bus_printinfo( bus_t *bus )
printf( "H7202 compatible bus driver via BSR (JTAG part No. %d)\n", i );
}
/**
* bus->driver->(*prepare)
*
*/
static void
h7202_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
/**
* bus->driver->(*area)
*
@ -309,7 +298,7 @@ const bus_driver_t h7202_bus = {
h7202_bus_new,
generic_bus_free,
h7202_bus_printinfo,
h7202_bus_prepare,
generic_bus_prepare_extest,
h7202_bus_area,
h7202_bus_read_start,
h7202_bus_read_next,

@ -121,17 +121,6 @@ ixp425_bus_printinfo( bus_t *bus )
printf( _("Intel IXP425 compatible bus driver via BSR (JTAG part No. %d)\n"), i );
}
/**
* bus->driver->(*prepare)
*
*/
static void
ixp425_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
/**
* bus->driver->(*area)
*
@ -303,7 +292,7 @@ const bus_driver_t ixp425_bus = {
ixp425_bus_new,
generic_bus_free,
ixp425_bus_printinfo,
ixp425_bus_prepare,
generic_bus_prepare_extest,
ixp425_bus_area,
ixp425_bus_read_start,
ixp425_bus_read_next,

@ -142,17 +142,6 @@ lh7a400_bus_printinfo( bus_t *bus )
printf( _("Sharp LH7A400 compatible bus driver via BSR (JTAG part No. %d)\n"), i );
}
/**
* bus->driver->(*prepare)
*
*/
static void
lh7a400_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
/**
* bus->driver->(*area)
*
@ -332,7 +321,7 @@ const bus_driver_t lh7a400_bus = {
lh7a400_bus_new,
generic_bus_free,
lh7a400_bus_printinfo,
lh7a400_bus_prepare,
generic_bus_prepare_extest,
lh7a400_bus_area,
lh7a400_bus_read_start,
lh7a400_bus_read_next,

@ -127,17 +127,6 @@ mpc5200_bus_printinfo( bus_t *bus )
printf( _("Freescale MPC5200 compatible bus driver via BSR (JTAG part No. %d)\n"), i );
}
/**
* bus->driver->(*prepare)
*
*/
static void
mpc5200_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
/**
* bus->driver->(*area)
*
@ -313,7 +302,7 @@ const bus_driver_t mpc5200_bus = {
mpc5200_bus_new,
generic_bus_free,
mpc5200_bus_printinfo,
mpc5200_bus_prepare,
generic_bus_prepare_extest,
mpc5200_bus_area,
mpc5200_bus_read_start,
mpc5200_bus_read_next,

@ -235,17 +235,6 @@ mpc824x_bus_printinfo( bus_t *bus )
printf( _("Motorola MPC824x compatible bus driver via BSR (JTAG part No. %d)\n"), i );
}
/**
* bus->driver->(*prepare)
*
*/
static void
mpc824x_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
/**
* bus->driver->(*area)
*
@ -525,7 +514,7 @@ const bus_driver_t mpc824x_bus = {
mpc824x_bus_new,
generic_bus_free,
mpc824x_bus_printinfo,
mpc824x_bus_prepare,
generic_bus_prepare_extest,
mpc824x_bus_area,
mpc824x_bus_read_start,
mpc824x_bus_read_next,

@ -116,17 +116,6 @@ ppc405ep_bus_printinfo( bus_t *bus )
printf( _("IBM PowerPC 405EP compatible bus driver via BSR (JTAG part No. %d)\n"), i );
}
/**
* bus->driver->(*prepare)
*
*/
static void
ppc405ep_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
/**
* bus->driver->(*area)
*
@ -279,7 +268,7 @@ const bus_driver_t ppc405ep_bus = {
ppc405ep_bus_new,
generic_bus_free,
ppc405ep_bus_printinfo,
ppc405ep_bus_prepare,
generic_bus_prepare_extest,
ppc405ep_bus_area,
ppc405ep_bus_read_start,
ppc405ep_bus_read_next,

@ -118,17 +118,6 @@ ppc440gx_ebc8_bus_printinfo( bus_t *bus )
printf( _("IBM PowerPC 440GX 8-bit compatible bus driver via BSR (JTAG part No. %d)\n"), i );
}
/**
* bus->driver->(*prepare)
*
*/
static void
ppc440gx_ebc8_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
/**
* bus->driver->(*area)
*
@ -281,7 +270,7 @@ const bus_driver_t ppc440gx_ebc8_bus = {
ppc440gx_ebc8_bus_new,
generic_bus_free,
ppc440gx_ebc8_bus_printinfo,
ppc440gx_ebc8_bus_prepare,
generic_bus_prepare_extest,
ppc440gx_ebc8_bus_area,
ppc440gx_ebc8_bus_read_start,
ppc440gx_ebc8_bus_read_next,

@ -283,17 +283,6 @@ prototype_bus_printinfo( bus_t *bus )
printf( _("Configurable prototype bus driver via BSR (JTAG part No. %d)\n"), i );
}
/**
* bus->driver->(*prepare)
*
*/
static void
prototype_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
/**
* bus->driver->(*area)
*
@ -450,7 +439,7 @@ const bus_driver_t prototype_bus = {
prototype_bus_new,
generic_bus_free,
prototype_bus_printinfo,
prototype_bus_prepare,
generic_bus_prepare_extest,
prototype_bus_area,
prototype_bus_read_start,
prototype_bus_read_next,

@ -372,8 +372,7 @@ pxa2xx_bus_prepare( bus_t *bus )
{
(void)pxa2xx_bus_init( bus );
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
generic_bus_prepare_extest( bus );
}
/**

@ -128,17 +128,6 @@ sa1110_bus_printinfo( bus_t *bus )
printf( _("Intel SA-1110 compatible bus driver via BSR (JTAG part No. %d)\n"), i );
}
/**
* bus->driver->(*prepare)
*
*/
static void
sa1110_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
/**
* bus->driver->(*area)
*
@ -317,7 +306,7 @@ const bus_driver_t sa1110_bus = {
sa1110_bus_new,
generic_bus_free,
sa1110_bus_printinfo,
sa1110_bus_prepare,
generic_bus_prepare_extest,
sa1110_bus_area,
sa1110_bus_read_start,
sa1110_bus_read_next,

@ -138,17 +138,6 @@ sh7727_bus_printinfo( bus_t *bus )
printf( _("Hitachi SH7727 compatible bus driver via BSR (JTAG part No. %d)\n"), i );
}
/**
* bus->driver->(*prepare)
*
*/
static void
sh7727_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
/**
* bus->driver->(*area)
*
@ -358,7 +347,7 @@ const bus_driver_t sh7727_bus = {
sh7727_bus_new,
generic_bus_free,
sh7727_bus_printinfo,
sh7727_bus_prepare,
generic_bus_prepare_extest,
sh7727_bus_area,
sh7727_bus_read_start,
sh7727_bus_read_next,

@ -136,17 +136,6 @@ sh7750r_bus_printinfo( bus_t *bus )
printf( _("Hitachi SH7750R compatible bus driver via BSR (JTAG part No. %d)\n"), i );
}
/**
* bus->driver->(*prepare)
*
*/
static void
sh7750r_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
/**
* bus->driver->(*area)
*
@ -340,7 +329,7 @@ const bus_driver_t sh7750r_bus = {
sh7750r_bus_new,
generic_bus_free,
sh7750r_bus_printinfo,
sh7750r_bus_prepare,
generic_bus_prepare_extest,
sh7750r_bus_area,
sh7750r_bus_read_start,
sh7750r_bus_read_next,

@ -130,17 +130,6 @@ sh7751r_bus_printinfo( bus_t *bus )
printf( _("Hitachi SH7751R compatible bus driver via BSR (JTAG part No. %d)\n"), i );
}
/**
* bus->driver->(*prepare)
*
*/
static void
sh7751r_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
/**
* bus->driver->(*area)
*
@ -328,7 +317,7 @@ const bus_driver_t sh7751r_bus = {
sh7751r_bus_new,
generic_bus_free,
sh7751r_bus_printinfo,
sh7751r_bus_prepare,
generic_bus_prepare_extest,
sh7751r_bus_area,
sh7751r_bus_read_start,
sh7751r_bus_read_next,

@ -123,17 +123,6 @@ static void sharc_21065L_bus_printinfo( bus_t *bus )
printf( _("Analog Device's SHARC 21065L compatible bus driver via BSR (JTAG part No. %d)\n"), i );
}
/**
* bus->driver->(*prepare)
*
*/
static void
sharc_21065L_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
/**
* bus->driver->(*area)
*
@ -321,7 +310,7 @@ const bus_driver_t sharc_21065L_bus = {
sharc_21065L_bus_new,
generic_bus_free,
sharc_21065L_bus_printinfo,
sharc_21065L_bus_prepare,
generic_bus_prepare_extest,
sharc_21065L_bus_area,
sharc_21065L_bus_read_start,
sharc_21065L_bus_read_next,

@ -167,17 +167,6 @@ slsup3_bus_printinfo( bus_t *bus )
printf( _("SLS UP3 bus driver via BSR (JTAG part No. %d)\n"), i );
}
/**
* bus->driver->(*prepare)
*
*/
static void
slsup3_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
/**
* bus->driver->(*area)
*
@ -435,7 +424,7 @@ const bus_driver_t slsup3_bus = {
slsup3_bus_new,
generic_bus_free,
slsup3_bus_printinfo,
slsup3_bus_prepare,
generic_bus_prepare_extest,
slsup3_bus_area,
slsup3_bus_read_start,
slsup3_bus_read_next,

@ -140,17 +140,6 @@ tx4925_bus_printinfo( bus_t *bus )
printf( _("Toshiba TX4925 compatible bus driver via BSR (JTAG part No. %d)\n"), i );
}
/**
* bus->driver->(*prepare)
*
*/
static void
tx4925_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
/**
* bus->driver->(*area)
*
@ -323,7 +312,7 @@ const bus_driver_t tx4925_bus = {
tx4925_bus_new,
generic_bus_free,
tx4925_bus_printinfo,
tx4925_bus_prepare,
generic_bus_prepare_extest,
tx4925_bus_area,
tx4925_bus_read_start,
tx4925_bus_read_next,

Loading…
Cancel
Save