From 0da5bdae879e99cea2283b4aae7b3b0976437b8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnim=20L=C3=A4uger?= Date: Wed, 18 Jun 2008 19:04:07 +0000 Subject: [PATCH] [ 1984813 ] Bus driver cleanup, uniquify chain and part in bus_t struct (Hartley Sweeten) git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1285 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/ChangeLog | 15 +++++++++++++++ jtag/include/bus_driver.h | 5 +++++ jtag/src/bus/au1500.c | 5 ----- jtag/src/bus/avr32.c | 7 +------ jtag/src/bus/bcm1250.c | 5 ----- jtag/src/bus/bf533_ezkit.c | 4 ---- jtag/src/bus/bf533_stamp.c | 4 ---- jtag/src/bus/bf537_stamp.c | 4 ---- jtag/src/bus/bf548_ezkit.c | 4 ---- jtag/src/bus/bf561_ezkit.c | 4 ---- jtag/src/bus/ejtag.c | 5 ----- jtag/src/bus/fjmem.c | 5 ----- jtag/src/bus/h7202.c | 4 ---- jtag/src/bus/ixp425.c | 4 ---- jtag/src/bus/jopcyc.c | 4 ---- jtag/src/bus/lh7a400.c | 4 ---- jtag/src/bus/mpc5200.c | 4 ---- jtag/src/bus/mpc824x.c | 4 ---- jtag/src/bus/ppc405ep.c | 4 ---- jtag/src/bus/ppc440gx_ebc8.c | 4 ---- jtag/src/bus/prototype.c | 4 ---- jtag/src/bus/pxa2x0.c | 4 ---- jtag/src/bus/s3c4510x.c | 4 ---- jtag/src/bus/sa1110.c | 4 ---- jtag/src/bus/sh7727.c | 4 ---- jtag/src/bus/sh7750r.c | 4 ---- jtag/src/bus/sh7751r.c | 4 ---- jtag/src/bus/sharc21065l.c | 8 +------- jtag/src/bus/slsup3.c | 4 ---- jtag/src/bus/tx4925.c | 4 ---- jtag/src/bus/zefant-xs3.c | 4 ---- 31 files changed, 22 insertions(+), 125 deletions(-) diff --git a/jtag/ChangeLog b/jtag/ChangeLog index 69bee544..3649a140 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,18 @@ +2008-06-18 Arnim Laeuger + + * include/bus_driver.h, 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/avr32.c, src/bus/h7202.c, src/bus/zefant-xs3.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/mpc5200.c, src/bus/jopcyc.c, src/bus/bf561_ezkit.c, + src/bus/slsup3.c, src/bus/s3c4510x.c, src/bus/ejtag.c: + [ 1984813 ] Bus driver cleanup, uniquify chain and part in + bus_t struct (Hartley Sweeten) + 2008-06-16 Arnim Laeuger * src/cmd/initbus.c (cmd_initbus_run), diff --git a/jtag/include/bus_driver.h b/jtag/include/bus_driver.h index 55ff6e19..c45a6644 100644 --- a/jtag/include/bus_driver.h +++ b/jtag/include/bus_driver.h @@ -65,12 +65,17 @@ typedef struct bus_driver { } bus_driver_t; struct bus { + chain_t *chain; + part_t *part; void *params; const bus_driver_t *driver; }; extern bus_t *bus; +#define CHAIN bus->chain +#define PART bus->part + #define bus_printinfo(bus) bus->driver->printinfo(bus) #define bus_prepare(bus) bus->driver->prepare(bus) #define bus_area(bus,adr,a) bus->driver->area(bus,adr,a) diff --git a/jtag/src/bus/au1500.c b/jtag/src/bus/au1500.c index 23c44c7c..4e2a263d 100644 --- a/jtag/src/bus/au1500.c +++ b/jtag/src/bus/au1500.c @@ -42,8 +42,6 @@ #include "generic_bus.h" typedef struct{ - chain_t *chain; - part_t *part; signal_t *rad[32]; signal_t *nrcs[4]; signal_t *nrwe; @@ -51,9 +49,6 @@ typedef struct{ signal_t *rd[32]; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part - #define RAD ((bus_params_t *) bus->params)->rad #define nRCS ((bus_params_t *) bus->params)->nrcs #define nRWE ((bus_params_t *) bus->params)->nrwe diff --git a/jtag/src/bus/avr32.c b/jtag/src/bus/avr32.c index 7cc68f92..2855c0d1 100644 --- a/jtag/src/bus/avr32.c +++ b/jtag/src/bus/avr32.c @@ -42,10 +42,7 @@ void jtag_reset (chain_t * chain); -typedef struct -{ - chain_t *chain; - part_t *part; +typedef struct { unsigned int mode; unsigned int slave; @@ -63,8 +60,6 @@ typedef struct #define BUS_MODE_x32 5 #define BP (( bus_params_t *) bus->params) -#define CHAIN (BP->chain) -#define PART (BP->part) #define SLAVE (BP->slave) #define MODE (BP->mode) #define ADDR_MASK (BP->addr_mask) diff --git a/jtag/src/bus/bcm1250.c b/jtag/src/bus/bcm1250.c index 340f7274..2b5bb5b5 100644 --- a/jtag/src/bus/bcm1250.c +++ b/jtag/src/bus/bcm1250.c @@ -40,8 +40,6 @@ //#define USE_BCM_EJTAG typedef struct { - chain_t *chain; - part_t *part; signal_t *io_ad[32]; signal_t *io_cs_l[8]; signal_t *io_rw; @@ -49,9 +47,6 @@ typedef struct { signal_t *io_oe_l; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part - #define IO_AD ((bus_params_t *) bus->params)->io_ad #define IO_CS_L ((bus_params_t *) bus->params)->io_cs_l #define IO_RW ((bus_params_t *) bus->params)->io_rw diff --git a/jtag/src/bus/bf533_ezkit.c b/jtag/src/bus/bf533_ezkit.c index 89378260..efcf8327 100644 --- a/jtag/src/bus/bf533_ezkit.c +++ b/jtag/src/bus/bf533_ezkit.c @@ -38,8 +38,6 @@ #include "generic_bus.h" typedef struct { - chain_t *chain; - part_t *part; signal_t *ams[4]; signal_t *addr[19]; signal_t *data[16]; @@ -52,8 +50,6 @@ typedef struct { signal_t *swe; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define AMS ((bus_params_t *) bus->params)->ams #define ADDR ((bus_params_t *) bus->params)->addr #define DATA ((bus_params_t *) bus->params)->data diff --git a/jtag/src/bus/bf533_stamp.c b/jtag/src/bus/bf533_stamp.c index 98b9a866..c053c2f3 100644 --- a/jtag/src/bus/bf533_stamp.c +++ b/jtag/src/bus/bf533_stamp.c @@ -38,8 +38,6 @@ #include "generic_bus.h" typedef struct { - chain_t *chain; - part_t *part; signal_t *ams[4]; signal_t *addr[19]; signal_t *data[16]; @@ -52,8 +50,6 @@ typedef struct { signal_t *swe; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define AMS ((bus_params_t *) bus->params)->ams #define ADDR ((bus_params_t *) bus->params)->addr #define DATA ((bus_params_t *) bus->params)->data diff --git a/jtag/src/bus/bf537_stamp.c b/jtag/src/bus/bf537_stamp.c index 06469823..6934f58f 100644 --- a/jtag/src/bus/bf537_stamp.c +++ b/jtag/src/bus/bf537_stamp.c @@ -38,8 +38,6 @@ #include "generic_bus.h" typedef struct { - chain_t *chain; - part_t *part; signal_t *ams[4]; signal_t *addr[19]; signal_t *data[16]; @@ -52,8 +50,6 @@ typedef struct { signal_t *swe; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define AMS ((bus_params_t *) bus->params)->ams #define ADDR ((bus_params_t *) bus->params)->addr #define DATA ((bus_params_t *) bus->params)->data diff --git a/jtag/src/bus/bf548_ezkit.c b/jtag/src/bus/bf548_ezkit.c index 67b11502..9d0cce79 100644 --- a/jtag/src/bus/bf548_ezkit.c +++ b/jtag/src/bus/bf548_ezkit.c @@ -37,8 +37,6 @@ #include "generic_bus.h" typedef struct { - chain_t *chain; - part_t *part; signal_t *ams[4]; signal_t *addr[24]; signal_t *data[16]; @@ -49,8 +47,6 @@ typedef struct { signal_t *nce; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define AMS ((bus_params_t *) bus->params)->ams #define ADDR ((bus_params_t *) bus->params)->addr #define DATA ((bus_params_t *) bus->params)->data diff --git a/jtag/src/bus/bf561_ezkit.c b/jtag/src/bus/bf561_ezkit.c index d927ef76..66afd5fb 100644 --- a/jtag/src/bus/bf561_ezkit.c +++ b/jtag/src/bus/bf561_ezkit.c @@ -38,8 +38,6 @@ #include "generic_bus.h" typedef struct { - chain_t *chain; - part_t *part; signal_t *ams[4]; signal_t *addr[24]; signal_t *abe[4]; @@ -52,8 +50,6 @@ typedef struct { signal_t *swe; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define AMS ((bus_params_t *) bus->params)->ams #define ADDR ((bus_params_t *) bus->params)->addr #define ABE ((bus_params_t *) bus->params)->abe diff --git a/jtag/src/bus/ejtag.c b/jtag/src/bus/ejtag.c index 5cd33016..1f799c3d 100644 --- a/jtag/src/bus/ejtag.c +++ b/jtag/src/bus/ejtag.c @@ -42,8 +42,6 @@ #include "generic_bus.h" typedef struct { - chain_t *chain; - part_t *part; int initialized; uint32_t impcode; /* EJTAG Implementation Register */ uint16_t adr_hi; /* cached high bits of $3 */ @@ -51,9 +49,6 @@ typedef struct { #define BP ((bus_params_t *) bus->params) -#define CHAIN (BP->chain) -#define PART (BP->part) - #define EJTAG_VER ((BP->impcode >> 29) & 7) #define EJTAG_20 0 diff --git a/jtag/src/bus/fjmem.c b/jtag/src/bus/fjmem.c index a93a8825..b1d1f874 100644 --- a/jtag/src/bus/fjmem.c +++ b/jtag/src/bus/fjmem.c @@ -68,16 +68,11 @@ struct block_desc { typedef struct block_desc block_desc_t; typedef struct { - chain_t *chain; - part_t *part; uint32_t last_addr; data_register *fjmem_reg; block_desc_t block_desc; } bus_params_t; - -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define LAST_ADDR ((bus_params_t *) bus->params)->last_addr #define FJMEM_REG ((bus_params_t *) bus->params)->fjmem_reg #define BLOCK_DESC ((bus_params_t *) bus->params)->block_desc diff --git a/jtag/src/bus/h7202.c b/jtag/src/bus/h7202.c index 204d9b7a..48968ce1 100644 --- a/jtag/src/bus/h7202.c +++ b/jtag/src/bus/h7202.c @@ -38,8 +38,6 @@ #include "generic_bus.h" typedef struct { - chain_t *chain; - part_t *part; signal_t *a[25]; signal_t *d[32]; signal_t *nRCS[4]; @@ -47,8 +45,6 @@ typedef struct { signal_t *nROE; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define A ((bus_params_t *) bus->params)->a #define D ((bus_params_t *) bus->params)->d #define nRCS ((bus_params_t *) bus->params)->nRCS diff --git a/jtag/src/bus/ixp425.c b/jtag/src/bus/ixp425.c index 783d77a7..230f51cb 100644 --- a/jtag/src/bus/ixp425.c +++ b/jtag/src/bus/ixp425.c @@ -38,8 +38,6 @@ #include "generic_bus.h" typedef struct { - chain_t *chain; - part_t *part; signal_t *ex_cs[8]; signal_t *ex_addr[24]; signal_t *ex_data[16]; @@ -47,8 +45,6 @@ typedef struct { signal_t *ex_rd; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define EX_CS ((bus_params_t *) bus->params)->ex_cs #define EX_ADDR ((bus_params_t *) bus->params)->ex_addr #define EX_DATA ((bus_params_t *) bus->params)->ex_data diff --git a/jtag/src/bus/jopcyc.c b/jtag/src/bus/jopcyc.c index fb6165c9..6f1c9688 100644 --- a/jtag/src/bus/jopcyc.c +++ b/jtag/src/bus/jopcyc.c @@ -99,8 +99,6 @@ typedef struct { } component_t; typedef struct { - chain_t *chain; - part_t *part; uint32_t last_addr; /* holds last address of read or write access */ component_t rama; component_t ramb; @@ -111,8 +109,6 @@ typedef struct { signal_t *ser_ncts; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define LAST_ADDR ((bus_params_t *) bus->params)->last_addr #define A comp->a #define D comp->d diff --git a/jtag/src/bus/lh7a400.c b/jtag/src/bus/lh7a400.c index 9a71679b..4d90c4e7 100644 --- a/jtag/src/bus/lh7a400.c +++ b/jtag/src/bus/lh7a400.c @@ -52,8 +52,6 @@ #define WIDTH_NUM 2 typedef struct { - chain_t *chain; - part_t *part; signal_t *a[ADR_NUM]; signal_t *d[D_NUM]; signal_t *ncs[nCS_NUM]; @@ -62,8 +60,6 @@ typedef struct { signal_t *width[WIDTH_NUM]; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define A ((bus_params_t *) bus->params)->a #define D ((bus_params_t *) bus->params)->d #define nCS ((bus_params_t *) bus->params)->ncs diff --git a/jtag/src/bus/mpc5200.c b/jtag/src/bus/mpc5200.c index 9a09616d..6f94ebcf 100644 --- a/jtag/src/bus/mpc5200.c +++ b/jtag/src/bus/mpc5200.c @@ -41,8 +41,6 @@ #include "generic_bus.h" typedef struct { - chain_t *chain; - part_t *part; uint32_t last_adr; signal_t *ad[24]; signal_t *ncs[4]; @@ -51,8 +49,6 @@ typedef struct { signal_t *d[8]; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define LAST_ADR ((bus_params_t *) bus->params)->last_adr #define AD ((bus_params_t *) bus->params)->ad #define nCS ((bus_params_t *) bus->params)->ncs diff --git a/jtag/src/bus/mpc824x.c b/jtag/src/bus/mpc824x.c index 20decf77..48212df3 100644 --- a/jtag/src/bus/mpc824x.c +++ b/jtag/src/bus/mpc824x.c @@ -41,8 +41,6 @@ #include "generic_bus.h" typedef struct { - chain_t *chain; - part_t *part; int boot_nfoe; int boot_sdma1; uint32_t last_adr; @@ -53,8 +51,6 @@ typedef struct { signal_t *d[32]; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define boot_nFOE ((bus_params_t *) bus->params)->boot_nfoe #define boot_SDMA1 ((bus_params_t *) bus->params)->boot_sdma1 #define LAST_ADR ((bus_params_t *) bus->params)->last_adr diff --git a/jtag/src/bus/ppc405ep.c b/jtag/src/bus/ppc405ep.c index 6a613569..acf12344 100644 --- a/jtag/src/bus/ppc405ep.c +++ b/jtag/src/bus/ppc405ep.c @@ -35,8 +35,6 @@ #include "generic_bus.h" typedef struct { - chain_t *chain; - part_t *part; signal_t *a[32]; signal_t *d[16]; signal_t *ncs; @@ -44,8 +42,6 @@ typedef struct { signal_t *noe; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define A ((bus_params_t *) bus->params)->a #define D ((bus_params_t *) bus->params)->d #define nCS ((bus_params_t *) bus->params)->ncs diff --git a/jtag/src/bus/ppc440gx_ebc8.c b/jtag/src/bus/ppc440gx_ebc8.c index 23467981..8902b2fa 100644 --- a/jtag/src/bus/ppc440gx_ebc8.c +++ b/jtag/src/bus/ppc440gx_ebc8.c @@ -37,8 +37,6 @@ #define PPC440GX_DATA_LINES 8 typedef struct { - chain_t *chain; - part_t *part; signal_t *a[PPC440GX_ADDR_LINES]; signal_t *d[PPC440GX_DATA_LINES]; signal_t *ncs; @@ -46,8 +44,6 @@ typedef struct { signal_t *noe; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define A ((bus_params_t *) bus->params)->a #define D ((bus_params_t *) bus->params)->d #define nCS ((bus_params_t *) bus->params)->ncs diff --git a/jtag/src/bus/prototype.c b/jtag/src/bus/prototype.c index 68a323b4..9c6a98f2 100644 --- a/jtag/src/bus/prototype.c +++ b/jtag/src/bus/prototype.c @@ -38,8 +38,6 @@ #include "generic_bus.h" typedef struct { - chain_t *chain; - part_t *part; signal_t *a[32]; signal_t *d[32]; signal_t *cs; @@ -49,8 +47,6 @@ typedef struct { int ashift; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define A ((bus_params_t *) bus->params)->a #define D ((bus_params_t *) bus->params)->d #define CS ((bus_params_t *) bus->params)->cs diff --git a/jtag/src/bus/pxa2x0.c b/jtag/src/bus/pxa2x0.c index eb18bca9..a94879ec 100644 --- a/jtag/src/bus/pxa2x0.c +++ b/jtag/src/bus/pxa2x0.c @@ -104,8 +104,6 @@ static ncs_map_entry pxa27x_ncs_map[nCS_TOTAL] = { typedef struct { - chain_t *chain; - part_t *part; uint32_t last_adr; signal_t *ma[26]; signal_t *md[32]; @@ -120,8 +118,6 @@ typedef struct { int proc; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define PROC ((bus_params_t *) bus->params)->proc #define LAST_ADR ((bus_params_t *) bus->params)->last_adr #define MA ((bus_params_t *) bus->params)->ma diff --git a/jtag/src/bus/s3c4510x.c b/jtag/src/bus/s3c4510x.c index e6616437..1b7aad0b 100644 --- a/jtag/src/bus/s3c4510x.c +++ b/jtag/src/bus/s3c4510x.c @@ -73,8 +73,6 @@ /** @brief Bus driver for Samsung S3C4510X */ typedef struct { - chain_t *chain; - part_t *part; signal_t *a[22]; /**< Only 22-bits addressing */ signal_t *d[32]; /**< Data bus */ signal_t *nrcs[6]; /**< not ROM/SRAM/Flash Chip Select; @@ -87,8 +85,6 @@ typedef struct { int dbuswidth; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define A ((bus_params_t *) bus->params)->a #define D ((bus_params_t *) bus->params)->d #define nRCS ((bus_params_t *) bus->params)->nrcs diff --git a/jtag/src/bus/sa1110.c b/jtag/src/bus/sa1110.c index 16827427..370e43c7 100644 --- a/jtag/src/bus/sa1110.c +++ b/jtag/src/bus/sa1110.c @@ -41,8 +41,6 @@ #include "generic_bus.h" typedef struct { - chain_t *chain; - part_t *part; signal_t *a[26]; signal_t *d[32]; signal_t *ncs[6]; @@ -51,8 +49,6 @@ typedef struct { signal_t *noe; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define A ((bus_params_t *) bus->params)->a #define D ((bus_params_t *) bus->params)->d #define nCS ((bus_params_t *) bus->params)->ncs diff --git a/jtag/src/bus/sh7727.c b/jtag/src/bus/sh7727.c index 80852828..9463457a 100644 --- a/jtag/src/bus/sh7727.c +++ b/jtag/src/bus/sh7727.c @@ -38,8 +38,6 @@ #include "generic_bus.h" typedef struct { - chain_t *chain; - part_t *part; signal_t *a[26]; signal_t *d[32]; signal_t *cs[7]; @@ -50,8 +48,6 @@ typedef struct { signal_t *md4; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define A ((bus_params_t *) bus->params)->a #define D ((bus_params_t *) bus->params)->d #define CS ((bus_params_t *) bus->params)->cs diff --git a/jtag/src/bus/sh7750r.c b/jtag/src/bus/sh7750r.c index 2becf45b..c9b0614b 100644 --- a/jtag/src/bus/sh7750r.c +++ b/jtag/src/bus/sh7750r.c @@ -38,8 +38,6 @@ #include "generic_bus.h" typedef struct { - chain_t *chain; - part_t *part; signal_t *a[26]; signal_t *d[64]; signal_t *cs[7]; @@ -50,8 +48,6 @@ typedef struct { signal_t *rd2; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define A ((bus_params_t *) bus->params)->a #define D ((bus_params_t *) bus->params)->d #define CS ((bus_params_t *) bus->params)->cs diff --git a/jtag/src/bus/sh7751r.c b/jtag/src/bus/sh7751r.c index a73a42eb..0038e9d1 100644 --- a/jtag/src/bus/sh7751r.c +++ b/jtag/src/bus/sh7751r.c @@ -38,8 +38,6 @@ #include "generic_bus.h" typedef struct { - chain_t *chain; - part_t *part; signal_t *a[26]; signal_t *d[32]; signal_t *cs[8]; @@ -49,8 +47,6 @@ typedef struct { signal_t *bs; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define A ((bus_params_t *) bus->params)->a #define D ((bus_params_t *) bus->params)->d #define CS ((bus_params_t *) bus->params)->cs diff --git a/jtag/src/bus/sharc21065l.c b/jtag/src/bus/sharc21065l.c index 23bba306..249cae0b 100644 --- a/jtag/src/bus/sharc21065l.c +++ b/jtag/src/bus/sharc21065l.c @@ -42,10 +42,7 @@ //no SDRAM access -typedef struct -{ - chain_t *chain; - part_t *part; +typedef struct { uint32_t last_adr; signal_t *ma[19]; //19 - 512K flash address are used signal_t *md[8]; //8 bit data bus connected to Flash are used @@ -54,9 +51,6 @@ typedef struct signal_t *noe; } bus_params_t; - -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define LAST_ADR ((bus_params_t *) bus->params)->last_adr #define MA ((bus_params_t *) bus->params)->ma #define MD ((bus_params_t *) bus->params)->md diff --git a/jtag/src/bus/slsup3.c b/jtag/src/bus/slsup3.c index ac4875c4..45c0b2ec 100644 --- a/jtag/src/bus/slsup3.c +++ b/jtag/src/bus/slsup3.c @@ -43,8 +43,6 @@ int databusio[16] = {94,96,98,100,102,104,106,113,95,97,99,101,103,105,107,114}; int addrbusio[20] = {93,88,87,86,85,84,83,63,64,65,66,67,68,74,75,76,77,82,81,78}; typedef struct { - chain_t *chain; - part_t *part; uint32_t last_adr; signal_t *ad[20]; signal_t *dq[16]; @@ -61,8 +59,6 @@ typedef struct { signal_t *lcdrw; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define LAST_ADR ((bus_params_t *) bus->params)->last_adr #define AD ((bus_params_t *) bus->params)->ad #define DQ ((bus_params_t *) bus->params)->dq diff --git a/jtag/src/bus/tx4925.c b/jtag/src/bus/tx4925.c index 124e6421..af0a77a9 100644 --- a/jtag/src/bus/tx4925.c +++ b/jtag/src/bus/tx4925.c @@ -43,8 +43,6 @@ // on 29LV200 we use now. typedef struct { - chain_t *chain; - part_t *part; signal_t *oe; signal_t *swe; signal_t *romce[4]; @@ -53,8 +51,6 @@ typedef struct { signal_t *data[16]; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define OE ((bus_params_t *) bus->params)->oe #define SWE ((bus_params_t *) bus->params)->swe #define ROMCE ((bus_params_t *) bus->params)->romce diff --git a/jtag/src/bus/zefant-xs3.c b/jtag/src/bus/zefant-xs3.c index 2ef1e074..78572513 100644 --- a/jtag/src/bus/zefant-xs3.c +++ b/jtag/src/bus/zefant-xs3.c @@ -118,8 +118,6 @@ typedef struct { } component_t; typedef struct { - chain_t *chain; - part_t *part; uint32_t last_addr; /* holds last address of read or write access */ component_t flash; component_t ram0; @@ -128,8 +126,6 @@ typedef struct { component_t eeprom_status; } bus_params_t; -#define CHAIN ((bus_params_t *) bus->params)->chain -#define PART ((bus_params_t *) bus->params)->part #define LAST_ADDR ((bus_params_t *) bus->params)->last_addr #define A comp->a #define D comp->d