[ 1984813 ] Bus driver cleanup, second step of part 4) (Hartley Sweeten)

generic_bus_read() added


git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1278 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Arnim Läuger 17 years ago
parent 2ceeefb022
commit ae9798787d

@ -1,3 +1,19 @@
2008-06-10 Arnim Laeuger <arniml@users.sourceforge.net>
* src/bus/au1500.c, src/bus/avr32.c, src/bus/bcm1250.c,
src/bus/bf533_ezkit.c, src/bus/bf533_stamp.c, src/bus/bf537_stamp.c,
src/bus/bf548_ezkit.c, src/bus/bf561_ezkit.c, src/bus/ejtag.c,
src/bus/fjmem.c, src/bus/generic_bus.c, src/bus/generic_bus.h,
src/bus/h7202.c, src/bus/ixp425.c, src/bus/jopcyc.c,
src/bus/lh7a400.c, src/bus/mpc5200.c, src/bus/mpc824x.c,
src/bus/ppc405ep.c, src/bus/ppc440gx_ebc8.c, src/bus/prototype.c,
src/bus/pxa2x0.c, src/bus/s3c4510x.c, src/bus/sa1110.c,
src/bus/sh7727.c, src/bus/sh7750r.c, src/bus/sh7751r.c,
src/bus/sharc21065l.c, src/bus/slsup3.c, src/bus/tx4925.c,
src/bus/zefant-xs3.c:
[ 1984813 ] Bus driver cleanup, second step of part 4) (Hartley Sweeten)
generic_bus_read() added
2008-06-09 Arnim Laeuger <arniml@users.sourceforge.net>
* src/bus/bf548_ezkit.c, src/bus/fjmem.c, src/bus/ppc405ep.c,

