summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-13 08:42:32 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-13 11:58:11 -0800
commit63242c6d45570ca32fd569a71b5ecea522f839ea (patch)
treeaa70e0735546b6f55ad00cc67dc82dcb04999d9b /src
parent01f9dc18fcce8d5a0e02e56822d580da81570fdc (diff)
downloadopenocd_libswd-63242c6d45570ca32fd569a71b5ecea522f839ea.tar.gz
openocd_libswd-63242c6d45570ca32fd569a71b5ecea522f839ea.tar.bz2
openocd_libswd-63242c6d45570ca32fd569a71b5ecea522f839ea.tar.xz
openocd_libswd-63242c6d45570ca32fd569a71b5ecea522f839ea.zip
etm_reg_t -> struct etm_reg
Remove misleading typedef and redundant suffix from struct etm_reg.
Diffstat (limited to 'src')
-rw-r--r--src/target/etm.c12
-rw-r--r--src/target/etm.h4
2 files changed, 8 insertions, 8 deletions
diff --git a/src/target/etm.c b/src/target/etm.c
index 86434632..ed2c76cf 100644
--- a/src/target/etm.c
+++ b/src/target/etm.c
@@ -235,7 +235,7 @@ static reg_t *etm_reg_lookup(etm_context_t *etm_ctx, unsigned id)
int i;
for (i = 0; i < cache->num_regs; i++) {
- struct etm_reg_s *reg = cache->reg_list[i].arch_info;
+ struct etm_reg *reg = cache->reg_list[i].arch_info;
if (reg->reg_info->addr == id)
return &cache->reg_list[i];
@@ -248,7 +248,7 @@ static reg_t *etm_reg_lookup(etm_context_t *etm_ctx, unsigned id)
}
static void etm_reg_add(unsigned bcd_vers, struct arm_jtag *jtag_info,
- reg_cache_t *cache, etm_reg_t *ereg,
+ reg_cache_t *cache, struct etm_reg *ereg,
const struct etm_reg_info *r, unsigned nreg)
{
reg_t *reg = cache->reg_list;
@@ -284,7 +284,7 @@ reg_cache_t *etm_build_reg_cache(target_t *target,
{
reg_cache_t *reg_cache = malloc(sizeof(reg_cache_t));
reg_t *reg_list = NULL;
- etm_reg_t *arch_info = NULL;
+ struct etm_reg *arch_info = NULL;
unsigned bcd_vers, config;
/* register a register arch-type for etm registers only once */
@@ -294,7 +294,7 @@ reg_cache_t *etm_build_reg_cache(target_t *target,
/* the actual registers are kept in two arrays */
reg_list = calloc(128, sizeof(reg_t));
- arch_info = calloc(128, sizeof(etm_reg_t));
+ arch_info = calloc(128, sizeof(struct etm_reg));
/* fill in values for the reg cache */
reg_cache->name = "etm registers";
@@ -489,7 +489,7 @@ static int etm_get_reg(reg_t *reg)
static int etm_read_reg_w_check(reg_t *reg,
uint8_t* check_value, uint8_t* check_mask)
{
- etm_reg_t *etm_reg = reg->arch_info;
+ struct etm_reg *etm_reg = reg->arch_info;
const struct etm_reg_info *r = etm_reg->reg_info;
uint8_t reg_addr = r->addr & 0x7f;
struct scan_field fields[3];
@@ -575,7 +575,7 @@ static int etm_set_reg_w_exec(reg_t *reg, uint8_t *buf)
static int etm_write_reg(reg_t *reg, uint32_t value)
{
- etm_reg_t *etm_reg = reg->arch_info;
+ struct etm_reg *etm_reg = reg->arch_info;
const struct etm_reg_info *r = etm_reg->reg_info;
uint8_t reg_addr = r->addr & 0x7f;
struct scan_field fields[3];
diff --git a/src/target/etm.h b/src/target/etm.h
index d6e12103..a58adb30 100644
--- a/src/target/etm.h
+++ b/src/target/etm.h
@@ -71,12 +71,12 @@ enum
ETM_ID = 0x79,
};
-typedef struct etm_reg_s
+struct etm_reg
{
uint32_t value;
const struct etm_reg_info *reg_info;
struct arm_jtag *jtag_info;
-} etm_reg_t;
+};
typedef enum
{