aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-12-08 13:06:41 -0800
committerDavid Brownell <dbrownell@users.sourceforge.net>2009-12-08 13:06:41 -0800
commite7acbdf5dbfcea427fc8b0fc7e8dd2e1005a4cc8 (patch)
tree426c05e5d407f1462e0bcd40744ebfcaae00631d
parentac19fc0da7e9b5542d5bcb9d6a6370efdeb2f1ee (diff)
downloadriscv-openocd-e7acbdf5dbfcea427fc8b0fc7e8dd2e1005a4cc8.zip
riscv-openocd-e7acbdf5dbfcea427fc8b0fc7e8dd2e1005a4cc8.tar.gz
riscv-openocd-e7acbdf5dbfcea427fc8b0fc7e8dd2e1005a4cc8.tar.bz2
target: move 'extern' decls to *.h files
The exception being declarations for drivers. Those should be split out in some clean way -- like driver add/remove calls made by initialization code -- but that's for another day. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
-rw-r--r--src/target/arm.h9
-rw-r--r--src/target/arm7_9_common.c8
-rw-r--r--src/target/arm9tdmi.c2
-rw-r--r--src/target/armv7m.h6
-rw-r--r--src/target/cortex_m3.c5
5 files changed, 15 insertions, 15 deletions
diff --git a/src/target/arm.h b/src/target/arm.h
index 00dbe2d..36763b4 100644
--- a/src/target/arm.h
+++ b/src/target/arm.h
@@ -191,6 +191,13 @@ int armv4_5_run_algorithm(struct target *target,
int num_reg_params, struct reg_param *reg_params,
uint32_t entry_point, uint32_t exit_point,
int timeout_ms, void *arch_info);
+int armv4_5_run_algorithm_inner(struct target *target,
+ int num_mem_params, struct mem_param *mem_params,
+ int num_reg_params, struct reg_param *reg_params,
+ uint32_t entry_point, uint32_t exit_point,
+ int timeout_ms, void *arch_info,
+ int (*run_it)(struct target *target, uint32_t exit_point,
+ int timeout_ms, void *arch_info));
int arm_checksum_memory(struct target *target,
uint32_t address, uint32_t count, uint32_t *checksum);
@@ -200,6 +207,8 @@ int arm_blank_check_memory(struct target *target,
void arm_set_cpsr(struct arm *arm, uint32_t cpsr);
struct reg *arm_reg_current(struct arm *arm, unsigned regnum);
+void arm_endianness(uint8_t *tmp, void *in, int size, int be, int flip);
+
extern struct reg arm_gdb_dummy_fp_reg;
extern struct reg arm_gdb_dummy_fps_reg;
diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c
index 64a99fb..5563a4e 100644
--- a/src/target/arm7_9_common.c
+++ b/src/target/arm7_9_common.c
@@ -2652,14 +2652,6 @@ static const uint32_t dcc_code[] =
0xeafffff9 /* b w */
};
-extern int armv4_5_run_algorithm_inner(struct target *target,
- int num_mem_params, struct mem_param *mem_params,
- int num_reg_params, struct reg_param *reg_params,
- uint32_t entry_point, uint32_t exit_point,
- int timeout_ms, void *arch_info,
- int (*run_it)(struct target *target, uint32_t exit_point,
- int timeout_ms, void *arch_info));
-
int arm7_9_bulk_write_memory(struct target *target, uint32_t address, uint32_t count, uint8_t *buffer)
{
int retval;
diff --git a/src/target/arm9tdmi.c b/src/target/arm9tdmi.c
index 301412c..0e99cd1 100644
--- a/src/target/arm9tdmi.c
+++ b/src/target/arm9tdmi.c
@@ -269,8 +269,6 @@ int arm9tdmi_clock_data_in(struct arm_jtag *jtag_info, uint32_t *in)
return ERROR_OK;
}
-extern void arm_endianness(uint8_t *tmp, void *in, int size, int be, int flip);
-
static int arm9endianness(jtag_callback_data_t arg,
jtag_callback_data_t size, jtag_callback_data_t be,
jtag_callback_data_t captured)
diff --git a/src/target/armv7m.h b/src/target/armv7m.h
index f662e16..07090b4 100644
--- a/src/target/armv7m.h
+++ b/src/target/armv7m.h
@@ -34,6 +34,12 @@
#define ARMV7_GDB_HACKS
#endif
+#ifdef ARMV7_GDB_HACKS
+extern uint8_t armv7m_gdb_dummy_cpsr_value[];
+extern struct reg armv7m_gdb_dummy_cpsr_reg;
+#endif
+
+
enum armv7m_mode
{
ARMV7M_MODE_THREAD = 0,
diff --git a/src/target/cortex_m3.c b/src/target/cortex_m3.c
index bdd3233..6bc427a 100644
--- a/src/target/cortex_m3.c
+++ b/src/target/cortex_m3.c
@@ -52,11 +52,6 @@ static void cortex_m3_enable_watchpoints(struct target *target);
static int cortex_m3_store_core_reg_u32(struct target *target,
enum armv7m_regtype type, uint32_t num, uint32_t value);
-#ifdef ARMV7_GDB_HACKS
-extern uint8_t armv7m_gdb_dummy_cpsr_value[];
-extern struct reg armv7m_gdb_dummy_cpsr_reg;
-#endif
-
static int cortexm3_dap_read_coreregister_u32(struct swjdp_common *swjdp,
uint32_t *value, int regnum)
{