diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-11-13 08:43:36 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-13 11:58:11 -0800 |
commit | a8141cafdef162d52e128cd2ab51702b9800fda2 (patch) | |
tree | 2cff899322e3ae0d30fe1b574f559d542e4b06ec /src | |
parent | ccde06a08fbf9c4f57b321dbec0509f73239c2de (diff) | |
download | openocd+libswd-a8141cafdef162d52e128cd2ab51702b9800fda2.tar.gz openocd+libswd-a8141cafdef162d52e128cd2ab51702b9800fda2.tar.bz2 openocd+libswd-a8141cafdef162d52e128cd2ab51702b9800fda2.tar.xz openocd+libswd-a8141cafdef162d52e128cd2ab51702b9800fda2.zip |
mips_ejtag_t -> struct mips_ejtag
Remove misleading typedef and redundant suffix from struct mips_ejtag.
Diffstat (limited to 'src')
-rw-r--r-- | src/flash/pic32mx.c | 4 | ||||
-rw-r--r-- | src/target/mips32.c | 4 | ||||
-rw-r--r-- | src/target/mips32.h | 2 | ||||
-rw-r--r-- | src/target/mips32_dmaacc.c | 28 | ||||
-rw-r--r-- | src/target/mips32_dmaacc.h | 16 | ||||
-rw-r--r-- | src/target/mips32_pracc.c | 34 | ||||
-rw-r--r-- | src/target/mips32_pracc.h | 26 | ||||
-rw-r--r-- | src/target/mips_ejtag.c | 22 | ||||
-rw-r--r-- | src/target/mips_ejtag.h | 22 | ||||
-rw-r--r-- | src/target/mips_m4k.c | 20 |
10 files changed, 89 insertions, 89 deletions
diff --git a/src/flash/pic32mx.c b/src/flash/pic32mx.c index 97111f2c..262200c0 100644 --- a/src/flash/pic32mx.c +++ b/src/flash/pic32mx.c @@ -544,7 +544,7 @@ static int pic32mx_probe(struct flash_bank_s *bank) target_t *target = bank->target; struct pic32mx_flash_bank *pic32mx_info = bank->driver_priv; struct mips32_common *mips32 = target->arch_info; - mips_ejtag_t *ejtag_info = &mips32->ejtag_info; + struct mips_ejtag *ejtag_info = &mips32->ejtag_info; int i; uint16_t num_pages = 0; uint32_t device_id; @@ -641,7 +641,7 @@ static int pic32mx_info(struct flash_bank_s *bank, char *buf, int buf_size) { target_t *target = bank->target; struct mips32_common *mips32 = target->arch_info; - mips_ejtag_t *ejtag_info = &mips32->ejtag_info; + struct mips_ejtag *ejtag_info = &mips32->ejtag_info; uint32_t device_id; int printed = 0, i; diff --git a/src/target/mips32.c b/src/target/mips32.c index 1804665d..48fb7a38 100644 --- a/src/target/mips32.c +++ b/src/target/mips32.c @@ -216,7 +216,7 @@ int mips32_save_context(target_t *target) /* get pointers to arch-specific information */ struct mips32_common *mips32 = target->arch_info; - mips_ejtag_t *ejtag_info = &mips32->ejtag_info; + struct mips_ejtag *ejtag_info = &mips32->ejtag_info; /* read core registers */ mips32_pracc_read_regs(ejtag_info, mips32->core_regs); @@ -238,7 +238,7 @@ int mips32_restore_context(target_t *target) /* get pointers to arch-specific information */ struct mips32_common *mips32 = target->arch_info; - mips_ejtag_t *ejtag_info = &mips32->ejtag_info; + struct mips_ejtag *ejtag_info = &mips32->ejtag_info; for (i = 0; i < MIPS32NUMCOREREGS; i++) { diff --git a/src/target/mips32.h b/src/target/mips32.h index 9fdb6053..39f00be4 100644 --- a/src/target/mips32.h +++ b/src/target/mips32.h @@ -50,7 +50,7 @@ struct mips32_common uint32_t common_magic; void *arch_info; reg_cache_t *core_cache; - mips_ejtag_t ejtag_info; + struct mips_ejtag ejtag_info; uint32_t core_regs[MIPS32NUMCOREREGS]; int bp_scanned; diff --git a/src/target/mips32_dmaacc.c b/src/target/mips32_dmaacc.c index 9a380841..aa36d2cf 100644 --- a/src/target/mips32_dmaacc.c +++ b/src/target/mips32_dmaacc.c @@ -39,7 +39,7 @@ * displaying/modifying memory and memory mapped registers. */ -static int ejtag_dma_read(mips_ejtag_t *ejtag_info, uint32_t addr, uint32_t *data) +static int ejtag_dma_read(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t *data) { uint32_t v; uint32_t ejtag_ctrl; @@ -85,7 +85,7 @@ begin_ejtag_dma_read: return ERROR_OK; } -static int ejtag_dma_read_h(mips_ejtag_t *ejtag_info, uint32_t addr, uint16_t *data) +static int ejtag_dma_read_h(struct mips_ejtag *ejtag_info, uint32_t addr, uint16_t *data) { uint32_t v; uint32_t ejtag_ctrl; @@ -137,7 +137,7 @@ begin_ejtag_dma_read_h: return ERROR_OK; } -static int ejtag_dma_read_b(mips_ejtag_t *ejtag_info, uint32_t addr, uint8_t *data) +static int ejtag_dma_read_b(struct mips_ejtag *ejtag_info, uint32_t addr, uint8_t *data) { uint32_t v; uint32_t ejtag_ctrl; @@ -199,7 +199,7 @@ begin_ejtag_dma_read_b: return ERROR_OK; } -static int ejtag_dma_write(mips_ejtag_t *ejtag_info, uint32_t addr, uint32_t data) +static int ejtag_dma_write(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t data) { uint32_t v; uint32_t ejtag_ctrl; @@ -246,7 +246,7 @@ begin_ejtag_dma_write: return ERROR_OK; } -static int ejtag_dma_write_h(mips_ejtag_t *ejtag_info, uint32_t addr, uint32_t data) +static int ejtag_dma_write_h(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t data) { uint32_t v; uint32_t ejtag_ctrl; @@ -297,7 +297,7 @@ begin_ejtag_dma_write_h: return ERROR_OK; } -static int ejtag_dma_write_b(mips_ejtag_t *ejtag_info, uint32_t addr, uint32_t data) +static int ejtag_dma_write_b(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t data) { uint32_t v; uint32_t ejtag_ctrl; @@ -349,7 +349,7 @@ begin_ejtag_dma_write_b: return ERROR_OK; } -int mips32_dmaacc_read_mem(mips_ejtag_t *ejtag_info, uint32_t addr, int size, int count, void *buf) +int mips32_dmaacc_read_mem(struct mips_ejtag *ejtag_info, uint32_t addr, int size, int count, void *buf) { switch (size) { @@ -364,7 +364,7 @@ int mips32_dmaacc_read_mem(mips_ejtag_t *ejtag_info, uint32_t addr, int size, in return ERROR_OK; } -int mips32_dmaacc_read_mem32(mips_ejtag_t *ejtag_info, uint32_t addr, int count, uint32_t *buf) +int mips32_dmaacc_read_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf) { int i; int retval; @@ -377,7 +377,7 @@ int mips32_dmaacc_read_mem32(mips_ejtag_t *ejtag_info, uint32_t addr, int count, return ERROR_OK; } -int mips32_dmaacc_read_mem16(mips_ejtag_t *ejtag_info, uint32_t addr, int count, uint16_t *buf) +int mips32_dmaacc_read_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf) { int i; int retval; @@ -390,7 +390,7 @@ int mips32_dmaacc_read_mem16(mips_ejtag_t *ejtag_info, uint32_t addr, int count, return ERROR_OK; } -int mips32_dmaacc_read_mem8(mips_ejtag_t *ejtag_info, uint32_t addr, int count, uint8_t *buf) +int mips32_dmaacc_read_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf) { int i; int retval; @@ -403,7 +403,7 @@ int mips32_dmaacc_read_mem8(mips_ejtag_t *ejtag_info, uint32_t addr, int count, return ERROR_OK; } -int mips32_dmaacc_write_mem(mips_ejtag_t *ejtag_info, uint32_t addr, int size, int count, void *buf) +int mips32_dmaacc_write_mem(struct mips_ejtag *ejtag_info, uint32_t addr, int size, int count, void *buf) { switch (size) { @@ -418,7 +418,7 @@ int mips32_dmaacc_write_mem(mips_ejtag_t *ejtag_info, uint32_t addr, int size, i return ERROR_OK; } -int mips32_dmaacc_write_mem32(mips_ejtag_t *ejtag_info, uint32_t addr, int count, uint32_t *buf) +int mips32_dmaacc_write_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf) { int i; int retval; @@ -431,7 +431,7 @@ int mips32_dmaacc_write_mem32(mips_ejtag_t *ejtag_info, uint32_t addr, int count return ERROR_OK; } -int mips32_dmaacc_write_mem16(mips_ejtag_t *ejtag_info, uint32_t addr, int count, uint16_t *buf) +int mips32_dmaacc_write_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf) { int i; int retval; @@ -444,7 +444,7 @@ int mips32_dmaacc_write_mem16(mips_ejtag_t *ejtag_info, uint32_t addr, int count return ERROR_OK; } -int mips32_dmaacc_write_mem8(mips_ejtag_t *ejtag_info, uint32_t addr, int count, uint8_t *buf) +int mips32_dmaacc_write_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf) { int i; int retval; diff --git a/src/target/mips32_dmaacc.h b/src/target/mips32_dmaacc.h index c8a64fb9..c1aa07dd 100644 --- a/src/target/mips32_dmaacc.h +++ b/src/target/mips32_dmaacc.h @@ -34,23 +34,23 @@ #define RETRY_ATTEMPTS 0 -int mips32_dmaacc_read_mem(mips_ejtag_t *ejtag_info, +int mips32_dmaacc_read_mem(struct mips_ejtag *ejtag_info, uint32_t addr, int size, int count, void *buf); -int mips32_dmaacc_write_mem(mips_ejtag_t *ejtag_info, +int mips32_dmaacc_write_mem(struct mips_ejtag *ejtag_info, uint32_t addr, int size, int count, void *buf); -int mips32_dmaacc_read_mem8(mips_ejtag_t *ejtag_info, +int mips32_dmaacc_read_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf); -int mips32_dmaacc_read_mem16(mips_ejtag_t *ejtag_info, +int mips32_dmaacc_read_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf); -int mips32_dmaacc_read_mem32(mips_ejtag_t *ejtag_info, +int mips32_dmaacc_read_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf); -int mips32_dmaacc_write_mem8(mips_ejtag_t *ejtag_info, +int mips32_dmaacc_write_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf); -int mips32_dmaacc_write_mem16(mips_ejtag_t *ejtag_info, +int mips32_dmaacc_write_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf); -int mips32_dmaacc_write_mem32(mips_ejtag_t *ejtag_info, +int mips32_dmaacc_write_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf); #endif diff --git a/src/target/mips32_pracc.c b/src/target/mips32_pracc.c index 0d33f391..4f597a5e 100644 --- a/src/target/mips32_pracc.c +++ b/src/target/mips32_pracc.c @@ -86,10 +86,10 @@ typedef struct { int code_len; uint32_t stack[32]; int stack_offset; - mips_ejtag_t *ejtag_info; + struct mips_ejtag *ejtag_info; } mips32_pracc_context; -static int wait_for_pracc_rw(mips_ejtag_t *ejtag_info, uint32_t *ctrl) +static int wait_for_pracc_rw(struct mips_ejtag *ejtag_info, uint32_t *ctrl) { uint32_t ejtag_ctrl; @@ -110,7 +110,7 @@ static int wait_for_pracc_rw(mips_ejtag_t *ejtag_info, uint32_t *ctrl) static int mips32_pracc_exec_read(mips32_pracc_context *ctx, uint32_t address) { - mips_ejtag_t *ejtag_info = ctx->ejtag_info; + struct mips_ejtag *ejtag_info = ctx->ejtag_info; int offset; uint32_t ejtag_ctrl, data; @@ -168,7 +168,7 @@ static int mips32_pracc_exec_write(mips32_pracc_context *ctx, uint32_t address) { uint32_t ejtag_ctrl,data; int offset; - mips_ejtag_t *ejtag_info = ctx->ejtag_info; + struct mips_ejtag *ejtag_info = ctx->ejtag_info; mips_ejtag_set_instr(ctx->ejtag_info, EJTAG_INST_DATA, NULL); mips_ejtag_drscan_32(ctx->ejtag_info, &data); @@ -207,7 +207,7 @@ static int mips32_pracc_exec_write(mips32_pracc_context *ctx, uint32_t address) return ERROR_OK; } -int mips32_pracc_exec(mips_ejtag_t *ejtag_info, int code_len, uint32_t *code, int num_param_in, uint32_t *param_in, int num_param_out, uint32_t *param_out, int cycle) +int mips32_pracc_exec(struct mips_ejtag *ejtag_info, int code_len, uint32_t *code, int num_param_in, uint32_t *param_in, int num_param_out, uint32_t *param_out, int cycle) { uint32_t ejtag_ctrl; uint32_t address, data; @@ -269,7 +269,7 @@ int mips32_pracc_exec(mips_ejtag_t *ejtag_info, int code_len, uint32_t *code, in return ERROR_OK; } -int mips32_pracc_read_mem(mips_ejtag_t *ejtag_info, uint32_t addr, int size, int count, void *buf) +int mips32_pracc_read_mem(struct mips_ejtag *ejtag_info, uint32_t addr, int size, int count, void *buf) { switch (size) { @@ -287,7 +287,7 @@ int mips32_pracc_read_mem(mips_ejtag_t *ejtag_info, uint32_t addr, int size, int return ERROR_OK; } -int mips32_pracc_read_mem32(mips_ejtag_t *ejtag_info, uint32_t addr, int count, uint32_t *buf) +int mips32_pracc_read_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf) { uint32_t code[] = { /* start: */ @@ -361,7 +361,7 @@ int mips32_pracc_read_mem32(mips_ejtag_t *ejtag_info, uint32_t addr, int count, return retval; } -int mips32_pracc_read_u32(mips_ejtag_t *ejtag_info, uint32_t addr, uint32_t *buf) +int mips32_pracc_read_u32(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t *buf) { uint32_t code[] = { /* start: */ @@ -395,7 +395,7 @@ int mips32_pracc_read_u32(mips_ejtag_t *ejtag_info, uint32_t addr, uint32_t *buf return retval; } -int mips32_pracc_read_mem16(mips_ejtag_t *ejtag_info, uint32_t addr, int count, uint16_t *buf) +int mips32_pracc_read_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf) { uint32_t code[] = { /* start: */ @@ -474,7 +474,7 @@ int mips32_pracc_read_mem16(mips_ejtag_t *ejtag_info, uint32_t addr, int count, return ERROR_OK; } -int mips32_pracc_read_mem8(mips_ejtag_t *ejtag_info, uint32_t addr, int count, uint8_t *buf) +int mips32_pracc_read_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf) { uint32_t code[] = { /* start: */ @@ -553,7 +553,7 @@ int mips32_pracc_read_mem8(mips_ejtag_t *ejtag_info, uint32_t addr, int count, u return ERROR_OK; } -int mips32_pracc_write_mem(mips_ejtag_t *ejtag_info, uint32_t addr, int size, int count, void *buf) +int mips32_pracc_write_mem(struct mips_ejtag *ejtag_info, uint32_t addr, int size, int count, void *buf) { switch (size) { @@ -571,7 +571,7 @@ int mips32_pracc_write_mem(mips_ejtag_t *ejtag_info, uint32_t addr, int size, in return ERROR_OK; } -int mips32_pracc_write_mem32(mips_ejtag_t *ejtag_info, uint32_t addr, int count, uint32_t *buf) +int mips32_pracc_write_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf) { //NC: use destination pointer as loop counter (last address is in $10) @@ -620,7 +620,7 @@ int mips32_pracc_write_mem32(mips_ejtag_t *ejtag_info, uint32_t addr, int count, return ERROR_OK; } -int mips32_pracc_write_u32(mips_ejtag_t *ejtag_info, uint32_t addr, uint32_t *buf) +int mips32_pracc_write_u32(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t *buf) { uint32_t code[] = { /* start: */ @@ -653,7 +653,7 @@ int mips32_pracc_write_u32(mips_ejtag_t *ejtag_info, uint32_t addr, uint32_t *bu return ERROR_OK; } -int mips32_pracc_write_mem16(mips_ejtag_t *ejtag_info, uint32_t addr, int count, uint16_t *buf) +int mips32_pracc_write_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf) { uint32_t code[] = { /* start: */ @@ -713,7 +713,7 @@ int mips32_pracc_write_mem16(mips_ejtag_t *ejtag_info, uint32_t addr, int count, return ERROR_OK; } -int mips32_pracc_write_mem8(mips_ejtag_t *ejtag_info, uint32_t addr, int count, uint8_t *buf) +int mips32_pracc_write_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf) { uint32_t code[] = { /* start: */ @@ -774,7 +774,7 @@ int mips32_pracc_write_mem8(mips_ejtag_t *ejtag_info, uint32_t addr, int count, return retval; } -int mips32_pracc_write_regs(mips_ejtag_t *ejtag_info, uint32_t *regs) +int mips32_pracc_write_regs(struct mips_ejtag *ejtag_info, uint32_t *regs) { uint32_t code[] = { /* start: */ @@ -846,7 +846,7 @@ int mips32_pracc_write_regs(mips_ejtag_t *ejtag_info, uint32_t *regs) return retval; } -int mips32_pracc_read_regs(mips_ejtag_t *ejtag_info, uint32_t *regs) +int mips32_pracc_read_regs(struct mips_ejtag *ejtag_info, uint32_t *regs) { uint32_t code[] = { /* start: */ diff --git a/src/target/mips32_pracc.h b/src/target/mips32_pracc.h index 866f6f50..3b124c78 100644 --- a/src/target/mips32_pracc.h +++ b/src/target/mips32_pracc.h @@ -37,33 +37,33 @@ #define NEG16(v) (((~(v)) + 1) & 0xFFFF) /*#define NEG18(v) (((~(v)) + 1) & 0x3FFFF)*/ -int mips32_pracc_read_mem(mips_ejtag_t *ejtag_info, +int mips32_pracc_read_mem(struct mips_ejtag *ejtag_info, uint32_t addr, int size, int count, void *buf); -int mips32_pracc_write_mem(mips_ejtag_t *ejtag_info, +int mips32_pracc_write_mem(struct mips_ejtag *ejtag_info, uint32_t addr, int size, int count, void *buf); -int mips32_pracc_read_mem8(mips_ejtag_t *ejtag_info, +int mips32_pracc_read_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf); -int mips32_pracc_read_mem16(mips_ejtag_t *ejtag_info, +int mips32_pracc_read_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf); -int mips32_pracc_read_mem32(mips_ejtag_t *ejtag_info, +int mips32_pracc_read_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf); -int mips32_pracc_read_u32(mips_ejtag_t *ejtag_info, +int mips32_pracc_read_u32(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t *buf); -int mips32_pracc_write_mem8(mips_ejtag_t *ejtag_info, +int mips32_pracc_write_mem8(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint8_t *buf); -int mips32_pracc_write_mem16(mips_ejtag_t *ejtag_info, +int mips32_pracc_write_mem16(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint16_t *buf); -int mips32_pracc_write_mem32(mips_ejtag_t *ejtag_info, +int mips32_pracc_write_mem32(struct mips_ejtag *ejtag_info, uint32_t addr, int count, uint32_t *buf); -int mips32_pracc_write_u32(mips_ejtag_t *ejtag_info, +int mips32_pracc_write_u32(struct mips_ejtag *ejtag_info, uint32_t addr, uint32_t *buf); -int mips32_pracc_read_regs(mips_ejtag_t *ejtag_info, uint32_t *regs); -int mips32_pracc_write_regs(mips_ejtag_t *ejtag_info, uint32_t *regs); +int mips32_pracc_read_regs(struct mips_ejtag *ejtag_info, uint32_t *regs); +int mips32_pracc_write_regs(struct mips_ejtag *ejtag_info, uint32_t *regs); -int mips32_pracc_exec(mips_ejtag_t *ejtag_info, int code_len, uint32_t *code, +int mips32_pracc_exec(struct mips_ejtag *ejtag_info, int code_len, uint32_t *code, int num_param_in, uint32_t *param_in, int num_param_out, uint32_t *param_out, int cycle); diff --git a/src/target/mips_ejtag.c b/src/target/mips_ejtag.c index d23411f4..6f06d9a3 100644 --- a/src/target/mips_ejtag.c +++ b/src/target/mips_ejtag.c @@ -27,7 +27,7 @@ #include "mips_ejtag.h" -int mips_ejtag_set_instr(mips_ejtag_t *ejtag_info, int new_instr, void *delete_me_and_submit_patch) +int mips_ejtag_set_instr(struct mips_ejtag *ejtag_info, int new_instr, void *delete_me_and_submit_patch) { struct jtag_tap *tap; @@ -52,7 +52,7 @@ int mips_ejtag_set_instr(mips_ejtag_t *ejtag_info, int new_instr, void *delete_m return ERROR_OK; } -int mips_ejtag_get_idcode(mips_ejtag_t *ejtag_info, uint32_t *idcode) +int mips_ejtag_get_idcode(struct mips_ejtag *ejtag_info, uint32_t *idcode) { struct scan_field field; @@ -75,7 +75,7 @@ int mips_ejtag_get_idcode(mips_ejtag_t *ejtag_info, uint32_t *idcode) return ERROR_OK; } -int mips_ejtag_get_impcode(mips_ejtag_t *ejtag_info, uint32_t *impcode) +int mips_ejtag_get_impcode(struct mips_ejtag *ejtag_info, uint32_t *impcode) { struct scan_field field; @@ -98,7 +98,7 @@ int mips_ejtag_get_impcode(mips_ejtag_t *ejtag_info, uint32_t *impcode) return ERROR_OK; } -int mips_ejtag_drscan_32(mips_ejtag_t *ejtag_info, uint32_t *data) +int mips_ejtag_drscan_32(struct mips_ejtag *ejtag_info, uint32_t *data) { struct jtag_tap *tap; tap = ejtag_info->tap; @@ -130,7 +130,7 @@ int mips_ejtag_drscan_32(mips_ejtag_t *ejtag_info, uint32_t *data) return ERROR_OK; } -int mips_ejtag_step_enable(mips_ejtag_t *ejtag_info) +int mips_ejtag_step_enable(struct mips_ejtag *ejtag_info) { uint32_t code[] = { MIPS32_MTC0(1,31,0), /* move $1 to COP0 DeSave */ @@ -148,7 +148,7 @@ int mips_ejtag_step_enable(mips_ejtag_t *ejtag_info) return ERROR_OK; } -int mips_ejtag_step_disable(mips_ejtag_t *ejtag_info) +int mips_ejtag_step_disable(struct mips_ejtag *ejtag_info) { uint32_t code[] = { MIPS32_MTC0(15,31,0), /* move $15 to COP0 DeSave */ @@ -175,14 +175,14 @@ int mips_ejtag_step_disable(mips_ejtag_t *ejtag_info) return ERROR_OK; } -int mips_ejtag_config_step(mips_ejtag_t *ejtag_info, int enable_step) +int mips_ejtag_config_step(struct mips_ejtag *ejtag_info, int enable_step) { if (enable_step) return mips_ejtag_step_enable(ejtag_info); return mips_ejtag_step_disable(ejtag_info); } -int mips_ejtag_enter_debug(mips_ejtag_t *ejtag_info) +int mips_ejtag_enter_debug(struct mips_ejtag *ejtag_info) { uint32_t ejtag_ctrl; jtag_set_end_state(TAP_IDLE); @@ -202,7 +202,7 @@ int mips_ejtag_enter_debug(mips_ejtag_t *ejtag_info) return ERROR_OK; } -int mips_ejtag_exit_debug(mips_ejtag_t *ejtag_info) +int mips_ejtag_exit_debug(struct mips_ejtag *ejtag_info) { uint32_t inst; inst = MIPS32_DRET; @@ -213,7 +213,7 @@ int mips_ejtag_exit_debug(mips_ejtag_t *ejtag_info) return ERROR_OK; } -int mips_ejtag_read_debug(mips_ejtag_t *ejtag_info, uint32_t* debug_reg) +int mips_ejtag_read_debug(struct mips_ejtag *ejtag_info, uint32_t* debug_reg) { /* read ejtag ECR */ uint32_t code[] = { @@ -240,7 +240,7 @@ int mips_ejtag_read_debug(mips_ejtag_t *ejtag_info, uint32_t* debug_reg) return ERROR_OK; } -int mips_ejtag_init(mips_ejtag_t *ejtag_info) +int mips_ejtag_init(struct mips_ejtag *ejtag_info) { uint32_t ejtag_version; diff --git a/src/target/mips_ejtag.h b/src/target/mips_ejtag.h index 74cb21df..6a653d4f 100644 --- a/src/target/mips_ejtag.h +++ b/src/target/mips_ejtag.h @@ -102,25 +102,25 @@ #define EJTAG_DBCn_BLM_SHIFT 4 #define EJTAG_DBCn_BE (1 << 0) -typedef struct mips_ejtag_s +struct mips_ejtag { struct jtag_tap *tap; uint32_t impcode; uint32_t idcode; /*int use_dma;*/ uint32_t ejtag_ctrl; -} mips_ejtag_t; +}; -int mips_ejtag_set_instr(mips_ejtag_t *ejtag_info, +int mips_ejtag_set_instr(struct mips_ejtag *ejtag_info, int new_instr, void *delete_me_and_submit_patch); -int mips_ejtag_enter_debug(mips_ejtag_t *ejtag_info); -int mips_ejtag_exit_debug(mips_ejtag_t *ejtag_info); -int mips_ejtag_get_impcode(mips_ejtag_t *ejtag_info, uint32_t *impcode); -int mips_ejtag_get_idcode(mips_ejtag_t *ejtag_info, uint32_t *idcode); -int mips_ejtag_drscan_32(mips_ejtag_t *ejtag_info, uint32_t *data); +int mips_ejtag_enter_debug(struct mips_ejtag *ejtag_info); +int mips_ejtag_exit_debug(struct mips_ejtag *ejtag_info); +int mips_ejtag_get_impcode(struct mips_ejtag *ejtag_info, uint32_t *impcode); +int mips_ejtag_get_idcode(struct mips_ejtag *ejtag_info, uint32_t *idcode); +int mips_ejtag_drscan_32(struct mips_ejtag *ejtag_info, uint32_t *data); -int mips_ejtag_init(mips_ejtag_t *ejtag_info); -int mips_ejtag_config_step(mips_ejtag_t *ejtag_info, int enable_step); -int mips_ejtag_read_debug(mips_ejtag_t *ejtag_info, uint32_t* debug_reg); +int mips_ejtag_init(struct mips_ejtag *ejtag_info); +int mips_ejtag_config_step(struct mips_ejtag *ejtag_info, int enable_step); +int mips_ejtag_read_debug(struct mips_ejtag *ejtag_info, uint32_t* debug_reg); #endif /* MIPS_EJTAG */ diff --git a/src/target/mips_m4k.c b/src/target/mips_m4k.c index fa40574e..580c0602 100644 --- a/src/target/mips_m4k.c +++ b/src/target/mips_m4k.c @@ -123,7 +123,7 @@ int mips_m4k_examine_debug_reason(target_t *target) int mips_m4k_debug_entry(target_t *target) { struct mips32_common *mips32 = target->arch_info; - mips_ejtag_t *ejtag_info = &mips32->ejtag_info; + struct mips_ejtag *ejtag_info = &mips32->ejtag_info; uint32_t debug_reg; /* read debug register */ @@ -155,7 +155,7 @@ int mips_m4k_poll(target_t *target) { int retval; struct mips32_common *mips32 = target->arch_info; - mips_ejtag_t *ejtag_info = &mips32->ejtag_info; + struct mips_ejtag *ejtag_info = &mips32->ejtag_info; uint32_t ejtag_ctrl = ejtag_info->ejtag_ctrl; /* read ejtag control reg */ @@ -215,7 +215,7 @@ int mips_m4k_poll(target_t *target) int mips_m4k_halt(struct target_s *target) { struct mips32_common *mips32 = target->arch_info; - mips_ejtag_t *ejtag_info = &mips32->ejtag_info; + struct mips_ejtag *ejtag_info = &mips32->ejtag_info; LOG_DEBUG("target->state: %s", target_state_name(target)); @@ -260,7 +260,7 @@ int mips_m4k_halt(struct target_s *target) int mips_m4k_assert_reset(target_t *target) { struct mips32_common *mips32 = target->arch_info; - mips_ejtag_t *ejtag_info = &mips32->ejtag_info; + struct mips_ejtag *ejtag_info = &mips32->ejtag_info; LOG_DEBUG("target->state: %s", target_state_name(target)); @@ -339,7 +339,7 @@ int mips_m4k_soft_reset_halt(struct target_s *target) int mips_m4k_single_step_core(target_t *target) { struct mips32_common *mips32 = target->arch_info; - mips_ejtag_t *ejtag_info = &mips32->ejtag_info; + struct mips_ejtag *ejtag_info = &mips32->ejtag_info; /* configure single step mode */ mips_ejtag_config_step(ejtag_info, 1); @@ -358,7 +358,7 @@ int mips_m4k_single_step_core(target_t *target) int mips_m4k_resume(struct target_s *target, int current, uint32_t address, int handle_breakpoints, int debug_execution) { struct mips32_common *mips32 = target->arch_info; - mips_ejtag_t *ejtag_info = &mips32->ejtag_info; + struct mips_ejtag *ejtag_info = &mips32->ejtag_info; breakpoint_t *breakpoint = NULL; uint32_t resume_pc; @@ -430,7 +430,7 @@ int mips_m4k_step(struct target_s *target, int current, uint32_t address, int ha { /* get pointers to arch-specific information */ struct mips32_common *mips32 = target->arch_info; - mips_ejtag_t *ejtag_info = &mips32->ejtag_info; + struct mips_ejtag *ejtag_info = &mips32->ejtag_info; breakpoint_t *breakpoint = NULL; if (target->state != TARGET_HALTED) @@ -846,7 +846,7 @@ void mips_m4k_enable_watchpoints(struct target_s *target) int mips_m4k_read_memory(struct target_s *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer) { struct mips32_common *mips32 = target->arch_info; - mips_ejtag_t *ejtag_info = &mips32->ejtag_info; + struct mips_ejtag *ejtag_info = &mips32->ejtag_info; LOG_DEBUG("address: 0x%8.8" PRIx32 ", size: 0x%8.8" PRIx32 ", count: 0x%8.8" PRIx32 "", address, size, count); @@ -878,7 +878,7 @@ int mips_m4k_read_memory(struct target_s *target, uint32_t address, uint32_t siz int mips_m4k_write_memory(struct target_s *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer) { struct mips32_common *mips32 = target->arch_info; - mips_ejtag_t *ejtag_info = &mips32->ejtag_info; + struct mips_ejtag *ejtag_info = &mips32->ejtag_info; LOG_DEBUG("address: 0x%8.8" PRIx32 ", size: 0x%8.8" PRIx32 ", count: 0x%8.8" PRIx32 "", address, size, count); @@ -943,7 +943,7 @@ int mips_m4k_examine(struct target_s *target) { int retval; struct mips32_common *mips32 = target->arch_info; - mips_ejtag_t *ejtag_info = &mips32->ejtag_info; + struct mips_ejtag *ejtag_info = &mips32->ejtag_info; uint32_t idcode = 0; if (!target_was_examined(target)) |