aboutsummaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-23 22:44:17 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-23 22:44:17 +0000
commit8959de9f679cfd0436d731fd91b88a68b9a75fa6 (patch)
tree8d9bc182b4adc0e718ffafdbd12469d8c8bb14d9 /src/target
parent84df52f9ea78e2d71bde648a16b69d80404c6421 (diff)
downloadriscv-openocd-8959de9f679cfd0436d731fd91b88a68b9a75fa6.zip
riscv-openocd-8959de9f679cfd0436d731fd91b88a68b9a75fa6.tar.gz
riscv-openocd-8959de9f679cfd0436d731fd91b88a68b9a75fa6.tar.bz2
- Fixes '+' whitespace
- Replace ')\(+\)(' with ') \1 ('. - Replace ')\(+\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(+\)(' with '\1 \2 ('. - Replace '\(\w\)\(+\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2373 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target')
-rw-r--r--src/target/arm11.c2
-rw-r--r--src/target/arm7_9_common.c6
-rw-r--r--src/target/arm7tdmi.c6
-rw-r--r--src/target/arm9tdmi.c2
-rw-r--r--src/target/arm_adi_v5.c2
-rw-r--r--src/target/armv4_5.c2
-rw-r--r--src/target/etb.c52
-rw-r--r--src/target/fa526.c2
-rw-r--r--src/target/image.c4
-rw-r--r--src/target/mips32_dmaacc.c12
-rw-r--r--src/target/mips32_pracc.c18
-rw-r--r--src/target/oocd_trace.c16
-rw-r--r--src/target/target.c46
-rw-r--r--src/target/xscale.c24
14 files changed, 97 insertions, 97 deletions
diff --git a/src/target/arm11.c b/src/target/arm11.c
index 29f1157..54289d7 100644
--- a/src/target/arm11.c
+++ b/src/target/arm11.c
@@ -1399,7 +1399,7 @@ int arm11_run_algorithm(struct target_s *target, int num_mem_params, mem_param_t
LOG_DEBUG("Save %zi: 0x%" PRIx32 "",i,context[i]);
}
- cpsr = buf_get_u32((uint8_t*)(arm11->reg_values+ARM11_RC_CPSR),0,32);
+ cpsr = buf_get_u32((uint8_t*)(arm11->reg_values + ARM11_RC_CPSR),0,32);
LOG_DEBUG("Save CPSR: 0x%" PRIx32 "", cpsr);
for (int i = 0; i < num_mem_params; i++)
diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c
index c4b7c6a..e8023c8 100644
--- a/src/target/arm7_9_common.c
+++ b/src/target/arm7_9_common.c
@@ -2672,14 +2672,14 @@ int arm7_9_bulk_write_memory(target_t *target, uint32_t address, uint32_t count,
dcc_count = count;
dcc_buffer = buffer;
retval = armv4_5_run_algorithm_inner(target, 0, NULL, 1, reg_params,
- arm7_9->dcc_working_area->address, arm7_9->dcc_working_area->address+6*4, 20*1000, &armv4_5_info, arm7_9_dcc_completion);
+ arm7_9->dcc_working_area->address, arm7_9->dcc_working_area->address + 6*4, 20*1000, &armv4_5_info, arm7_9_dcc_completion);
if (retval == ERROR_OK)
{
uint32_t endaddress = buf_get_u32(reg_params[0].value, 0, 32);
- if (endaddress != (address+count*4))
+ if (endaddress != (address + count*4))
{
- LOG_ERROR("DCC write failed, expected end address 0x%08" PRIx32 " got 0x%0" PRIx32 "", (address+count*4), endaddress);
+ LOG_ERROR("DCC write failed, expected end address 0x%08" PRIx32 " got 0x%0" PRIx32 "", (address + count*4), endaddress);
retval = ERROR_FAIL;
}
}
diff --git a/src/target/arm7tdmi.c b/src/target/arm7tdmi.c
index 03c4966..ba533a4 100644
--- a/src/target/arm7tdmi.c
+++ b/src/target/arm7tdmi.c
@@ -383,7 +383,7 @@ void arm7tdmi_read_core_regs(target_t *target, uint32_t mask, uint32_t* core_reg
for (i = 0; i <= 15; i++)
{
if (mask & (1 << i))
- /* nothing fetched, STM still in EXECUTE (1+i cycle) */
+ /* nothing fetched, STM still in EXECUTE (1 + i cycle) */
arm7tdmi_clock_data_in(jtag_info, core_regs[i]);
}
}
@@ -412,7 +412,7 @@ void arm7tdmi_read_core_regs_target_buffer(target_t *target, uint32_t mask, void
for (i = 0; i <= 15; i++)
{
- /* nothing fetched, STM still in EXECUTE (1+i cycle), read databus */
+ /* nothing fetched, STM still in EXECUTE (1 + i cycle), read databus */
if (mask & (1 << i))
{
switch (size)
@@ -522,7 +522,7 @@ void arm7tdmi_write_core_regs(target_t *target, uint32_t mask, uint32_t core_reg
for (i = 0; i <= 15; i++)
{
if (mask & (1 << i))
- /* nothing fetched, LDM still in EXECUTE (1+i cycle) */
+ /* nothing fetched, LDM still in EXECUTE (1 + i cycle) */
arm7tdmi_clock_out_inner(jtag_info, core_regs[i], 0);
}
arm7tdmi_clock_out_inner(jtag_info, ARMV4_5_NOP, 0);
diff --git a/src/target/arm9tdmi.c b/src/target/arm9tdmi.c
index fac0c8d..3179a61 100644
--- a/src/target/arm9tdmi.c
+++ b/src/target/arm9tdmi.c
@@ -587,7 +587,7 @@ void arm9tdmi_write_core_regs(target_t *target, uint32_t mask, uint32_t core_reg
for (i = 0; i <= 15; i++)
{
if (mask & (1 << i))
- /* nothing fetched, LDM still in EXECUTE (1+i cycle) */
+ /* nothing fetched, LDM still in EXECUTE (1 + i cycle) */
arm9tdmi_clock_out(jtag_info, ARMV4_5_NOP, core_regs[i], NULL, 0);
}
arm9tdmi_clock_out(jtag_info, ARMV4_5_NOP, 0, NULL, 0);
diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c
index 57f6603..126d955 100644
--- a/src/target/arm_adi_v5.c
+++ b/src/target/arm_adi_v5.c
@@ -1093,7 +1093,7 @@ int dap_info_command(struct command_context_s *cmd_ctx, swjdp_common_t *swjdp, i
if (romentry&0x01)
{
uint32_t c_cid0,c_cid1,c_cid2,c_cid3,c_pid0,c_pid1,c_pid2,c_pid3,c_pid4,component_start;
- uint32_t component_base = (uint32_t)((dbgbase&0xFFFFF000)+(int)(romentry&0xFFFFF000));
+ uint32_t component_base = (uint32_t)((dbgbase&0xFFFFF000) + (int)(romentry&0xFFFFF000));
mem_ap_read_atomic_u32(swjdp, (component_base&0xFFFFF000)|0xFE0, &c_pid0);
mem_ap_read_atomic_u32(swjdp, (component_base&0xFFFFF000)|0xFE4, &c_pid1);
mem_ap_read_atomic_u32(swjdp, (component_base&0xFFFFF000)|0xFE8, &c_pid2);
diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c
index f5e906a..33f1a51 100644
--- a/src/target/armv4_5.c
+++ b/src/target/armv4_5.c
@@ -71,7 +71,7 @@ char * armv4_5_mode_strings_list[] =
};
/* Hack! Yuk! allow -1 index, which simplifies codepaths elsewhere in the code */
-char** armv4_5_mode_strings = armv4_5_mode_strings_list+1;
+char** armv4_5_mode_strings = armv4_5_mode_strings_list + 1;
char* armv4_5_state_strings[] =
{
diff --git a/src/target/etb.c b/src/target/etb.c
index 979d7a7..ad6eb03 100644
--- a/src/target/etb.c
+++ b/src/target/etb.c
@@ -204,10 +204,10 @@ static int etb_read_ram(etb_t *etb, uint32_t *data, int num_frames)
else
buf_set_u32(fields[1].out_value, 0, 7, 0);
- fields[0].in_value = (uint8_t *)(data+i);
+ fields[0].in_value = (uint8_t *)(data + i);
jtag_add_dr_scan(3, fields, jtag_get_end_state());
- jtag_add_callback(etb_getbuf, (jtag_callback_data_t)(data+i));
+ jtag_add_callback(etb_getbuf, (jtag_callback_data_t)(data + i));
}
jtag_execute_queue();
@@ -550,32 +550,32 @@ static int etb_read_trace(etm_context_t *etm_ctx)
etm_ctx->trace_data[j].flags |= ETMV1_TRIGGER_CYCLE;
}
- /* trace word j+1 */
- etm_ctx->trace_data[j+1].pipestat = (trace_data[i] & 0x100) >> 8;
- etm_ctx->trace_data[j+1].packet = (trace_data[i] & 0x7800) >> 11;
- etm_ctx->trace_data[j+1].flags = 0;
+ /* trace word j + 1 */
+ etm_ctx->trace_data[j + 1].pipestat = (trace_data[i] & 0x100) >> 8;
+ etm_ctx->trace_data[j + 1].packet = (trace_data[i] & 0x7800) >> 11;
+ etm_ctx->trace_data[j + 1].flags = 0;
if ((trace_data[i] & 0x8000) >> 15)
{
- etm_ctx->trace_data[j+1].flags |= ETMV1_TRACESYNC_CYCLE;
+ etm_ctx->trace_data[j + 1].flags |= ETMV1_TRACESYNC_CYCLE;
}
- if (etm_ctx->trace_data[j+1].pipestat == STAT_TR)
+ if (etm_ctx->trace_data[j + 1].pipestat == STAT_TR)
{
- etm_ctx->trace_data[j+1].pipestat = etm_ctx->trace_data[j+1].packet & 0x7;
- etm_ctx->trace_data[j+1].flags |= ETMV1_TRIGGER_CYCLE;
+ etm_ctx->trace_data[j + 1].pipestat = etm_ctx->trace_data[j + 1].packet & 0x7;
+ etm_ctx->trace_data[j + 1].flags |= ETMV1_TRIGGER_CYCLE;
}
- /* trace word j+2 */
- etm_ctx->trace_data[j+2].pipestat = (trace_data[i] & 0x10000) >> 16;
- etm_ctx->trace_data[j+2].packet = (trace_data[i] & 0x780000) >> 19;
- etm_ctx->trace_data[j+2].flags = 0;
+ /* trace word j + 2 */
+ etm_ctx->trace_data[j + 2].pipestat = (trace_data[i] & 0x10000) >> 16;
+ etm_ctx->trace_data[j + 2].packet = (trace_data[i] & 0x780000) >> 19;
+ etm_ctx->trace_data[j + 2].flags = 0;
if ((trace_data[i] & 0x800000) >> 23)
{
- etm_ctx->trace_data[j+2].flags |= ETMV1_TRACESYNC_CYCLE;
+ etm_ctx->trace_data[j + 2].flags |= ETMV1_TRACESYNC_CYCLE;
}
- if (etm_ctx->trace_data[j+2].pipestat == STAT_TR)
+ if (etm_ctx->trace_data[j + 2].pipestat == STAT_TR)
{
- etm_ctx->trace_data[j+2].pipestat = etm_ctx->trace_data[j+2].packet & 0x7;
- etm_ctx->trace_data[j+2].flags |= ETMV1_TRIGGER_CYCLE;
+ etm_ctx->trace_data[j + 2].pipestat = etm_ctx->trace_data[j + 2].packet & 0x7;
+ etm_ctx->trace_data[j + 2].flags |= ETMV1_TRIGGER_CYCLE;
}
j += 3;
@@ -596,18 +596,18 @@ static int etb_read_trace(etm_context_t *etm_ctx)
etm_ctx->trace_data[j].flags |= ETMV1_TRIGGER_CYCLE;
}
- /* trace word j+1 */
- etm_ctx->trace_data[j+1].pipestat = (trace_data[i] & 0x7000) >> 12;
- etm_ctx->trace_data[j+1].packet = (trace_data[i] & 0x7f8000) >> 15;
- etm_ctx->trace_data[j+1].flags = 0;
+ /* trace word j + 1 */
+ etm_ctx->trace_data[j + 1].pipestat = (trace_data[i] & 0x7000) >> 12;
+ etm_ctx->trace_data[j + 1].packet = (trace_data[i] & 0x7f8000) >> 15;
+ etm_ctx->trace_data[j + 1].flags = 0;
if ((trace_data[i] & 0x800000) >> 23)
{
- etm_ctx->trace_data[j+1].flags |= ETMV1_TRACESYNC_CYCLE;
+ etm_ctx->trace_data[j + 1].flags |= ETMV1_TRACESYNC_CYCLE;
}
- if (etm_ctx->trace_data[j+1].pipestat == STAT_TR)
+ if (etm_ctx->trace_data[j + 1].pipestat == STAT_TR)
{
- etm_ctx->trace_data[j+1].pipestat = etm_ctx->trace_data[j+1].packet & 0x7;
- etm_ctx->trace_data[j+1].flags |= ETMV1_TRIGGER_CYCLE;
+ etm_ctx->trace_data[j + 1].pipestat = etm_ctx->trace_data[j + 1].packet & 0x7;
+ etm_ctx->trace_data[j + 1].flags |= ETMV1_TRIGGER_CYCLE;
}
j += 2;
diff --git a/src/target/fa526.c b/src/target/fa526.c
index bfc91a5..eee9e50 100644
--- a/src/target/fa526.c
+++ b/src/target/fa526.c
@@ -269,7 +269,7 @@ void fa526_write_core_regs(target_t *target, uint32_t mask, uint32_t core_regs[1
for (i = 0; i <= 15; i++)
{
if (mask & (1 << i))
- /* nothing fetched, LDM still in EXECUTE (1+i cycle) */
+ /* nothing fetched, LDM still in EXECUTE (1 + i cycle) */
arm9tdmi_clock_out(jtag_info, ARMV4_5_NOP, core_regs[i], NULL, 0);
}
arm9tdmi_clock_out(jtag_info, ARMV4_5_NOP, 0, NULL, 0);
diff --git a/src/target/image.c b/src/target/image.c
index 5cc7b0d..40b320f 100644
--- a/src/target/image.c
+++ b/src/target/image.c
@@ -454,9 +454,9 @@ static int image_elf_read_section(image_t *image, int section, uint32_t offset,
/* maximal size present in file for the current segment */
read_size = MIN(size, field32(elf,segment->p_filesz)-offset);
LOG_DEBUG("read elf: size = 0x%" PRIx32 " at 0x%" PRIx32 "",read_size,
- field32(elf,segment->p_offset)+offset);
+ field32(elf,segment->p_offset) + offset);
/* read initialized area of the segment */
- if ((retval = fileio_seek(&elf->fileio, field32(elf,segment->p_offset)+offset)) != ERROR_OK)
+ if ((retval = fileio_seek(&elf->fileio, field32(elf,segment->p_offset) + offset)) != ERROR_OK)
{
LOG_ERROR("cannot find ELF segment content, seek failed");
return retval;
diff --git a/src/target/mips32_dmaacc.c b/src/target/mips32_dmaacc.c
index ab082cf..6c57e78 100644
--- a/src/target/mips32_dmaacc.c
+++ b/src/target/mips32_dmaacc.c
@@ -370,7 +370,7 @@ int mips32_dmaacc_read_mem32(mips_ejtag_t *ejtag_info, uint32_t addr, int count,
int retval;
for (i = 0; i<count; i++) {
- if ((retval = ejtag_dma_read(ejtag_info, addr+i*sizeof(*buf), &buf[i])) != ERROR_OK)
+ if ((retval = ejtag_dma_read(ejtag_info, addr + i*sizeof(*buf), &buf[i])) != ERROR_OK)
return retval;
}
@@ -383,7 +383,7 @@ int mips32_dmaacc_read_mem16(mips_ejtag_t *ejtag_info, uint32_t addr, int count,
int retval;
for (i = 0; i<count; i++) {
- if ((retval = ejtag_dma_read_h(ejtag_info, addr+i*sizeof(*buf), &buf[i])) != ERROR_OK)
+ if ((retval = ejtag_dma_read_h(ejtag_info, addr + i*sizeof(*buf), &buf[i])) != ERROR_OK)
return retval;
}
@@ -396,7 +396,7 @@ int mips32_dmaacc_read_mem8(mips_ejtag_t *ejtag_info, uint32_t addr, int count,
int retval;
for (i = 0; i<count; i++) {
- if ((retval = ejtag_dma_read_b(ejtag_info, addr+i*sizeof(*buf), &buf[i])) != ERROR_OK)
+ if ((retval = ejtag_dma_read_b(ejtag_info, addr + i*sizeof(*buf), &buf[i])) != ERROR_OK)
return retval;
}
@@ -424,7 +424,7 @@ int mips32_dmaacc_write_mem32(mips_ejtag_t *ejtag_info, uint32_t addr, int count
int retval;
for (i = 0; i<count; i++) {
- if ((retval = ejtag_dma_write(ejtag_info, addr+i*sizeof(*buf), buf[i])) != ERROR_OK)
+ if ((retval = ejtag_dma_write(ejtag_info, addr + i*sizeof(*buf), buf[i])) != ERROR_OK)
return retval;
}
@@ -437,7 +437,7 @@ int mips32_dmaacc_write_mem16(mips_ejtag_t *ejtag_info, uint32_t addr, int count
int retval;
for (i = 0; i<count; i++) {
- if ((retval = ejtag_dma_write_h(ejtag_info, addr+i*sizeof(*buf), buf[i])) != ERROR_OK)
+ if ((retval = ejtag_dma_write_h(ejtag_info, addr + i*sizeof(*buf), buf[i])) != ERROR_OK)
return retval;
}
@@ -450,7 +450,7 @@ int mips32_dmaacc_write_mem8(mips_ejtag_t *ejtag_info, uint32_t addr, int count,
int retval;
for (i = 0; i<count; i++) {
- if ((retval = ejtag_dma_write_b(ejtag_info, addr+i*sizeof(*buf), buf[i])) != ERROR_OK)
+ if ((retval = ejtag_dma_write_b(ejtag_info, addr + i*sizeof(*buf), buf[i])) != ERROR_OK)
return retval;
}
diff --git a/src/target/mips32_pracc.c b/src/target/mips32_pracc.c
index b727e12..d7d5995 100644
--- a/src/target/mips32_pracc.c
+++ b/src/target/mips32_pracc.c
@@ -302,7 +302,7 @@ int mips32_pracc_read_mem32(mips_ejtag_t *ejtag_info, uint32_t addr, int count,
MIPS32_LUI(8,UPPER16(MIPS32_PRACC_PARAM_IN)), /* $8 = MIPS32_PRACC_PARAM_IN */
MIPS32_ORI(8,8,LOWER16(MIPS32_PRACC_PARAM_IN)),
MIPS32_LW(9,0,8), /* $9 = mem[$8]; read addr */
- MIPS32_LW(10,4,8), /* $10 = mem[$8+4]; read count */
+ MIPS32_LW(10,4,8), /* $10 = mem[$8 + 4]; read count */
MIPS32_LUI(11,UPPER16(MIPS32_PRACC_PARAM_OUT)), /* $11 = MIPS32_PRACC_PARAM_OUT */
MIPS32_ORI(11,11,LOWER16(MIPS32_PRACC_PARAM_OUT)),
MIPS32_NOP,
@@ -410,7 +410,7 @@ int mips32_pracc_read_mem16(mips_ejtag_t *ejtag_info, uint32_t addr, int count,
MIPS32_LUI(8,UPPER16(MIPS32_PRACC_PARAM_IN)), /* $8 = MIPS32_PRACC_PARAM_IN */
MIPS32_ORI(8,8,LOWER16(MIPS32_PRACC_PARAM_IN)),
MIPS32_LW(9,0,8), /* $9 = mem[$8]; read addr */
- MIPS32_LW(10,4,8), /* $10 = mem[$8+4]; read count */
+ MIPS32_LW(10,4,8), /* $10 = mem[$8 + 4]; read count */
MIPS32_LUI(11,UPPER16(MIPS32_PRACC_PARAM_OUT)), /* $11 = MIPS32_PRACC_PARAM_OUT */
MIPS32_ORI(11,11,LOWER16(MIPS32_PRACC_PARAM_OUT)),
MIPS32_NOP,
@@ -489,7 +489,7 @@ int mips32_pracc_read_mem8(mips_ejtag_t *ejtag_info, uint32_t addr, int count, u
MIPS32_LUI(8,UPPER16(MIPS32_PRACC_PARAM_IN)), /* $8 = MIPS32_PRACC_PARAM_IN */
MIPS32_ORI(8,8,LOWER16(MIPS32_PRACC_PARAM_IN)),
MIPS32_LW(9,0,8), /* $9 = mem[$8]; read addr */
- MIPS32_LW(10,4,8), /* $10 = mem[$8+4]; read count */
+ MIPS32_LW(10,4,8), /* $10 = mem[$8 + 4]; read count */
MIPS32_LUI(11,UPPER16(MIPS32_PRACC_PARAM_OUT)), /* $11 = MIPS32_PRACC_PARAM_OUT */
MIPS32_ORI(11,11,LOWER16(MIPS32_PRACC_PARAM_OUT)),
MIPS32_NOP,
@@ -608,7 +608,7 @@ int mips32_pracc_write_mem32(mips_ejtag_t *ejtag_info, uint32_t addr, int count,
};
/* TODO remove array */
- uint32_t param_in[count+2];
+ uint32_t param_in[count + 2];
param_in[0] = addr;
param_in[1] = addr + count * sizeof(uint32_t); //last address
@@ -643,7 +643,7 @@ int mips32_pracc_write_u32(mips_ejtag_t *ejtag_info, uint32_t addr, uint32_t *bu
};
/* TODO remove array */
- uint32_t param_in[1+1];
+ uint32_t param_in[1 + 1];
param_in[0] = addr;
param_in[1] = *buf;
@@ -697,14 +697,14 @@ int mips32_pracc_write_mem16(mips_ejtag_t *ejtag_info, uint32_t addr, int count,
};
/* TODO remove array */
- uint32_t param_in[count+2];
+ uint32_t param_in[count + 2];
int i;
param_in[0] = addr;
param_in[1] = count;
for (i = 0; i < count; i++)
{
- param_in[i+2] = buf[i];
+ param_in[i + 2] = buf[i];
}
mips32_pracc_exec(ejtag_info, sizeof(code)/sizeof(code[0]), code, \
@@ -757,7 +757,7 @@ int mips32_pracc_write_mem8(mips_ejtag_t *ejtag_info, uint32_t addr, int count,
};
/* TODO remove array */
- uint32_t param_in[count+2];
+ uint32_t param_in[count + 2];
int retval;
int i;
param_in[0] = addr;
@@ -765,7 +765,7 @@ int mips32_pracc_write_mem8(mips_ejtag_t *ejtag_info, uint32_t addr, int count,
for (i = 0; i < count; i++)
{
- param_in[i+2] = buf[i];
+ param_in[i + 2] = buf[i];
}
retval = mips32_pracc_exec(ejtag_info, sizeof(code)/sizeof(code[0]), code, \
diff --git a/src/target/oocd_trace.c b/src/target/oocd_trace.c
index 3edfdc0..f2fdaa3 100644
--- a/src/target/oocd_trace.c
+++ b/src/target/oocd_trace.c
@@ -197,7 +197,7 @@ static int oocd_trace_read_trace(etm_context_t *etm_ctx)
num_frames = address;
/* read data into temporary array for unpacking
- * one frame from OpenOCD+trace corresponds to 16 trace cycles
+ * one frame from OpenOCD + trace corresponds to 16 trace cycles
*/
trace_data = malloc(sizeof(uint8_t) * num_frames * 16);
oocd_trace_read_memory(oocd_trace, trace_data, first_frame, num_frames);
@@ -242,7 +242,7 @@ static int oocd_trace_start_capture(etm_context_t *etm_ctx)
if (((etm_ctx->portmode & ETM_PORT_MODE_MASK) != ETM_PORT_NORMAL)
|| ((etm_ctx->portmode & ETM_PORT_WIDTH_MASK) != ETM_PORT_4BIT))
{
- LOG_DEBUG("OpenOCD+trace only supports normal 4-bit ETM mode");
+ LOG_DEBUG("OpenOCD + trace only supports normal 4-bit ETM mode");
return ERROR_ETM_PORTMODE_NOT_SUPPORTED;
}
@@ -251,7 +251,7 @@ static int oocd_trace_start_capture(etm_context_t *etm_ctx)
control |= 0x2; /* half rate clock, capture at twice the clock rate */
}
- /* OpenOCD+trace holds up to 16 million samples,
+ /* OpenOCD + trace holds up to 16 million samples,
* but trigger counts is set in multiples of 16 */
trigger_count = (1048576 * etm_ctx->trigger_percent) / 100;
@@ -316,12 +316,12 @@ static int handle_oocd_trace_config_command(struct command_context_s *cmd_ctx, c
arm7_9->etm_ctx->capture_driver_priv = oocd_trace;
oocd_trace->etm_ctx = arm7_9->etm_ctx;
- /* copy name of TTY device used to communicate with OpenOCD+trace */
+ /* copy name of TTY device used to communicate with OpenOCD + trace */
oocd_trace->tty = strndup(args[1], 256);
}
else
{
- LOG_ERROR("target has no ETM defined, OpenOCD+trace left unconfigured");
+ LOG_ERROR("target has no ETM defined, OpenOCD + trace left unconfigured");
}
return ERROR_OK;
@@ -412,12 +412,12 @@ int oocd_trace_register_commands(struct command_context_s *cmd_ctx)
{
command_t *oocd_trace_cmd;
- oocd_trace_cmd = register_command(cmd_ctx, NULL, "oocd_trace", NULL, COMMAND_ANY, "OpenOCD+trace");
+ oocd_trace_cmd = register_command(cmd_ctx, NULL, "oocd_trace", NULL, COMMAND_ANY, "OpenOCD + trace");
register_command(cmd_ctx, oocd_trace_cmd, "config", handle_oocd_trace_config_command, COMMAND_CONFIG, NULL);
- register_command(cmd_ctx, oocd_trace_cmd, "status", handle_oocd_trace_status_command, COMMAND_EXEC, "display OpenOCD+trace status");
- register_command(cmd_ctx, oocd_trace_cmd, "resync", handle_oocd_trace_resync_command, COMMAND_EXEC, "resync OpenOCD+trace capture clock");
+ register_command(cmd_ctx, oocd_trace_cmd, "status", handle_oocd_trace_status_command, COMMAND_EXEC, "display OpenOCD + trace status");
+ register_command(cmd_ctx, oocd_trace_cmd, "resync", handle_oocd_trace_resync_command, COMMAND_EXEC, "resync OpenOCD + trace capture clock");
return ERROR_OK;
}
diff --git a/src/target/target.c b/src/target/target.c
index ac2528f..ca21f7f 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -246,7 +246,7 @@ static int max_target_number(void)
t = all_targets;
while ( t ){
if ( x < t->target_number ){
- x = (t->target_number)+1;
+ x = (t->target_number) + 1;
}
t = t->next;
}
@@ -268,7 +268,7 @@ static int new_target_number(void)
}
t = t->next;
}
- return x+1;
+ return x + 1;
}
static int target_continuous_poll = 1;
@@ -492,7 +492,7 @@ static int jtag_enable_callback(enum jtag_event event, void *priv)
}
-/* Targets that correctly implement init+examine, i.e.
+/* Targets that correctly implement init + examine, i.e.
* no communication with target during init:
*
* XScale
@@ -1118,7 +1118,7 @@ int target_write_buffer(struct target_s *target, uint32_t address, uint32_t size
if ((address + size - 1) < address)
{
/* GDB can request this when e.g. PC is 0xfffffffc*/
- LOG_ERROR("address+size wrapped(0x%08x, 0x%08x)",
+ LOG_ERROR("address + size wrapped(0x%08x, 0x%08x)",
(unsigned)address,
(unsigned)size);
return ERROR_FAIL;
@@ -1200,7 +1200,7 @@ int target_read_buffer(struct target_s *target, uint32_t address, uint32_t size,
if ((address + size - 1) < address)
{
/* GDB can request this when e.g. PC is 0xfffffffc*/
- LOG_ERROR("address+size wrapped(0x%08" PRIx32 ", 0x%08" PRIx32 ")",
+ LOG_ERROR("address + size wrapped(0x%08" PRIx32 ", 0x%08" PRIx32 ")",
address,
size);
return ERROR_FAIL;
@@ -2279,7 +2279,7 @@ static int handle_load_image_command(struct command_context_s *cmd_ctx, char *cm
/* DANGER!!! beware of unsigned comparision here!!! */
- if ((image.sections[i].base_address+buf_cnt >= min_address)&&
+ if ((image.sections[i].base_address + buf_cnt >= min_address)&&
(image.sections[i].base_address<max_address))
{
if (image.sections[i].base_address<min_address)
@@ -2289,12 +2289,12 @@ static int handle_load_image_command(struct command_context_s *cmd_ctx, char *cm
length -= offset;
}
- if (image.sections[i].base_address+buf_cnt>max_address)
+ if (image.sections[i].base_address + buf_cnt>max_address)
{
- length -= (image.sections[i].base_address+buf_cnt)-max_address;
+ length -= (image.sections[i].base_address + buf_cnt)-max_address;
}
- if ((retval = target_write_buffer(target, image.sections[i].base_address+offset, length, buffer+offset)) != ERROR_OK)
+ if ((retval = target_write_buffer(target, image.sections[i].base_address + offset, length, buffer + offset)) != ERROR_OK)
{
free(buffer);
break;
@@ -2302,7 +2302,7 @@ static int handle_load_image_command(struct command_context_s *cmd_ctx, char *cm
image_size += length;
command_print(cmd_ctx, "%u byte written at address 0x%8.8" PRIx32 "",
(unsigned int)length,
- image.sections[i].base_address+offset);
+ image.sections[i].base_address + offset);
}
free(buffer);
@@ -2834,7 +2834,7 @@ static void writeGmon(uint32_t *samples, uint32_t sampleNum, char *filename)
}
}
- int addressSpace = (max-min+1);
+ int addressSpace = (max-min + 1);
static const uint32_t maxBuckets = 256 * 1024; /* maximum buckets. */
uint32_t length = addressSpace;
@@ -2883,7 +2883,7 @@ static void writeGmon(uint32_t *samples, uint32_t sampleNum, char *filename)
val = 65535;
}
data[i*2]=val&0xff;
- data[i*2+1]=(val >> 8)&0xff;
+ data[i*2 + 1]=(val >> 8)&0xff;
}
free(buckets);
writeData(f, data, length * 2);
@@ -3028,7 +3028,7 @@ static int jim_mem2array(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
return JIM_ERR;
}
- return target_mem2array(interp, target, argc-1, argv+1);
+ return target_mem2array(interp, target, argc-1, argv + 1);
}
static int target_mem2array(Jim_Interp *interp, target_t *target, int argc, Jim_Obj *const *argv)
@@ -3215,7 +3215,7 @@ static int jim_array2mem(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
return JIM_ERR;
}
- return target_array2mem( interp,target, argc-1, argv+1 );
+ return target_array2mem( interp,target, argc-1, argv + 1 );
}
static int target_array2mem(Jim_Interp *interp, target_t *target, int argc, Jim_Obj *const *argv)
@@ -3749,7 +3749,7 @@ static int tcl_target_func( Jim_Interp *interp, int argc, Jim_Obj *const *argv )
};
/* go past the "command" */
- Jim_GetOpt_Setup( &goi, interp, argc-1, argv+1 );
+ Jim_GetOpt_Setup( &goi, interp, argc-1, argv + 1 );
target = Jim_CmdPrivData( goi.interp );
cmd_ctx = Jim_GetAssocData(goi.interp, "context");
@@ -4141,7 +4141,7 @@ static int target_create( Jim_GetOptInfo *goi )
if ( target_types[x] == NULL ){
Jim_SetResult_sprintf( goi->interp, "Unknown target type %s, try one of ", cp );
for ( x = 0 ; target_types[x] ; x++ ){
- if ( target_types[x+1] ){
+ if ( target_types[x + 1] ){
Jim_AppendStrings( goi->interp,
Jim_GetResult(goi->interp),
target_types[x]->name,
@@ -4283,7 +4283,7 @@ static int jim_target( Jim_Interp *interp, int argc, Jim_Obj *const *argv )
cmd_ctx = Jim_GetAssocData( interp, "context" );
- Jim_GetOpt_Setup( &goi, interp, argc-1, argv+1 );
+ Jim_GetOpt_Setup( &goi, interp, argc-1, argv + 1 );
if ( goi.argc == 0 ){
Jim_WrongNumArgs(interp, 1, argv, "missing: command ...");
@@ -4460,7 +4460,7 @@ static int handle_fast_load_image_command(struct command_context_s *cmd_ctx, cha
/* DANGER!!! beware of unsigned comparision here!!! */
- if ((image.sections[i].base_address+buf_cnt >= min_address)&&
+ if ((image.sections[i].base_address + buf_cnt >= min_address)&&
(image.sections[i].base_address<max_address))
{
if (image.sections[i].base_address<min_address)
@@ -4470,25 +4470,25 @@ static int handle_fast_load_image_command(struct command_context_s *cmd_ctx, cha
length -= offset;
}
- if (image.sections[i].base_address+buf_cnt>max_address)
+ if (image.sections[i].base_address + buf_cnt>max_address)
{
- length -= (image.sections[i].base_address+buf_cnt)-max_address;
+ length -= (image.sections[i].base_address + buf_cnt)-max_address;
}
- fastload[i].address = image.sections[i].base_address+offset;
+ fastload[i].address = image.sections[i].base_address + offset;
fastload[i].data = malloc(length);
if (fastload[i].data == NULL)
{
free(buffer);
break;
}
- memcpy(fastload[i].data, buffer+offset, length);
+ memcpy(fastload[i].data, buffer + offset, length);
fastload[i].length = length;
image_size += length;
command_print(cmd_ctx, "%u byte written at address 0x%8.8x",
(unsigned int)length,
- ((unsigned int)(image.sections[i].base_address+offset)));
+ ((unsigned int)(image.sections[i].base_address + offset)));
}
free(buffer);
diff --git a/src/target/xscale.c b/src/target/xscale.c
index e07000d..8c20653 100644
--- a/src/target/xscale.c
+++ b/src/target/xscale.c
@@ -264,8 +264,8 @@ int xscale_read_dcsr(target_t *target)
jtag_add_dr_scan(3, fields, jtag_get_end_state());
- jtag_check_value_mask(fields+0, &field0_check_value, &field0_check_mask);
- jtag_check_value_mask(fields+2, &field2_check_value, &field2_check_mask);
+ jtag_check_value_mask(fields + 0, &field0_check_value, &field0_check_mask);
+ jtag_check_value_mask(fields + 2, &field2_check_value, &field2_check_mask);
if ((retval = jtag_execute_queue()) != ERROR_OK)
{
@@ -362,11 +362,11 @@ int xscale_receive(target_t *target, uint32_t *buffer, int num_words)
jtag_add_pathmove(3, path);
- fields[1].in_value = (uint8_t *)(field1+i);
+ fields[1].in_value = (uint8_t *)(field1 + i);
jtag_add_dr_scan_check(3, fields, jtag_set_end_state(TAP_IDLE));
- jtag_add_callback(xscale_getbuf, (jtag_callback_data_t)(field1+i));
+ jtag_add_callback(xscale_getbuf, (jtag_callback_data_t)(field1 + i));
words_scheduled++;
}
@@ -386,8 +386,8 @@ int xscale_receive(target_t *target, uint32_t *buffer, int num_words)
int j;
for (j = i; j < num_words - 1; j++)
{
- field0[j] = field0[j+1];
- field1[j] = field1[j+1];
+ field0[j] = field0[j + 1];
+ field1[j] = field1[j + 1];
}
words_scheduled--;
}
@@ -480,8 +480,8 @@ int xscale_read_tx(target_t *target, int consume)
jtag_add_dr_scan(3, fields, jtag_set_end_state(TAP_IDLE));
- jtag_check_value_mask(fields+0, &field0_check_value, &field0_check_mask);
- jtag_check_value_mask(fields+2, &field2_check_value, &field2_check_mask);
+ jtag_check_value_mask(fields + 0, &field0_check_value, &field0_check_mask);
+ jtag_check_value_mask(fields + 2, &field2_check_value, &field2_check_mask);
if ((retval = jtag_execute_queue()) != ERROR_OK)
{
@@ -563,8 +563,8 @@ int xscale_write_rx(target_t *target)
{
jtag_add_dr_scan(3, fields, jtag_set_end_state(TAP_IDLE));
- jtag_check_value_mask(fields+0, &field0_check_value, &field0_check_mask);
- jtag_check_value_mask(fields+2, &field2_check_value, &field2_check_mask);
+ jtag_check_value_mask(fields + 0, &field0_check_value, &field0_check_mask);
+ jtag_check_value_mask(fields + 2, &field2_check_value, &field2_check_mask);
if ((retval = jtag_execute_queue()) != ERROR_OK)
{
@@ -728,8 +728,8 @@ int xscale_write_dcsr(target_t *target, int hold_rst, int ext_dbg_brk)
jtag_add_dr_scan(3, fields, jtag_get_end_state());
- jtag_check_value_mask(fields+0, &field0_check_value, &field0_check_mask);
- jtag_check_value_mask(fields+2, &field2_check_value, &field2_check_mask);
+ jtag_check_value_mask(fields + 0, &field0_check_value, &field0_check_mask);
+ jtag_check_value_mask(fields + 2, &field2_check_value, &field2_check_mask);
if ((retval = jtag_execute_queue()) != ERROR_OK)
{