@ -299,17 +299,6 @@ au1500_bus_read_end( bus_t *bus )
return get_data_out( bus );
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
au1500_bus_read( bus_t *bus, uint32_t adr )
{
au1500_bus_read_start( bus, adr );
return au1500_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -356,7 +345,7 @@ const bus_driver_t au1500_bus = {
au1500_bus_read_start,
au1500_bus_read_next,
au1500_bus_read_end,
au1500_bus_read,
generic_bus_read,
au1500_bus_write,
NULL
};

@ -735,21 +735,6 @@ avr32_bus_read_next (bus_t * bus, uint32_t addr)
return data;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
avr32_bus_read (bus_t * bus, uint32_t addr)
{
uint32_t ret;
avr32_bus_read_start (bus, addr);
ret = avr32_bus_read_end (bus);
return ret;
}
/**
* bus->driver->(*write)
*
@ -796,7 +781,7 @@ const bus_driver_t avr32_bus_driver = {
avr32_bus_read_start,
avr32_bus_read_next,
avr32_bus_read_end,
avr32_bus_read,
generic_bus_read,
avr32_bus_write,
NULL
};

@ -285,19 +285,6 @@ bcm1250_bus_read_end( bus_t *bus )
}
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
bcm1250_bus_read( bus_t *bus, uint32_t adr )
{
uint32_t i;
bcm1250_bus_read_start( bus, adr );
i=bcm1250_bus_read_end( bus );
return i;
}
/**
* bus->driver->(*write)
*
@ -543,7 +530,11 @@ const bus_driver_t bcm1250_bus = {
bcm1250_bus_read_start,
bcm1250_bus_read_next,
bcm1250_bus_read_end,
#ifndef USE_BCM_EJTAG
generic_bus_read,
#else
bcm1250_bus_read,
#endif
bcm1250_bus_write,
NULL
};

@ -355,17 +355,6 @@ bf533_ezkit_bus_read_end( bus_t *bus )
return d;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
bf533_ezkit_bus_read( bus_t *bus, uint32_t adr )
{
bf533_ezkit_bus_read_start( bus, adr );
return bf533_ezkit_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -404,7 +393,7 @@ const bus_driver_t bf533_ezkit_bus = {
bf533_ezkit_bus_read_start,
bf533_ezkit_bus_read_next,
bf533_ezkit_bus_read_end,
bf533_ezkit_bus_read,
generic_bus_read,
bf533_ezkit_bus_write,
NULL
};

@ -353,17 +353,6 @@ bf533_stamp_bus_read_end( bus_t *bus )
return d;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
bf533_stamp_bus_read( bus_t *bus, uint32_t adr )
{
bf533_stamp_bus_read_start( bus, adr );
return bf533_stamp_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -402,7 +391,7 @@ const bus_driver_t bf533_stamp_bus = {
bf533_stamp_bus_read_start,
bf533_stamp_bus_read_next,
bf533_stamp_bus_read_end,
bf533_stamp_bus_read,
generic_bus_read,
bf533_stamp_bus_write,
NULL
};

@ -339,17 +339,6 @@ bf537_stamp_bus_read_end( bus_t *bus )
return d;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
bf537_stamp_bus_read( bus_t *bus, uint32_t adr )
{
bf537_stamp_bus_read_start( bus, adr );
return bf537_stamp_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -419,7 +408,7 @@ const bus_driver_t bf537_stamp_bus = {
bf537_stamp_bus_read_start,
bf537_stamp_bus_read_next,
bf537_stamp_bus_read_end,
bf537_stamp_bus_read,
generic_bus_read,
bf537_stamp_bus_write,
NULL
};
@ -468,7 +457,7 @@ const bus_driver_t bf537_ezkit_bus = {
bf537_stamp_bus_read_start,
bf537_stamp_bus_read_next,
bf537_stamp_bus_read_end,
bf537_stamp_bus_read,
generic_bus_read,
bf537_stamp_bus_write,
NULL
};
@ -517,7 +506,7 @@ const bus_driver_t bf527_ezkit_bus = {
bf537_stamp_bus_read_start,
bf537_stamp_bus_read_next,
bf537_stamp_bus_read_end,
bf537_stamp_bus_read,
generic_bus_read,
bf537_stamp_bus_write,
NULL
};

@ -343,17 +343,6 @@ bf548_ezkit_bus_read_end( bus_t *bus )
return d;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
bf548_ezkit_bus_read( bus_t *bus, uint32_t adr )
{
bf548_ezkit_bus_read_start( bus, adr );
return bf548_ezkit_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -392,7 +381,7 @@ const bus_driver_t bf548_ezkit_bus = {
bf548_ezkit_bus_read_start,
bf548_ezkit_bus_read_next,
bf548_ezkit_bus_read_end,
bf548_ezkit_bus_read,
generic_bus_read,
bf548_ezkit_bus_write,
NULL
};

@ -368,17 +368,6 @@ bf561_ezkit_bus_read_end( bus_t *bus )
return d;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
bf561_ezkit_bus_read( bus_t *bus, uint32_t adr )
{
bf561_ezkit_bus_read_start( bus, adr );
return bf561_ezkit_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -415,7 +404,7 @@ const bus_driver_t bf561_ezkit_bus = {
bf561_ezkit_bus_read_start,
bf561_ezkit_bus_read_next,
bf561_ezkit_bus_read_end,
bf561_ezkit_bus_read,
generic_bus_read,
bf561_ezkit_bus_write,
NULL
};

@ -456,17 +456,6 @@ ejtag_bus_read_end( bus_t *bus )
return d;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
ejtag_bus_read( bus_t *bus, uint32_t adr )
{
ejtag_bus_read_start( bus, adr );
return ejtag_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -518,7 +507,7 @@ const bus_driver_t ejtag_bus = {
ejtag_bus_read_start,
ejtag_bus_read_next,
ejtag_bus_read_end,
ejtag_bus_read,
generic_bus_read,
ejtag_bus_write,
NULL
};

@ -690,17 +690,6 @@ fjmem_bus_read_end( bus_t *bus )
return d;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
fjmem_bus_read( bus_t *bus, uint32_t adr )
{
fjmem_bus_read_start( bus, adr );
return fjmem_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -743,7 +732,7 @@ const bus_driver_t fjmem_bus = {
fjmem_bus_read_start,
fjmem_bus_read_next,
fjmem_bus_read_end,
fjmem_bus_read,
generic_bus_read,
fjmem_bus_write,
NULL
};

@ -38,3 +38,14 @@ generic_bus_free( bus_t *bus )
free( bus->params );
free( bus );
}
/**
* bus->driver->(*read)
*
*/
uint32_t
generic_bus_read( bus_t *bus, uint32_t adr )
{
bus_read_start( bus, adr );
return bus_read_end( bus );
}

@ -28,5 +28,6 @@
#include "bus.h"
void generic_bus_free( bus_t *bus );
uint32_t generic_bus_read( bus_t *bus, uint32_t adr );
#endif /* GENERIC_BUS_H */

@ -290,17 +290,6 @@ h7202_bus_read_end( bus_t *bus )
return d;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
h7202_bus_read( bus_t *bus, uint32_t adr )
{
h7202_bus_read_start( bus, adr );
return h7202_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -351,7 +340,7 @@ const bus_driver_t h7202_bus = {
h7202_bus_read_start,
h7202_bus_read_next,
h7202_bus_read_end,
h7202_bus_read,
generic_bus_read,
h7202_bus_write,
NULL
};

@ -297,17 +297,6 @@ ixp425_bus_read_end( bus_t *bus )
return d;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
ixp425_bus_read( bus_t *bus, uint32_t adr )
{
ixp425_bus_read_start( bus, adr );
return ixp425_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -344,7 +333,7 @@ const bus_driver_t ixp425_bus = {
ixp425_bus_read_start,
ixp425_bus_read_next,
ixp425_bus_read_end,
ixp425_bus_read,
generic_bus_read,
ixp425_bus_write,
NULL
};

@ -640,17 +640,6 @@ jopcyc_bus_read_end( bus_t *bus )
return d;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
jopcyc_bus_read( bus_t *bus, uint32_t adr )
{
jopcyc_bus_read_start( bus, adr );
return jopcyc_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -704,7 +693,7 @@ const bus_driver_t jopcyc_bus = {
jopcyc_bus_read_start,
jopcyc_bus_read_next,
jopcyc_bus_read_end,
jopcyc_bus_read,
generic_bus_read,
jopcyc_bus_write,
NULL
};

@ -327,17 +327,6 @@ lh7a400_bus_read_end( bus_t *bus )
return d;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
lh7a400_bus_read( bus_t *bus, uint32_t adr )
{
lh7a400_bus_read_start( bus, adr );
return lh7a400_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -377,7 +366,7 @@ const bus_driver_t lh7a400_bus = {
lh7a400_bus_read_start,
lh7a400_bus_read_next,
lh7a400_bus_read_end,
lh7a400_bus_read,
generic_bus_read,
lh7a400_bus_write,
NULL
};

@ -304,17 +304,6 @@ mpc5200_bus_read_end( bus_t *bus )
return get_data( bus, LAST_ADR );
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
mpc5200_bus_read( bus_t *bus, uint32_t adr )
{
mpc5200_bus_read_start( bus, adr );
return mpc5200_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -355,7 +344,7 @@ const bus_driver_t mpc5200_bus = {
mpc5200_bus_read_start,
mpc5200_bus_read_next,
mpc5200_bus_read_end,
mpc5200_bus_read,
generic_bus_read,
mpc5200_bus_write,
NULL
};

@ -532,17 +532,6 @@ mpc824x_bus_read_end( bus_t *bus )
return get_data( bus, LAST_ADR );
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
mpc824x_bus_read( bus_t *bus, uint32_t adr )
{
mpc824x_bus_read_start( bus, adr );
return mpc824x_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -587,7 +576,7 @@ const bus_driver_t mpc824x_bus = {
mpc824x_bus_read_start,
mpc824x_bus_read_next,
mpc824x_bus_read_end,
mpc824x_bus_read,
generic_bus_read,
mpc824x_bus_write,
NULL
};

@ -272,21 +272,6 @@ ppc405ep_bus_read_end( bus_t *bus )
return d;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
ppc405ep_bus_read( bus_t *bus, uint32_t adr )
{
int res;
ppc405ep_bus_read_start( bus, adr );
res = ppc405ep_bus_read_end( bus );
return res;
}
/**
* bus->driver->(*write)
*
@ -324,7 +309,7 @@ const bus_driver_t ppc405ep_bus = {
ppc405ep_bus_read_start,
ppc405ep_bus_read_next,
ppc405ep_bus_read_end,
ppc405ep_bus_read,
generic_bus_read,
ppc405ep_bus_write,
NULL
};

@ -274,17 +274,6 @@ ppc440gx_ebc8_bus_read_end( bus_t *bus )
return d;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
ppc440gx_ebc8_bus_read( bus_t *bus, uint32_t adr )
{
ppc440gx_ebc8_bus_read_start( bus, adr );
return ppc440gx_ebc8_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -322,7 +311,7 @@ const bus_driver_t ppc440gx_ebc8_bus = {
ppc440gx_ebc8_bus_read_start,
ppc440gx_ebc8_bus_read_next,
ppc440gx_ebc8_bus_read_end,
ppc440gx_ebc8_bus_read,
generic_bus_read,
ppc440gx_ebc8_bus_write,
NULL
};

@ -423,21 +423,6 @@ prototype_bus_read_end( bus_t *bus )
return d;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
prototype_bus_read( bus_t *bus, uint32_t adr )
{
int res;
prototype_bus_read_start( bus, adr );
res = prototype_bus_read_end( bus );
return res;
}
/**
* bus->driver->(*write)
*
@ -477,7 +462,7 @@ const bus_driver_t prototype_bus = {
prototype_bus_read_start,
prototype_bus_read_next,
prototype_bus_read_end,
prototype_bus_read,
generic_bus_read,
prototype_bus_write,
NULL
};

@ -786,17 +786,6 @@ pxa2xx_bus_read_end( bus_t *bus )
return 0;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
pxa2xx_bus_read( bus_t *bus, uint32_t adr )
{
pxa2xx_bus_read_start( bus, adr );
return pxa2xx_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -849,7 +838,7 @@ const bus_driver_t pxa2x0_bus = {
pxa2xx_bus_read_start,
pxa2xx_bus_read_next,
pxa2xx_bus_read_end,
pxa2xx_bus_read,
generic_bus_read,
pxa2xx_bus_write,
NULL /* patch 909598 call pxax0_bus_init, but the patch fails and doesnt look compatible */
};
@ -865,7 +854,7 @@ const bus_driver_t pxa27x_bus = {
pxa2xx_bus_read_start,
pxa2xx_bus_read_next,
pxa2xx_bus_read_end,
pxa2xx_bus_read,
generic_bus_read,
pxa2xx_bus_write,
pxa2xx_bus_init
};

@ -391,17 +391,6 @@ s3c4510_bus_read_end( bus_t *bus )
return d;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
s3c4510_bus_read( bus_t *bus, uint32_t adr )
{
s3c4510_bus_read_start( bus, adr );
return s3c4510_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -457,7 +446,7 @@ const bus_driver_t s3c4510_bus = {
s3c4510_bus_read_start,
s3c4510_bus_read_next,
s3c4510_bus_read_end,
s3c4510_bus_read,
generic_bus_read,
s3c4510_bus_write,
NULL
};

@ -301,17 +301,6 @@ sa1110_bus_read_end( bus_t *bus )
return d;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
sa1110_bus_read( bus_t *bus, uint32_t adr )
{
sa1110_bus_read_start( bus, adr );
return sa1110_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -361,7 +350,7 @@ const bus_driver_t sa1110_bus = {
sa1110_bus_read_start,
sa1110_bus_read_next,
sa1110_bus_read_end,
sa1110_bus_read,
generic_bus_read,
sa1110_bus_write,
NULL
};

@ -337,17 +337,6 @@ sh7727_bus_read_end( bus_t *bus )
return d;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
sh7727_bus_read( bus_t *bus, uint32_t adr )
{
sh7727_bus_read_start( bus, adr );
return sh7727_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -409,7 +398,7 @@ const bus_driver_t sh7727_bus = {
sh7727_bus_read_start,
sh7727_bus_read_next,
sh7727_bus_read_end,
sh7727_bus_read,
generic_bus_read,
sh7727_bus_write,
NULL
};

@ -316,17 +316,6 @@ sh7750r_bus_read_end( bus_t *bus )
return d;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
sh7750r_bus_read( bus_t *bus, uint32_t adr )
{
sh7750r_bus_read_start( bus, adr );
return sh7750r_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -391,7 +380,7 @@ const bus_driver_t sh7750r_bus = {
sh7750r_bus_read_start,
sh7750r_bus_read_next,
sh7750r_bus_read_end,
sh7750r_bus_read,
generic_bus_read,
sh7750r_bus_write,
NULL
};

@ -301,17 +301,6 @@ sh7751r_bus_read_end( bus_t *bus )
return d;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
sh7751r_bus_read( bus_t *bus, uint32_t adr )
{
sh7751r_bus_read_start( bus, adr );
return sh7751r_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -373,7 +362,7 @@ const bus_driver_t sh7751r_bus = {
sh7751r_bus_read_start,
sh7751r_bus_read_next,
sh7751r_bus_read_end,
sh7751r_bus_read,
generic_bus_read,
sh7751r_bus_write,
NULL
};

@ -314,17 +314,6 @@ sharc_21065L_bus_read_end( bus_t *bus )
return 0;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
sharc_21065L_bus_read( bus_t *bus, uint32_t adr )
{
sharc_21065L_bus_read_start( bus, adr );
return sharc_21065L_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -365,7 +354,7 @@ const bus_driver_t sharc_21065L_bus = {
sharc_21065L_bus_read_start,
sharc_21065L_bus_read_next,
sharc_21065L_bus_read_end,
sharc_21065L_bus_read,
generic_bus_read,
sharc_21065L_bus_write,
NULL
};

@ -450,20 +450,6 @@ slsup3_bus_read_end( bus_t *bus )
return d;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
slsup3_bus_read( bus_t *bus, uint32_t adr )
{
uint32_t d;
slsup3_bus_read_start( bus, adr );
d = slsup3_bus_read_end( bus );
return d;
}
/**
* bus->driver->(*write)
*
@ -515,7 +501,7 @@ const bus_driver_t slsup3_bus = {
slsup3_bus_read_start,
slsup3_bus_read_next,
slsup3_bus_read_end,
slsup3_bus_read,
generic_bus_read,
slsup3_bus_write,
NULL
};

@ -326,17 +326,6 @@ tx4925_bus_read_end( bus_t *bus )
return d;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
tx4925_bus_read( bus_t *bus, uint32_t adr )
{
tx4925_bus_read_start( bus, adr );
return tx4925_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -373,7 +362,7 @@ const bus_driver_t tx4925_bus = {
tx4925_bus_read_start,
tx4925_bus_read_next,
tx4925_bus_read_end,
tx4925_bus_read,
generic_bus_read,
tx4925_bus_write,
NULL
};

@ -852,17 +852,6 @@ zefant_xs3_bus_read_end( bus_t *bus )
return d;
}
/**
* bus->driver->(*read)
*
*/
static uint32_t
zefant_xs3_bus_read( bus_t *bus, uint32_t adr )
{
zefant_xs3_bus_read_start( bus, adr );
return zefant_xs3_bus_read_end( bus );
}
/**
* bus->driver->(*write)
*
@ -981,7 +970,7 @@ const bus_driver_t zefant_xs3_bus = {
zefant_xs3_bus_read_start,
zefant_xs3_bus_read_next,
zefant_xs3_bus_read_end,
zefant_xs3_bus_read,
generic_bus_read,
zefant_xs3_bus_write,
NULL
};

Loading…
Cancel
Save