From 004c7124c44819960da97de85f422f630f04d7ba Mon Sep 17 00:00:00 2001 From: zwelch Date: Mon, 11 May 2009 04:04:58 +0000 Subject: [PATCH] Audit and eliminate redundant #include directives from src/jtag. git-svn-id: svn://svn.berlios.de/openocd/trunk@1707 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/jtag/amt_jtagaccel.c | 15 --------------- src/jtag/arm-jtag-ew.c | 7 ------- src/jtag/at91rm9200.c | 8 +------- src/jtag/bitbang.c | 11 ----------- src/jtag/bitq.c | 10 ---------- src/jtag/dummy.c | 2 -- src/jtag/ep93xx.c | 8 -------- src/jtag/ft2232.c | 9 --------- src/jtag/gw16012.c | 15 ++------------- src/jtag/jlink.c | 5 ----- src/jtag/jtag.c | 8 -------- src/jtag/jtag.h | 3 --- src/jtag/parport.c | 22 +--------------------- src/jtag/presto.c | 10 ---------- src/jtag/rlink/rlink.c | 13 ++++--------- src/jtag/usbprog.c | 6 +----- src/jtag/vsllink.c | 4 ---- src/jtag/zy1000.c | 7 +------ 18 files changed, 10 insertions(+), 153 deletions(-) diff --git a/src/jtag/amt_jtagaccel.c b/src/jtag/amt_jtagaccel.c index 2db90935f..ff9cbdaae 100644 --- a/src/jtag/amt_jtagaccel.c +++ b/src/jtag/amt_jtagaccel.c @@ -21,25 +21,13 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" -/* system includes */ - -#ifdef _WIN32 -#include "errno.h" -#endif /* _WIN32 */ - -#include -#include #if PARPORT_USE_PPDEV == 1 #include #include -#include #include -#include #else /* not PARPORT_USE_PPDEV */ #ifndef _WIN32 #include @@ -49,12 +37,9 @@ #if PARPORT_USE_GIVEIO == 1 #if IS_CYGWIN == 1 #include -#include #endif #endif -#include "log.h" - /* configuration */ static u16 amt_jtagaccel_port; diff --git a/src/jtag/arm-jtag-ew.c b/src/jtag/arm-jtag-ew.c index 9e06f5e90..3b4bfa7ee 100644 --- a/src/jtag/arm-jtag-ew.c +++ b/src/jtag/arm-jtag-ew.c @@ -24,16 +24,9 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" #include -#include -#include -/* system includes */ - -#include "log.h" #define USB_VID 0x15ba #define USB_PID 0x001e diff --git a/src/jtag/at91rm9200.c b/src/jtag/at91rm9200.c index 45fb089bc..9f15b1a09 100644 --- a/src/jtag/at91rm9200.c +++ b/src/jtag/at91rm9200.c @@ -21,17 +21,11 @@ #include "config.h" #endif -#include "log.h" #include "jtag.h" #include "bitbang.h" -/* system includes */ -#include -#include -#include #include -#include -#include + /* AT91RM9200 */ #define AT91C_BASE_SYS (0xfffff000) diff --git a/src/jtag/bitbang.c b/src/jtag/bitbang.c index ea1f016ca..f407deb18 100644 --- a/src/jtag/bitbang.c +++ b/src/jtag/bitbang.c @@ -25,18 +25,7 @@ #endif #include "bitbang.h" - -/* project specific includes */ -#include "log.h" -#include "types.h" #include "jtag.h" -#include "configuration.h" - -/* system includes */ -#include -#include -#include - /** * Function bitbang_stableclocks diff --git a/src/jtag/bitq.c b/src/jtag/bitq.c index cbba55110..af17b6389 100644 --- a/src/jtag/bitq.c +++ b/src/jtag/bitq.c @@ -23,16 +23,6 @@ #include "bitq.h" -/* project specific includes */ -#include "log.h" -#include "types.h" -#include "jtag.h" -#include "configuration.h" - -/* system includes */ -#include -#include -#include bitq_interface_t* bitq_interface; /* low level bit queue interface */ diff --git a/src/jtag/dummy.c b/src/jtag/dummy.c index 158a8d5f5..bbed1d4cb 100644 --- a/src/jtag/dummy.c +++ b/src/jtag/dummy.c @@ -21,8 +21,6 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" #include "bitbang.h" diff --git a/src/jtag/ep93xx.c b/src/jtag/ep93xx.c index d79a0d67c..1f4223148 100644 --- a/src/jtag/ep93xx.c +++ b/src/jtag/ep93xx.c @@ -21,7 +21,6 @@ #include "config.h" #endif -#include "log.h" #include "jtag.h" #include "bitbang.h" @@ -33,14 +32,7 @@ #define SRST_BIT 32 #define VCC_BIT 64 -/* system includes */ -#include -#include -#include -#include #include -#include -#include static u8 output_value = 0x0; static int dev_mem_fd; diff --git a/src/jtag/ft2232.c b/src/jtag/ft2232.c index 0c5bfc7dd..08edd269b 100644 --- a/src/jtag/ft2232.c +++ b/src/jtag/ft2232.c @@ -33,23 +33,14 @@ #include "config.h" #endif -#include "replacements.h" - #if IS_CYGWIN == 1 #include "windows.h" #endif /* project specific includes */ -#include "log.h" -#include "types.h" #include "jtag.h" -#include "configuration.h" #include "time_support.h" -/* system includes */ -#include -#include -#include /* FT2232 access library includes */ #if BUILD_FT2232_FTD2XX == 1 diff --git a/src/jtag/gw16012.c b/src/jtag/gw16012.c index 720744a0b..7845e7788 100644 --- a/src/jtag/gw16012.c +++ b/src/jtag/gw16012.c @@ -21,10 +21,9 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" + #if 1 #define _DEBUG_GW16012_IO_ #endif @@ -40,14 +39,8 @@ #else -#ifdef _WIN32 -#include "errno.h" -#endif /* _WIN32 */ - #endif /* __FreeBSD__, __FreeBSD_kernel__ */ -#include -#include #if PARPORT_USE_PPDEV == 1 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) @@ -67,14 +60,10 @@ #endif #endif -#if PARPORT_USE_GIVEIO == 1 -#if IS_CYGWIN == 1 +#if PARPORT_USE_GIVEIO == 1 && IS_CYGWIN == 1 #include -#include -#endif #endif -#include "log.h" /* configuration */ u16 gw16012_port; diff --git a/src/jtag/jlink.c b/src/jtag/jlink.c index f95b1cbe1..f984639b2 100644 --- a/src/jtag/jlink.c +++ b/src/jtag/jlink.c @@ -25,15 +25,10 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" #include -#include -#include -#include "log.h" #define VID 0x1366 #define PID 0x0101 diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c index bf8e039d8..974d7863b 100644 --- a/src/jtag/jtag.c +++ b/src/jtag/jtag.c @@ -28,16 +28,8 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" -#include "command.h" -#include "log.h" - -#include -#include -#include #ifdef HAVE_STRINGS_H #include #endif diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h index d5ed4f580..2ad202405 100644 --- a/src/jtag/jtag.h +++ b/src/jtag/jtag.h @@ -23,12 +23,9 @@ #ifndef JTAG_H #define JTAG_H -#include "types.h" #include "binarybuffer.h" #include "log.h" -#include "command.h" - #ifdef _DEBUG_JTAG_IO_ #define DEBUG_JTAG_IO(expr ...) LOG_DEBUG(expr) diff --git a/src/jtag/parport.c b/src/jtag/parport.c index 5f48d3af2..74c01208f 100644 --- a/src/jtag/parport.c +++ b/src/jtag/parport.c @@ -24,32 +24,17 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" #include "bitbang.h" -/* system includes */ /* -ino: 060521-1036 */ #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) - #include #include #define ioperm(startport,length,enable)\ i386_set_ioperm((startport), (length), (enable)) - -#else - -#ifdef _WIN32 -#include "errno.h" -#endif /* _WIN32 */ - #endif /* __FreeBSD__ */ -#include -#include -#include - #if PARPORT_USE_PPDEV == 1 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #include @@ -60,7 +45,6 @@ #include #include #endif -#include #include #else /* not PARPORT_USE_PPDEV */ #ifndef _WIN32 @@ -68,14 +52,10 @@ #endif #endif -#if PARPORT_USE_GIVEIO == 1 -#if IS_CYGWIN == 1 +#if PARPORT_USE_GIVEIO == 1 && IS_CYGWIN == 1 #include -#include -#endif #endif -#include "log.h" /* parallel port cable description */ diff --git a/src/jtag/presto.c b/src/jtag/presto.c index ea57a36ec..334db76e9 100644 --- a/src/jtag/presto.c +++ b/src/jtag/presto.c @@ -25,20 +25,10 @@ #include "windows.h" #endif -#include "replacements.h" - -/* project specific includes */ -#include "log.h" -#include "types.h" #include "jtag.h" -#include "configuration.h" #include "time_support.h" #include "bitq.h" -/* system includes */ -#include -#include -#include /* PRESTO access library includes */ #if BUILD_PRESTO_FTD2XX == 1 diff --git a/src/jtag/rlink/rlink.c b/src/jtag/rlink/rlink.c index af3a0f47c..2993fc082 100644 --- a/src/jtag/rlink/rlink.c +++ b/src/jtag/rlink/rlink.c @@ -27,22 +27,17 @@ #include "config.h" #endif -/* system includes */ -#include -#include -#include -#include - /* project specific includes */ -#include "log.h" -#include "types.h" #include "jtag.h" -#include "configuration.h" #include "rlink.h" #include "st7.h" #include "ep1_cmd.h" #include "dtc_cmd.h" +/* system includes */ +#include +#include + /* This feature is made useless by running the DTC all the time. When automatic, the LED is on whenever the DTC is running. Otherwise, USB messages are sent to turn it on and off. */ #undef AUTOMATIC_BUSY_LED diff --git a/src/jtag/usbprog.c b/src/jtag/usbprog.c index 7ff38701f..50a55aa9e 100644 --- a/src/jtag/usbprog.c +++ b/src/jtag/usbprog.c @@ -34,14 +34,10 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" + #include -/* system includes */ - -#include "log.h" #define VID 0x1781 #define PID 0x0c63 diff --git a/src/jtag/vsllink.c b/src/jtag/vsllink.c index 360bebe1f..9a52af38f 100644 --- a/src/jtag/vsllink.c +++ b/src/jtag/vsllink.c @@ -26,14 +26,10 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" #include -#include -#include "log.h" //#define _VSLLINK_IN_DEBUG_MODE_ diff --git a/src/jtag/zy1000.c b/src/jtag/zy1000.c index eac80041a..fcadb0096 100644 --- a/src/jtag/zy1000.c +++ b/src/jtag/zy1000.c @@ -20,17 +20,12 @@ #include "config.h" #endif - -#include "log.h" -#include "jtag.h" +#include "embeddedice.h" #include "bitbang.h" -#include "../target/embeddedice.h" - #include // low level i/o #include -#include #define ZYLIN_VERSION "1.51" #define ZYLIN_DATE __DATE__