summaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-13 09:52:20 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-13 11:58:13 -0800
commitac927559c3ce5406adac34b9d4ca4ecb37a48181 (patch)
treec80df94596067ffbbf47225aa1ff2570473fb256 /src/target
parentd64a873db44258470b50f370f2c8af71157952d0 (diff)
downloadopenocd_libswd-ac927559c3ce5406adac34b9d4ca4ecb37a48181.tar.gz
openocd_libswd-ac927559c3ce5406adac34b9d4ca4ecb37a48181.tar.bz2
openocd_libswd-ac927559c3ce5406adac34b9d4ca4ecb37a48181.tar.xz
openocd_libswd-ac927559c3ce5406adac34b9d4ca4ecb37a48181.zip
target_type_t -> struct target_type
Remove misleading typedef and redundant suffix from struct target_type.
Diffstat (limited to 'src/target')
-rw-r--r--src/target/arm11.c2
-rw-r--r--src/target/arm720t.c2
-rw-r--r--src/target/arm7tdmi.c2
-rw-r--r--src/target/arm920t.c2
-rw-r--r--src/target/arm926ejs.c2
-rw-r--r--src/target/arm966e.c2
-rw-r--r--src/target/arm9tdmi.c2
-rw-r--r--src/target/avrt.c2
-rw-r--r--src/target/cortex_a8.c2
-rw-r--r--src/target/cortex_m3.c2
-rw-r--r--src/target/fa526.c2
-rw-r--r--src/target/feroceon.c4
-rw-r--r--src/target/mips_m4k.c2
-rw-r--r--src/target/target.c40
-rw-r--r--src/target/target.h7
-rw-r--r--src/target/target_type.h2
-rw-r--r--src/target/xscale.c2
17 files changed, 38 insertions, 41 deletions
diff --git a/src/target/arm11.c b/src/target/arm11.c
index 42c33af7..22925c8e 100644
--- a/src/target/arm11.c
+++ b/src/target/arm11.c
@@ -2197,7 +2197,7 @@ COMMAND_HANDLER(arm11_handle_etmw)
#define ARM11_HANDLER(x) .x = arm11_##x
-target_type_t arm11_target = {
+struct target_type arm11_target = {
.name = "arm11",
ARM11_HANDLER(poll),
diff --git a/src/target/arm720t.c b/src/target/arm720t.c
index 8ef7114e..b258e2f9 100644
--- a/src/target/arm720t.c
+++ b/src/target/arm720t.c
@@ -510,7 +510,7 @@ static int arm720t_register_commands(struct command_context_s *cmd_ctx)
}
/** Holds methods for ARM720 targets. */
-target_type_t arm720t_target =
+struct target_type arm720t_target =
{
.name = "arm720t",
diff --git a/src/target/arm7tdmi.c b/src/target/arm7tdmi.c
index d1509cbb..aea012dc 100644
--- a/src/target/arm7tdmi.c
+++ b/src/target/arm7tdmi.c
@@ -753,7 +753,7 @@ static int arm7tdmi_target_create(struct target_s *target, Jim_Interp *interp)
}
/** Holds methods for ARM7TDMI targets. */
-target_type_t arm7tdmi_target =
+struct target_type arm7tdmi_target =
{
.name = "arm7tdmi",
diff --git a/src/target/arm920t.c b/src/target/arm920t.c
index 2fe50a13..32f4a2ff 100644
--- a/src/target/arm920t.c
+++ b/src/target/arm920t.c
@@ -1380,7 +1380,7 @@ int arm920t_register_commands(struct command_context_s *cmd_ctx)
}
/** Holds methods for ARM920 targets. */
-target_type_t arm920t_target =
+struct target_type arm920t_target =
{
.name = "arm920t",
diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c
index 9ae19a87..fd8e0b6a 100644
--- a/src/target/arm926ejs.c
+++ b/src/target/arm926ejs.c
@@ -842,7 +842,7 @@ int arm926ejs_register_commands(struct command_context_s *cmd_ctx)
}
/** Holds methods for ARM926 targets. */
-target_type_t arm926ejs_target =
+struct target_type arm926ejs_target =
{
.name = "arm926ejs",
diff --git a/src/target/arm966e.c b/src/target/arm966e.c
index dee9f612..7c46f0fd 100644
--- a/src/target/arm966e.c
+++ b/src/target/arm966e.c
@@ -233,7 +233,7 @@ int arm966e_register_commands(struct command_context_s *cmd_ctx)
}
/** Holds methods for ARM966 targets. */
-target_type_t arm966e_target =
+struct target_type arm966e_target =
{
.name = "arm966e",
diff --git a/src/target/arm9tdmi.c b/src/target/arm9tdmi.c
index c670c454..1edb6264 100644
--- a/src/target/arm9tdmi.c
+++ b/src/target/arm9tdmi.c
@@ -953,7 +953,7 @@ int arm9tdmi_register_commands(struct command_context_s *cmd_ctx)
}
/** Holds methods for ARM9TDMI targets. */
-target_type_t arm9tdmi_target =
+struct target_type arm9tdmi_target =
{
.name = "arm9tdmi",
diff --git a/src/target/avrt.c b/src/target/avrt.c
index d7c7623d..ad22c99d 100644
--- a/src/target/avrt.c
+++ b/src/target/avrt.c
@@ -59,7 +59,7 @@ int mcu_write_ir_u32(struct jtag_tap *tap, uint32_t *ir_in, uint32_t ir_out, int
int mcu_write_dr_u32(struct jtag_tap *tap, uint32_t *ir_in, uint32_t ir_out, int dr_len, int rti);
int mcu_execute_queue(void);
-target_type_t avr_target =
+struct target_type avr_target =
{
.name = "avr",
diff --git a/src/target/cortex_a8.c b/src/target/cortex_a8.c
index e1bd2e32..f9253115 100644
--- a/src/target/cortex_a8.c
+++ b/src/target/cortex_a8.c
@@ -1569,7 +1569,7 @@ static int cortex_a8_register_commands(struct command_context_s *cmd_ctx)
return retval;
}
-target_type_t cortexa8_target = {
+struct target_type cortexa8_target = {
.name = "cortex_a8",
.poll = cortex_a8_poll,
diff --git a/src/target/cortex_m3.c b/src/target/cortex_m3.c
index bbdc85a2..9f9016d2 100644
--- a/src/target/cortex_m3.c
+++ b/src/target/cortex_m3.c
@@ -1951,7 +1951,7 @@ static int cortex_m3_register_commands(struct command_context_s *cmd_ctx)
return retval;
}
-target_type_t cortexm3_target =
+struct target_type cortexm3_target =
{
.name = "cortex_m3",
diff --git a/src/target/fa526.c b/src/target/fa526.c
index 3b884c69..d9b89f2a 100644
--- a/src/target/fa526.c
+++ b/src/target/fa526.c
@@ -358,7 +358,7 @@ static int fa526_target_create(struct target_s *target, Jim_Interp *interp)
}
/** Holds methods for FA526 targets. */
-target_type_t fa526_target =
+struct target_type fa526_target =
{
.name = "fa526",
diff --git a/src/target/feroceon.c b/src/target/feroceon.c
index cf034c42..73292e10 100644
--- a/src/target/feroceon.c
+++ b/src/target/feroceon.c
@@ -674,7 +674,7 @@ int feroceon_examine(struct target_s *target)
return ERROR_OK;
}
-target_type_t feroceon_target =
+struct target_type feroceon_target =
{
.name = "feroceon",
@@ -712,7 +712,7 @@ target_type_t feroceon_target =
.examine = feroceon_examine,
};
-target_type_t dragonite_target =
+struct target_type dragonite_target =
{
.name = "dragonite",
diff --git a/src/target/mips_m4k.c b/src/target/mips_m4k.c
index 095260c3..9213ae0c 100644
--- a/src/target/mips_m4k.c
+++ b/src/target/mips_m4k.c
@@ -48,7 +48,7 @@ int mips_m4k_assert_reset(target_t *target);
int mips_m4k_deassert_reset(target_t *target);
int mips_m4k_checksum_memory(target_t *target, uint32_t address, uint32_t size, uint32_t *checksum);
-target_type_t mips_m4k_target =
+struct target_type mips_m4k_target =
{
.name = "mips_m4k",
diff --git a/src/target/target.c b/src/target/target.c
index df8496f5..16497b45 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -49,23 +49,23 @@ static int target_array2mem(Jim_Interp *interp, target_t *target, int argc, Jim_
static int target_mem2array(Jim_Interp *interp, target_t *target, int argc, Jim_Obj *const *argv);
/* targets */
-extern target_type_t arm7tdmi_target;
-extern target_type_t arm720t_target;
-extern target_type_t arm9tdmi_target;
-extern target_type_t arm920t_target;
-extern target_type_t arm966e_target;
-extern target_type_t arm926ejs_target;
-extern target_type_t fa526_target;
-extern target_type_t feroceon_target;
-extern target_type_t dragonite_target;
-extern target_type_t xscale_target;
-extern target_type_t cortexm3_target;
-extern target_type_t cortexa8_target;
-extern target_type_t arm11_target;
-extern target_type_t mips_m4k_target;
-extern target_type_t avr_target;
-
-target_type_t *target_types[] =
+extern struct target_type arm7tdmi_target;
+extern struct target_type arm720t_target;
+extern struct target_type arm9tdmi_target;
+extern struct target_type arm920t_target;
+extern struct target_type arm966e_target;
+extern struct target_type arm926ejs_target;
+extern struct target_type fa526_target;
+extern struct target_type feroceon_target;
+extern struct target_type dragonite_target;
+extern struct target_type xscale_target;
+extern struct target_type cortexm3_target;
+extern struct target_type cortexa8_target;
+extern struct target_type arm11_target;
+extern struct target_type mips_m4k_target;
+extern struct target_type avr_target;
+
+struct target_type *target_types[] =
{
&arm7tdmi_target,
&arm9tdmi_target,
@@ -760,7 +760,7 @@ int target_init(struct command_context_s *cmd_ctx)
int retval;
for (target = all_targets; target; target = target->next) {
- struct target_type_s *type = target->type;
+ struct target_type *type = target->type;
target_reset_examined(target);
if (target->type->examine == NULL)
@@ -4290,9 +4290,9 @@ static int target_create(Jim_GetOptInfo *goi)
target->target_number = new_target_number();
/* allocate memory for each unique target type */
- target->type = (target_type_t*)calloc(1,sizeof(target_type_t));
+ target->type = (struct target_type*)calloc(1,sizeof(struct target_type));
- memcpy(target->type, target_types[x], sizeof(target_type_t));
+ memcpy(target->type, target_types[x], sizeof(struct target_type));
/* will be set by "-endian" */
target->endianness = TARGET_ENDIAN_UNKNOWN;
diff --git a/src/target/target.h b/src/target/target.h
index 3eafc18a..50e8c624 100644
--- a/src/target/target.h
+++ b/src/target/target.h
@@ -124,13 +124,10 @@ struct working_area
struct working_area *next;
};
-// target_type.h contains the full definitionof struct target_type_s
-struct target_type_s;
-typedef struct target_type_s target_type_t;
-
+// target_type.h contains the full definitionof struct target_type
typedef struct target_s
{
- target_type_t *type; /* target type definition (name, access functions) */
+ struct target_type *type; /* target type definition (name, access functions) */
const char *cmd_name; /* tcl Name of target */
int target_number; /* DO NOT USE! field to be removed in 2010 */
struct jtag_tap *tap; /* where on the jtag chain is this */
diff --git a/src/target/target_type.h b/src/target/target_type.h
index 33288797..98d8665e 100644
--- a/src/target/target_type.h
+++ b/src/target/target_type.h
@@ -30,7 +30,7 @@
struct target_s;
-struct target_type_s
+struct target_type
{
/**
* Name of the target. Do @b not access this field directly, use
diff --git a/src/target/xscale.c b/src/target/xscale.c
index fb265eaf..33dd3564 100644
--- a/src/target/xscale.c
+++ b/src/target/xscale.c
@@ -3606,7 +3606,7 @@ static int xscale_register_commands(struct command_context_s *cmd_ctx)
return ERROR_OK;
}
-target_type_t xscale_target =
+struct target_type xscale_target =
{
.name = "xscale",