diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2009-12-08 13:06:41 -0800 |
---|---|---|
committer | David Brownell <dbrownell@users.sourceforge.net> | 2009-12-08 13:06:41 -0800 |
commit | cbea1ed71febd8cf64482b36381765eaabfc66ec (patch) | |
tree | 7e5825a901e3f57aa7296d3b07c15a789dbc5df4 /src | |
parent | e7acbdf5dbfcea427fc8b0fc7e8dd2e1005a4cc8 (diff) | |
download | riscv-openocd-cbea1ed71febd8cf64482b36381765eaabfc66ec.zip riscv-openocd-cbea1ed71febd8cf64482b36381765eaabfc66ec.tar.gz riscv-openocd-cbea1ed71febd8cf64482b36381765eaabfc66ec.tar.bz2 |
target: remove needless "extern"s
Most of these happened to be in the target.h file.
Some of those are associated with symbols that could be
removed at some point ... e.g. NVP_ASSERT/true and its
sibling NVP_DEASSERT/false.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/target/cortex_a8.h | 2 | ||||
-rw-r--r-- | src/target/etm.c | 10 | ||||
-rw-r--r-- | src/target/target.c | 10 | ||||
-rw-r--r-- | src/target/target.h | 10 |
4 files changed, 8 insertions, 24 deletions
diff --git a/src/target/cortex_a8.h b/src/target/cortex_a8.h index adffe93..82a34a7 100644 --- a/src/target/cortex_a8.h +++ b/src/target/cortex_a8.h @@ -31,8 +31,6 @@ #include <target/armv7a.h> -extern char* cortex_a8_state_strings[]; - #define CORTEX_A8_COMMON_MAGIC 0x411fc082 /* See Cortex-A8 TRM section 12.5 */ diff --git a/src/target/etm.c b/src/target/etm.c index 3aace81..e0671d5 100644 --- a/src/target/etm.c +++ b/src/target/etm.c @@ -27,6 +27,8 @@ #include "image.h" #include "arm_disassembler.h" #include "register.h" +#include "etm_dummy.h" +#include "oocd_trace.h" /* @@ -613,13 +615,7 @@ static int etm_write_reg(struct reg *reg, uint32_t value) } -/* ETM trace analysis functionality - * - */ -extern struct etm_capture_driver etm_dummy_capture_driver; -#if BUILD_OOCD_TRACE == 1 -extern struct etm_capture_driver oocd_trace_capture_driver; -#endif +/* ETM trace analysis functionality */ static struct etm_capture_driver *etm_capture_drivers[] = { diff --git a/src/target/target.c b/src/target/target.c index f249d38..a9f4dd8 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -90,7 +90,7 @@ struct target *all_targets = NULL; struct target_event_callback *target_event_callbacks = NULL; struct target_timer_callback *target_timer_callbacks = NULL; -const Jim_Nvp nvp_assert[] = { +static const Jim_Nvp nvp_assert[] = { { .name = "assert", NVP_ASSERT }, { .name = "deassert", NVP_DEASSERT }, { .name = "T", NVP_ASSERT }, @@ -100,7 +100,7 @@ const Jim_Nvp nvp_assert[] = { { .name = NULL, .value = -1 } }; -const Jim_Nvp nvp_error_target[] = { +static const Jim_Nvp nvp_error_target[] = { { .value = ERROR_TARGET_INVALID, .name = "err-invalid" }, { .value = ERROR_TARGET_INIT_FAILED, .name = "err-init-failed" }, { .value = ERROR_TARGET_TIMEOUT, .name = "err-timeout" }, @@ -178,7 +178,7 @@ static const Jim_Nvp nvp_target_event[] = { { .name = NULL, .value = -1 } }; -const Jim_Nvp nvp_target_state[] = { +static const Jim_Nvp nvp_target_state[] = { { .name = "unknown", .value = TARGET_UNKNOWN }, { .name = "running", .value = TARGET_RUNNING }, { .name = "halted", .value = TARGET_HALTED }, @@ -198,7 +198,7 @@ static const Jim_Nvp nvp_target_debug_reason [] = { { .name = NULL, .value = -1 }, }; -const Jim_Nvp nvp_target_endian[] = { +static const Jim_Nvp nvp_target_endian[] = { { .name = "big", .value = TARGET_BIG_ENDIAN }, { .name = "little", .value = TARGET_LITTLE_ENDIAN }, { .name = "be", .value = TARGET_BIG_ENDIAN }, @@ -206,7 +206,7 @@ const Jim_Nvp nvp_target_endian[] = { { .name = NULL, .value = -1 }, }; -const Jim_Nvp nvp_reset_modes[] = { +static const Jim_Nvp nvp_reset_modes[] = { { .name = "unknown", .value = RESET_UNKNOWN }, { .name = "run" , .value = RESET_RUN }, { .name = "halt" , .value = RESET_HALT }, diff --git a/src/target/target.h b/src/target/target.h index dd3d4f7..fededb9 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -61,15 +61,11 @@ enum target_state TARGET_DEBUG_RUNNING = 4, }; -extern const Jim_Nvp nvp_target_state[]; - enum nvp_assert { NVP_DEASSERT, NVP_ASSERT, }; -extern const Jim_Nvp nvp_assert[]; - enum target_reset_mode { RESET_UNKNOWN = 0, @@ -78,8 +74,6 @@ enum target_reset_mode RESET_INIT = 3, /* reset and halt target out of reset, then run init script */ }; -extern const Jim_Nvp nvp_reset_mode[]; - enum target_debug_reason { DBG_REASON_DBGRQ = 0, @@ -97,8 +91,6 @@ enum target_endianess TARGET_BIG_ENDIAN = 1, TARGET_LITTLE_ENDIAN = 2 }; -extern const Jim_Nvp nvp_target_endian[]; - struct working_area { uint32_t address; @@ -490,8 +482,6 @@ void target_all_handle_event(enum target_event e); #define ERROR_TARGET_NOT_RUNNING (-310) #define ERROR_TARGET_NOT_EXAMINED (-311) -extern const Jim_Nvp nvp_error_target[]; - const char *target_strerror_safe(int err); #endif /* TARGET_H */ |