From: <zw...@ma...> - 2009-05-11 06:05:28
|
Author: zwelch Date: 2009-05-11 06:04:58 +0200 (Mon, 11 May 2009) New Revision: 1707 Modified: trunk/src/jtag/amt_jtagaccel.c trunk/src/jtag/arm-jtag-ew.c trunk/src/jtag/at91rm9200.c trunk/src/jtag/bitbang.c trunk/src/jtag/bitq.c trunk/src/jtag/dummy.c trunk/src/jtag/ep93xx.c trunk/src/jtag/ft2232.c trunk/src/jtag/gw16012.c trunk/src/jtag/jlink.c trunk/src/jtag/jtag.c trunk/src/jtag/jtag.h trunk/src/jtag/parport.c trunk/src/jtag/presto.c trunk/src/jtag/rlink/rlink.c trunk/src/jtag/usbprog.c trunk/src/jtag/vsllink.c trunk/src/jtag/zy1000.c Log: Audit and eliminate redundant #include directives from src/jtag. Modified: trunk/src/jtag/amt_jtagaccel.c =================================================================== --- trunk/src/jtag/amt_jtagaccel.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/amt_jtagaccel.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -21,25 +21,13 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" -/* system includes */ -#ifdef _WIN32 -#include "errno.h" -#endif /* _WIN32 */ - -#include <string.h> -#include <stdlib.h> - #if PARPORT_USE_PPDEV == 1 #include <linux/parport.h> #include <linux/ppdev.h> -#include <fcntl.h> #include <sys/ioctl.h> -#include <unistd.h> #else /* not PARPORT_USE_PPDEV */ #ifndef _WIN32 #include <sys/io.h> @@ -49,12 +37,9 @@ #if PARPORT_USE_GIVEIO == 1 #if IS_CYGWIN == 1 #include <windows.h> -#include <errno.h> #endif #endif -#include "log.h" - /* configuration */ static u16 amt_jtagaccel_port; Modified: trunk/src/jtag/arm-jtag-ew.c =================================================================== --- trunk/src/jtag/arm-jtag-ew.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/arm-jtag-ew.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -24,17 +24,10 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" #include <usb.h> -#include <string.h> -#include <ctype.h> -/* system includes */ -#include "log.h" - #define USB_VID 0x15ba #define USB_PID 0x001e Modified: trunk/src/jtag/at91rm9200.c =================================================================== --- trunk/src/jtag/at91rm9200.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/at91rm9200.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -21,18 +21,12 @@ #include "config.h" #endif -#include "log.h" #include "jtag.h" #include "bitbang.h" -/* system includes */ -#include <string.h> -#include <stdlib.h> -#include <stdio.h> #include <sys/mman.h> -#include <unistd.h> -#include <fcntl.h> + /* AT91RM9200 */ #define AT91C_BASE_SYS (0xfffff000) Modified: trunk/src/jtag/bitbang.c =================================================================== --- trunk/src/jtag/bitbang.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/bitbang.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -25,19 +25,8 @@ #endif #include "bitbang.h" - -/* project specific includes */ -#include "log.h" -#include "types.h" #include "jtag.h" -#include "configuration.h" -/* system includes */ -#include <string.h> -#include <stdlib.h> -#include <unistd.h> - - /** * Function bitbang_stableclocks * issues a number of clock cycles while staying in a stable state. Modified: trunk/src/jtag/bitq.c =================================================================== --- trunk/src/jtag/bitq.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/bitq.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -23,17 +23,7 @@ #include "bitq.h" -/* project specific includes */ -#include "log.h" -#include "types.h" -#include "jtag.h" -#include "configuration.h" -/* system includes */ -#include <string.h> -#include <stdlib.h> -#include <unistd.h> - bitq_interface_t* bitq_interface; /* low level bit queue interface */ static bitq_state_t bitq_in_state; /* state of input queue */ Modified: trunk/src/jtag/dummy.c =================================================================== --- trunk/src/jtag/dummy.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/dummy.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -21,8 +21,6 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" #include "bitbang.h" Modified: trunk/src/jtag/ep93xx.c =================================================================== --- trunk/src/jtag/ep93xx.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/ep93xx.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -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 <string.h> -#include <stdlib.h> -#include <stdio.h> -#include <time.h> #include <sys/mman.h> -#include <unistd.h> -#include <fcntl.h> static u8 output_value = 0x0; static int dev_mem_fd; Modified: trunk/src/jtag/ft2232.c =================================================================== --- trunk/src/jtag/ft2232.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/ft2232.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -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 <string.h> -#include <stdlib.h> -#include <unistd.h> /* FT2232 access library includes */ #if BUILD_FT2232_FTD2XX == 1 Modified: trunk/src/jtag/gw16012.c =================================================================== --- trunk/src/jtag/gw16012.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/gw16012.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -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 <string.h> -#include <stdlib.h> #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 <windows.h> -#include <errno.h> #endif -#endif -#include "log.h" /* configuration */ u16 gw16012_port; Modified: trunk/src/jtag/jlink.c =================================================================== --- trunk/src/jtag/jlink.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/jlink.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -25,15 +25,10 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" #include <usb.h> -#include <string.h> -#include <errno.h> -#include "log.h" #define VID 0x1366 #define PID 0x0101 Modified: trunk/src/jtag/jtag.c =================================================================== --- trunk/src/jtag/jtag.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/jtag.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -28,16 +28,8 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" -#include "command.h" -#include "log.h" - -#include <stdlib.h> -#include <string.h> -#include <unistd.h> #ifdef HAVE_STRINGS_H #include <strings.h> #endif Modified: trunk/src/jtag/jtag.h =================================================================== --- trunk/src/jtag/jtag.h 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/jtag.h 2009-05-11 04:04:58 UTC (rev 1707) @@ -23,13 +23,10 @@ #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) #else Modified: trunk/src/jtag/parport.c =================================================================== --- trunk/src/jtag/parport.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/parport.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -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 <machine/sysarch.h> #include <machine/cpufunc.h> #define ioperm(startport,length,enable)\ i386_set_ioperm((startport), (length), (enable)) - -#else - -#ifdef _WIN32 -#include "errno.h" -#endif /* _WIN32 */ - #endif /* __FreeBSD__ */ -#include <string.h> -#include <stdlib.h> -#include <stdio.h> - #if PARPORT_USE_PPDEV == 1 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #include <dev/ppbus/ppi.h> @@ -60,7 +45,6 @@ #include <linux/parport.h> #include <linux/ppdev.h> #endif -#include <fcntl.h> #include <sys/ioctl.h> #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 <windows.h> -#include <errno.h> #endif -#endif -#include "log.h" /* parallel port cable description */ Modified: trunk/src/jtag/presto.c =================================================================== --- trunk/src/jtag/presto.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/presto.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -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 <string.h> -#include <stdlib.h> -#include <unistd.h> /* PRESTO access library includes */ #if BUILD_PRESTO_FTD2XX == 1 Modified: trunk/src/jtag/rlink/rlink.c =================================================================== --- trunk/src/jtag/rlink/rlink.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/rlink/rlink.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -27,23 +27,18 @@ #include "config.h" #endif -/* system includes */ -#include <errno.h> -#include <string.h> -#include <usb.h> -#include <stdint.h> - /* 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 <usb.h> +#include <stdint.h> + /* 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 Modified: trunk/src/jtag/usbprog.c =================================================================== --- trunk/src/jtag/usbprog.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/usbprog.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -34,15 +34,11 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" + #include <usb.h> -/* system includes */ -#include "log.h" - #define VID 0x1781 #define PID 0x0c63 Modified: trunk/src/jtag/vsllink.c =================================================================== --- trunk/src/jtag/vsllink.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/vsllink.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -26,14 +26,10 @@ #include "config.h" #endif -#include "replacements.h" - #include "jtag.h" #include <usb.h> -#include <string.h> -#include "log.h" //#define _VSLLINK_IN_DEBUG_MODE_ Modified: trunk/src/jtag/zy1000.c =================================================================== --- trunk/src/jtag/zy1000.c 2009-05-11 03:59:02 UTC (rev 1706) +++ trunk/src/jtag/zy1000.c 2009-05-11 04:04:58 UTC (rev 1707) @@ -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 <cyg/hal/hal_io.h> // low level i/o #include <cyg/hal/hal_diag.h> -#include <stdlib.h> #define ZYLIN_VERSION "1.51" #define ZYLIN_DATE __DATE__ |