Commit a8141caf authored by Zachary T Welch's avatar Zachary T Welch
Browse files

mips_ejtag_t -> struct mips_ejtag

Remove misleading typedef and redundant suffix from struct mips_ejtag.
parent ccde06a0
......@@ -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;
......
......@@ -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++)
{
......
......@@ -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;
......
......@@ -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;
......
......@@ -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
......@@ -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: */
......
......@@ -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);
......
......@@ -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;
......
......@@ -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 */
......@@ -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))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment