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>
if (ctx->retval != ERROR_OK) /* On previous out of memory, return */
return;
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) {
ctx->max_code += PRACC_BLOCK;
ctx->pracc_list = p;
#define PRACC_BLOCK 128 /* 1 Kbyte */
-typedef struct {
+struct pa_list {
uint32_t instr;
uint32_t addr;
-} pa_list;
+};
struct pracc_queue_info {
struct mips_ejtag *ejtag_info;
int code_count;
int store_count;
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);
#define STACK_DEPTH 32
-typedef struct {
+struct mips64_pracc_context {
uint64_t *local_iparam;
unsigned num_iparam;
uint64_t *local_oparam;
uint64_t stack[STACK_DEPTH];
unsigned stack_offset;
struct mips_ejtag *ejtag_info;
-} mips64_pracc_context;
+};
static int wait_for_pracc_rw(struct mips_ejtag *ejtag_info, uint32_t *ctrl)
{
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;
unsigned offset;
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;
uint64_t data;
{
uint32_t ejtag_ctrl;
uint64_t address = 0, address_prev = 0, data;
- mips64_pracc_context ctx;
+ struct mips64_pracc_context ctx;
int retval;
int pass = 0;
bool first_time_call = true;
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};
/* execute our dret instruction */