target/mips: Remove typedef'd struct
The C style guide forbids typedef'd structs, see 'Naming Rules'. Change-Id: I449590251056c478c05105cdc18014ab4eb77ed8 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/6033 Tested-by: jenkins Reviewed-by: Oleksij Rempel <linux@rempel-privat.de> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
parent
5fd78b0523
commit
02abae8cdf
|
@ -317,7 +317,7 @@ void pracc_add(struct pracc_queue_info *ctx, uint32_t addr, uint32_t instr)
|
||||||
if (ctx->retval != ERROR_OK) /* On previous out of memory, return */
|
if (ctx->retval != ERROR_OK) /* On previous out of memory, return */
|
||||||
return;
|
return;
|
||||||
if (ctx->code_count == ctx->max_code) {
|
if (ctx->code_count == ctx->max_code) {
|
||||||
void *p = realloc(ctx->pracc_list, sizeof(pa_list) * (ctx->max_code + PRACC_BLOCK));
|
void *p = realloc(ctx->pracc_list, sizeof(struct pa_list) * (ctx->max_code + PRACC_BLOCK));
|
||||||
if (p) {
|
if (p) {
|
||||||
ctx->max_code += PRACC_BLOCK;
|
ctx->max_code += PRACC_BLOCK;
|
||||||
ctx->pracc_list = p;
|
ctx->pracc_list = p;
|
||||||
|
|
|
@ -47,10 +47,10 @@
|
||||||
|
|
||||||
#define PRACC_BLOCK 128 /* 1 Kbyte */
|
#define PRACC_BLOCK 128 /* 1 Kbyte */
|
||||||
|
|
||||||
typedef struct {
|
struct pa_list {
|
||||||
uint32_t instr;
|
uint32_t instr;
|
||||||
uint32_t addr;
|
uint32_t addr;
|
||||||
} pa_list;
|
};
|
||||||
|
|
||||||
struct pracc_queue_info {
|
struct pracc_queue_info {
|
||||||
struct mips_ejtag *ejtag_info;
|
struct mips_ejtag *ejtag_info;
|
||||||
|
@ -59,7 +59,7 @@ struct pracc_queue_info {
|
||||||
int code_count;
|
int code_count;
|
||||||
int store_count;
|
int store_count;
|
||||||
int max_code; /* max instructions with currently allocated memory */
|
int max_code; /* max instructions with currently allocated memory */
|
||||||
pa_list *pracc_list; /* Code and store addresses at dmseg */
|
struct pa_list *pracc_list; /* Code and store addresses at dmseg */
|
||||||
};
|
};
|
||||||
|
|
||||||
void pracc_queue_init(struct pracc_queue_info *ctx);
|
void pracc_queue_init(struct pracc_queue_info *ctx);
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
#define STACK_DEPTH 32
|
#define STACK_DEPTH 32
|
||||||
|
|
||||||
typedef struct {
|
struct mips64_pracc_context {
|
||||||
uint64_t *local_iparam;
|
uint64_t *local_iparam;
|
||||||
unsigned num_iparam;
|
unsigned num_iparam;
|
||||||
uint64_t *local_oparam;
|
uint64_t *local_oparam;
|
||||||
|
@ -34,7 +34,7 @@ typedef struct {
|
||||||
uint64_t stack[STACK_DEPTH];
|
uint64_t stack[STACK_DEPTH];
|
||||||
unsigned stack_offset;
|
unsigned stack_offset;
|
||||||
struct mips_ejtag *ejtag_info;
|
struct mips_ejtag *ejtag_info;
|
||||||
} mips64_pracc_context;
|
};
|
||||||
|
|
||||||
static int wait_for_pracc_rw(struct mips_ejtag *ejtag_info, uint32_t *ctrl)
|
static int wait_for_pracc_rw(struct mips_ejtag *ejtag_info, uint32_t *ctrl)
|
||||||
{
|
{
|
||||||
|
@ -61,7 +61,7 @@ static int wait_for_pracc_rw(struct mips_ejtag *ejtag_info, uint32_t *ctrl)
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mips64_pracc_exec_read(mips64_pracc_context *ctx, uint64_t address)
|
static int mips64_pracc_exec_read(struct mips64_pracc_context *ctx, uint64_t address)
|
||||||
{
|
{
|
||||||
struct mips_ejtag *ejtag_info = ctx->ejtag_info;
|
struct mips_ejtag *ejtag_info = ctx->ejtag_info;
|
||||||
unsigned offset;
|
unsigned offset;
|
||||||
|
@ -149,7 +149,7 @@ static int mips64_pracc_exec_read(mips64_pracc_context *ctx, uint64_t address)
|
||||||
return jtag_execute_queue();
|
return jtag_execute_queue();
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mips64_pracc_exec_write(mips64_pracc_context *ctx, uint64_t address)
|
static int mips64_pracc_exec_write(struct mips64_pracc_context *ctx, uint64_t address)
|
||||||
{
|
{
|
||||||
uint32_t ejtag_ctrl;
|
uint32_t ejtag_ctrl;
|
||||||
uint64_t data;
|
uint64_t data;
|
||||||
|
@ -214,7 +214,7 @@ int mips64_pracc_exec(struct mips_ejtag *ejtag_info,
|
||||||
{
|
{
|
||||||
uint32_t ejtag_ctrl;
|
uint32_t ejtag_ctrl;
|
||||||
uint64_t address = 0, address_prev = 0, data;
|
uint64_t address = 0, address_prev = 0, data;
|
||||||
mips64_pracc_context ctx;
|
struct mips64_pracc_context ctx;
|
||||||
int retval;
|
int retval;
|
||||||
int pass = 0;
|
int pass = 0;
|
||||||
bool first_time_call = true;
|
bool first_time_call = true;
|
||||||
|
|
|
@ -268,7 +268,7 @@ error:
|
||||||
|
|
||||||
int mips_ejtag_exit_debug(struct mips_ejtag *ejtag_info)
|
int mips_ejtag_exit_debug(struct mips_ejtag *ejtag_info)
|
||||||
{
|
{
|
||||||
pa_list pracc_list = {.instr = MIPS32_DRET(ejtag_info->isa), .addr = 0};
|
struct pa_list pracc_list = {.instr = MIPS32_DRET(ejtag_info->isa), .addr = 0};
|
||||||
struct pracc_queue_info ctx = {.max_code = 1, .pracc_list = &pracc_list, .code_count = 1, .store_count = 0};
|
struct pracc_queue_info ctx = {.max_code = 1, .pracc_list = &pracc_list, .code_count = 1, .store_count = 0};
|
||||||
|
|
||||||
/* execute our dret instruction */
|
/* execute our dret instruction */
|
||||||
|
|
Loading…
Reference in New Issue