summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-05-11 04:46:21 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-05-11 04:46:21 +0000
commit68b05c55759970657c32607b3ce27c42e65cdad0 (patch)
tree5619f94500b07cb6d89bc2cfd709d4cc24559d66 /src
parent03f329604635db3299e139510e75fea7deb0f4bd (diff)
downloadopenocd_libswd-68b05c55759970657c32607b3ce27c42e65cdad0.tar.gz
openocd_libswd-68b05c55759970657c32607b3ce27c42e65cdad0.tar.bz2
openocd_libswd-68b05c55759970657c32607b3ce27c42e65cdad0.tar.xz
openocd_libswd-68b05c55759970657c32607b3ce27c42e65cdad0.zip
Audit and eliminate redundant #include directives in arm target files.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1714 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r--src/target/arm11.c4
-rw-r--r--src/target/arm11.h4
-rw-r--r--src/target/arm11_dbgtap.c4
-rw-r--r--src/target/arm720t.c4
-rw-r--r--src/target/arm720t.h5
-rw-r--r--src/target/arm7_9_common.c15
-rw-r--r--src/target/arm7_9_common.h4
-rw-r--r--src/target/arm7tdmi.c12
-rw-r--r--src/target/arm7tdmi.h5
-rw-r--r--src/target/arm920t.c4
-rw-r--r--src/target/arm920t.h5
-rw-r--r--src/target/arm926ejs.c4
-rw-r--r--src/target/arm926ejs.h5
-rw-r--r--src/target/arm966e.c11
-rw-r--r--src/target/arm966e.h4
-rw-r--r--src/target/arm9tdmi.c13
-rw-r--r--src/target/arm9tdmi.h5
-rw-r--r--src/target/arm_adi_v5.c6
-rw-r--r--src/target/arm_disassembler.c2
-rw-r--r--src/target/arm_jtag.c5
-rw-r--r--src/target/arm_jtag.h1
-rw-r--r--src/target/arm_simulator.c2
-rw-r--r--src/target/arm_simulator.h4
-rw-r--r--src/target/armv4_5.c13
-rw-r--r--src/target/armv4_5_cache.c2
-rw-r--r--src/target/armv4_5_cache.h3
-rw-r--r--src/target/armv4_5_mmu.c4
-rw-r--r--src/target/armv4_5_mmu.h1
-rw-r--r--src/target/armv7m.c11
-rw-r--r--src/target/armv7m.h3
30 files changed, 7 insertions, 158 deletions
diff --git a/src/target/arm11.c b/src/target/arm11.c
index 1ac952da..18c3bd5c 100644
--- a/src/target/arm11.c
+++ b/src/target/arm11.c
@@ -26,11 +26,7 @@
#endif
#include "arm11.h"
-#include "jtag.h"
-#include "log.h"
-#include <stdlib.h>
-#include <string.h>
#if 0
#define _DEBUG_INSTRUCTION_EXECUTION_
diff --git a/src/target/arm11.h b/src/target/arm11.h
index 1a890d06..4f75a62e 100644
--- a/src/target/arm11.h
+++ b/src/target/arm11.h
@@ -22,11 +22,7 @@
#ifndef ARM11_H
#define ARM11_H
-#include "target.h"
-#include "register.h"
#include "embeddedice.h"
-#include "arm_jtag.h"
-#include "types.h"
#define asizeof(x) (sizeof(x) / sizeof((x)[0]))
diff --git a/src/target/arm11_dbgtap.c b/src/target/arm11_dbgtap.c
index fa127c64..0a86bc08 100644
--- a/src/target/arm11_dbgtap.c
+++ b/src/target/arm11_dbgtap.c
@@ -24,11 +24,7 @@
#endif
#include "arm11.h"
-#include "jtag.h"
-#include "log.h"
-#include <stdlib.h>
-#include <string.h>
#if 0
#define JTAG_DEBUG(expr ...) DEBUG(expr)
diff --git a/src/target/arm720t.c b/src/target/arm720t.c
index b04a17f7..0dbfdb41 100644
--- a/src/target/arm720t.c
+++ b/src/target/arm720t.c
@@ -22,12 +22,8 @@
#endif
#include "arm720t.h"
-#include "jtag.h"
-#include "log.h"
#include "time_support.h"
-#include <stdlib.h>
-#include <string.h>
#if 0
#define _DEBUG_INSTRUCTION_EXECUTION_
diff --git a/src/target/arm720t.h b/src/target/arm720t.h
index f91f150a..10ac6535 100644
--- a/src/target/arm720t.h
+++ b/src/target/arm720t.h
@@ -20,13 +20,8 @@
#ifndef ARM720T_H
#define ARM720T_H
-#include "target.h"
-#include "register.h"
-#include "embeddedice.h"
-#include "arm_jtag.h"
#include "arm7tdmi.h"
#include "armv4_5_mmu.h"
-#include "armv4_5_cache.h"
#define ARM720T_COMMON_MAGIC 0xa720a720
diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c
index 6a7b77c4..a1b21030 100644
--- a/src/target/arm7_9_common.c
+++ b/src/target/arm7_9_common.c
@@ -30,27 +30,12 @@
#include "config.h"
#endif
-#include "replacements.h"
-
#include "embeddedice.h"
-#include "target.h"
#include "target_request.h"
-#include "armv4_5.h"
-#include "arm_jtag.h"
-#include "jtag.h"
-#include "log.h"
#include "arm7_9_common.h"
-#include "breakpoints.h"
#include "time_support.h"
#include "arm_simulator.h"
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <errno.h>
int arm7_9_debug_entry(target_t *target);
int arm7_9_enable_sw_bkpts(struct target_s *target);
diff --git a/src/target/arm7_9_common.h b/src/target/arm7_9_common.h
index d5b0487f..04e29e05 100644
--- a/src/target/arm7_9_common.h
+++ b/src/target/arm7_9_common.h
@@ -29,11 +29,7 @@
#ifndef ARM7_9_COMMON_H
#define ARM7_9_COMMON_H
-#include "armv4_5.h"
-#include "arm_jtag.h"
#include "breakpoints.h"
-#include "target.h"
-
#include "etm.h"
#define ARM7_9_COMMON_MAGIC 0x0a790a79
diff --git a/src/target/arm7tdmi.c b/src/target/arm7tdmi.c
index 098b3732..116109d3 100644
--- a/src/target/arm7tdmi.c
+++ b/src/target/arm7tdmi.c
@@ -29,18 +29,6 @@
#include "arm7tdmi.h"
-#include "arm7_9_common.h"
-#include "register.h"
-#include "target.h"
-#include "armv4_5.h"
-#include "embeddedice.h"
-#include "etm.h"
-#include "log.h"
-#include "jtag.h"
-#include "arm_jtag.h"
-
-#include <stdlib.h>
-#include <string.h>
#if 0
#define _DEBUG_INSTRUCTION_EXECUTION_
diff --git a/src/target/arm7tdmi.h b/src/target/arm7tdmi.h
index 3624af6e..b3ece44e 100644
--- a/src/target/arm7tdmi.h
+++ b/src/target/arm7tdmi.h
@@ -23,12 +23,7 @@
#ifndef ARM7TDMI_H
#define ARM7TDMI_H
-#include "target.h"
-#include "register.h"
-#include "armv4_5.h"
#include "embeddedice.h"
-#include "arm_jtag.h"
-#include "arm7_9_common.h"
#define ARM7TDMI_COMMON_MAGIC 0x00a700a7
diff --git a/src/target/arm920t.c b/src/target/arm920t.c
index af26a2fc..cd3129b0 100644
--- a/src/target/arm920t.c
+++ b/src/target/arm920t.c
@@ -22,12 +22,8 @@
#endif
#include "arm920t.h"
-#include "jtag.h"
-#include "log.h"
#include "time_support.h"
-#include <stdlib.h>
-#include <string.h>
#if 0
#define _DEBUG_INSTRUCTION_EXECUTION_
diff --git a/src/target/arm920t.h b/src/target/arm920t.h
index e1aab347..3f60901b 100644
--- a/src/target/arm920t.h
+++ b/src/target/arm920t.h
@@ -20,13 +20,8 @@
#ifndef ARM920T_H
#define ARM920T_H
-#include "target.h"
-#include "register.h"
-#include "embeddedice.h"
-#include "arm_jtag.h"
#include "arm9tdmi.h"
#include "armv4_5_mmu.h"
-#include "armv4_5_cache.h"
#define ARM920T_COMMON_MAGIC 0xa920a920
diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c
index c943f2fc..6233c799 100644
--- a/src/target/arm926ejs.c
+++ b/src/target/arm926ejs.c
@@ -22,12 +22,8 @@
#endif
#include "arm926ejs.h"
-#include "jtag.h"
-#include "log.h"
#include "time_support.h"
-#include <stdlib.h>
-#include <string.h>
#if 0
#define _DEBUG_INSTRUCTION_EXECUTION_
diff --git a/src/target/arm926ejs.h b/src/target/arm926ejs.h
index ba5fcc13..54796512 100644
--- a/src/target/arm926ejs.h
+++ b/src/target/arm926ejs.h
@@ -20,13 +20,8 @@
#ifndef ARM926EJS_H
#define ARM926EJS_H
-#include "target.h"
-#include "register.h"
-#include "embeddedice.h"
-#include "arm_jtag.h"
#include "arm9tdmi.h"
#include "armv4_5_mmu.h"
-#include "armv4_5_cache.h"
#define ARM926EJS_COMMON_MAGIC 0xa926a926
diff --git a/src/target/arm966e.c b/src/target/arm966e.c
index 758b5f11..effc2728 100644
--- a/src/target/arm966e.c
+++ b/src/target/arm966e.c
@@ -26,17 +26,6 @@
#include "arm966e.h"
-#include "arm7_9_common.h"
-#include "register.h"
-#include "target.h"
-#include "armv4_5.h"
-#include "embeddedice.h"
-#include "log.h"
-#include "jtag.h"
-#include "arm_jtag.h"
-
-#include <stdlib.h>
-#include <string.h>
#if 0
#define _DEBUG_INSTRUCTION_EXECUTION_
diff --git a/src/target/arm966e.h b/src/target/arm966e.h
index b98c0224..995a7972 100644
--- a/src/target/arm966e.h
+++ b/src/target/arm966e.h
@@ -23,10 +23,6 @@
#ifndef ARM966E_H
#define ARM966E_H
-#include "target.h"
-#include "register.h"
-#include "embeddedice.h"
-#include "arm_jtag.h"
#include "arm9tdmi.h"
#define ARM966E_COMMON_MAGIC 0x20f920f9
diff --git a/src/target/arm9tdmi.c b/src/target/arm9tdmi.c
index e0a31139..63846cf2 100644
--- a/src/target/arm9tdmi.c
+++ b/src/target/arm9tdmi.c
@@ -29,19 +29,6 @@
#include "arm9tdmi.h"
-#include "arm7_9_common.h"
-#include "register.h"
-#include "target.h"
-#include "armv4_5.h"
-#include "embeddedice.h"
-#include "etm.h"
-#include "etb.h"
-#include "log.h"
-#include "jtag.h"
-#include "arm_jtag.h"
-
-#include <stdlib.h>
-#include <string.h>
#if 0
#define _DEBUG_INSTRUCTION_EXECUTION_
diff --git a/src/target/arm9tdmi.h b/src/target/arm9tdmi.h
index fc650914..5c1a9f9c 100644
--- a/src/target/arm9tdmi.h
+++ b/src/target/arm9tdmi.h
@@ -23,12 +23,7 @@
#ifndef ARM9TDMI_H
#define ARM9TDMI_H
-#include "target.h"
-#include "register.h"
-#include "armv4_5.h"
#include "embeddedice.h"
-#include "arm_jtag.h"
-#include "arm7_9_common.h"
#define ARM9TDMI_COMMON_MAGIC 0x00a900a9
diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c
index fb30989a..3c9461ae 100644
--- a/src/target/arm_adi_v5.c
+++ b/src/target/arm_adi_v5.c
@@ -38,14 +38,8 @@
#include "config.h"
#endif
-#include "replacements.h"
-
#include "arm_adi_v5.h"
-#include "jtag.h"
-#include "log.h"
#include "time_support.h"
-#include <stdlib.h>
-#include <string.h>
/*
* Transaction Mode:
diff --git a/src/target/arm_disassembler.c b/src/target/arm_disassembler.c
index d222c47c..dcff7a74 100644
--- a/src/target/arm_disassembler.c
+++ b/src/target/arm_disassembler.c
@@ -22,10 +22,8 @@
#endif
#include "arm_disassembler.h"
-
#include "log.h"
-#include <string.h>
/* textual represenation of the condition field */
/* ALways (default) is ommitted (empty string) */
diff --git a/src/target/arm_jtag.c b/src/target/arm_jtag.c
index ad57cef9..0c1c36c8 100644
--- a/src/target/arm_jtag.c
+++ b/src/target/arm_jtag.c
@@ -26,11 +26,6 @@
#include "arm_jtag.h"
-#include "binarybuffer.h"
-#include "log.h"
-#include "jtag.h"
-
-#include <stdlib.h>
#if 0
#define _ARM_JTAG_SCAN_N_CHECK_
diff --git a/src/target/arm_jtag.h b/src/target/arm_jtag.h
index fff3e79e..c76ba4a8 100644
--- a/src/target/arm_jtag.h
+++ b/src/target/arm_jtag.h
@@ -23,7 +23,6 @@
#ifndef ARM_JTAG
#define ARM_JTAG
-#include "types.h"
#include "jtag.h"
typedef struct arm_jtag_s
diff --git a/src/target/arm_simulator.c b/src/target/arm_simulator.c
index b21ea4a8..00fbb2d7 100644
--- a/src/target/arm_simulator.c
+++ b/src/target/arm_simulator.c
@@ -24,14 +24,12 @@
#include "config.h"
#endif
-#include "target.h"
#include "armv4_5.h"
#include "arm_disassembler.h"
#include "arm_simulator.h"
#include "log.h"
#include "binarybuffer.h"
-#include <string.h>
u32 arm_shift(u8 shift, u32 Rm, u32 shift_amount, u8 *carry)
{
diff --git a/src/target/arm_simulator.h b/src/target/arm_simulator.h
index 78948730..730e6ccb 100644
--- a/src/target/arm_simulator.h
+++ b/src/target/arm_simulator.h
@@ -20,11 +20,11 @@
#ifndef ARM_SIMULATOR_H
#define ARM_SIMULATOR_H
-#include "target.h"
#include "types.h"
-extern int arm_simulate_step(target_t *target, u32 *dry_run_pc);
+struct target_s;
+extern int arm_simulate_step(struct target_s *target, u32 *dry_run_pc);
#define ERROR_ARM_SIMULATOR_NOT_IMPLEMENTED (-700)
diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c
index 1144c7f1..14aec019 100644
--- a/src/target/armv4_5.c
+++ b/src/target/armv4_5.c
@@ -27,21 +27,10 @@
#include "config.h"
#endif
-#include "replacements.h"
-
-#include "arm_disassembler.h"
-
#include "armv4_5.h"
-
-#include "target.h"
-#include "register.h"
-#include "log.h"
+#include "arm_disassembler.h"
#include "binarybuffer.h"
-#include "command.h"
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
bitfield_desc_t armv4_5_psr_bitfield_desc[] =
{
diff --git a/src/target/armv4_5_cache.c b/src/target/armv4_5_cache.c
index 127420dc..e6f08894 100644
--- a/src/target/armv4_5_cache.c
+++ b/src/target/armv4_5_cache.c
@@ -22,9 +22,7 @@
#endif
#include "armv4_5_cache.h"
-
#include "log.h"
-#include "command.h"
int armv4_5_identify_cache(u32 cache_type_reg, armv4_5_cache_common_t *cache)
{
diff --git a/src/target/armv4_5_cache.h b/src/target/armv4_5_cache.h
index 03b95935..0a6e88ae 100644
--- a/src/target/armv4_5_cache.h
+++ b/src/target/armv4_5_cache.h
@@ -21,7 +21,8 @@
#define ARMV4_5_CACHE_H
#include "types.h"
-#include "command.h"
+
+struct command_context_s;
typedef struct armv4_5_cachesize_s
{
diff --git a/src/target/armv4_5_mmu.c b/src/target/armv4_5_mmu.c
index b108196e..cc8fb3a2 100644
--- a/src/target/armv4_5_mmu.c
+++ b/src/target/armv4_5_mmu.c
@@ -21,13 +21,9 @@
#include "config.h"
#endif
-#include "arm7_9_common.h"
#include "log.h"
-#include "command.h"
#include "armv4_5_mmu.h"
-#include "target.h"
-#include <stdlib.h>
u32 armv4mmu_translate_va(target_t *target, armv4_5_mmu_common_t *armv4_5_mmu, u32 va, int *type, u32 *cb, int *domain, u32 *ap);
diff --git a/src/target/armv4_5_mmu.h b/src/target/armv4_5_mmu.h
index b0a87ebb..100beca9 100644
--- a/src/target/armv4_5_mmu.h
+++ b/src/target/armv4_5_mmu.h
@@ -21,6 +21,7 @@
#define ARMV4_5_MMU_H
#include "armv4_5_cache.h"
+#include "target.h"
typedef struct armv4_5_mmu_common_s
{
diff --git a/src/target/armv7m.c b/src/target/armv7m.c
index 712b5ae3..a73e60ea 100644
--- a/src/target/armv7m.c
+++ b/src/target/armv7m.c
@@ -30,17 +30,8 @@
#include "config.h"
#endif
-#include "replacements.h"
-
#include "armv7m.h"
-#include "register.h"
-#include "target.h"
-#include "log.h"
-#include "jtag.h"
-#include "arm_jtag.h"
-
-#include <stdlib.h>
-#include <string.h>
+
#if 0
#define _DEBUG_INSTRUCTION_EXECUTION_
diff --git a/src/target/armv7m.h b/src/target/armv7m.h
index 35afe11f..cb7bb5cb 100644
--- a/src/target/armv7m.h
+++ b/src/target/armv7m.h
@@ -26,9 +26,6 @@
#ifndef ARMV7M_COMMON_H
#define ARMV7M_COMMON_H
-#include "register.h"
-#include "target.h"
-#include "arm_jtag.h"
#include "arm_adi_v5.h"
/* define for enabling armv7 gdb workarounds */