Audit and eliminate redundant #include directives in src/flash sources.
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 11 May 2009 04:30:41 +0000 (04:30 +0000)
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 11 May 2009 04:30:41 +0000 (04:30 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1712 b42882b7-edfa-0310-969c-e2dbd0fdcd60

27 files changed:
src/flash/aduc702x.c
src/flash/at91sam7.c
src/flash/avrf.c
src/flash/cfi.c
src/flash/ecos.c
src/flash/flash.c
src/flash/lpc2000.c
src/flash/lpc288x.c
src/flash/lpc3180_nand_controller.c
src/flash/mflash.c
src/flash/nand.c
src/flash/nand_ecc.c
src/flash/non_cfi.c
src/flash/ocl.c
src/flash/orion_nand.c
src/flash/pic32mx.c
src/flash/s3c2410_nand.c
src/flash/s3c2412_nand.c
src/flash/s3c2440_nand.c
src/flash/s3c2443_nand.c
src/flash/s3c24xx_nand.c
src/flash/stellaris.c
src/flash/stm32x.c
src/flash/str7x.c
src/flash/str9x.c
src/flash/str9xpec.c
src/flash/tms470.c

index 5b80e0c..2a9c1c2 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-#include "time_support.h"
 #include "flash.h"
-#include "target.h"
-#include "log.h"
 #include "armv4_5.h"
-#include "algorithm.h"
 #include "binarybuffer.h"
+#include "time_support.h"
 
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
 
 static int aduc702x_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank);
 static int aduc702x_register_commands(struct command_context_s *cmd_ctx);
index 8bb572f..c840d50 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-
 #include "at91sam7.h"
-
-#include "flash.h"
-#include "target.h"
-#include "log.h"
 #include "binarybuffer.h"
-#include "types.h"
 
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
 
 static int at91sam7_register_commands(struct command_context_s *cmd_ctx);
 static int at91sam7_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank);
index 9d32e6d..307e54e 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-
 #include "avrf.h"
 #include "avrt.h"
 #include "flash.h"
-#include "target.h"
-#include "log.h"
-#include "algorithm.h"
-#include "binarybuffer.h"
 
-#include <stdlib.h>
-#include <string.h>
 
 /* AVR_JTAG_Instructions */
 #define AVR_JTAG_INS_LEN                                                       4
index edc4645..0eb44d6 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-
 #include "cfi.h"
 #include "non_cfi.h"
-
-#include "flash.h"
-#include "target.h"
-#include "log.h"
 #include "armv4_5.h"
-#include "algorithm.h"
 #include "binarybuffer.h"
-#include "types.h"
 
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
 
 static int cfi_register_commands(struct command_context_s *cmd_ctx);
 static int cfi_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank);
index bc31fdd..3c2b456 100644 (file)
 #include "config.h"
 #endif
 
-#include <string.h>
-
-#include "replacements.h"
-
 #include "flash.h"
+#include "embeddedice.h"
+#include "image.h"
 
-#include "target.h"
-
-#include "flash.h"
-#include "target.h"
-#include "log.h"
-#include "binarybuffer.h"
-#include "../target/embeddedice.h"
-#include "types.h"
 
 static int ecosflash_register_commands(struct command_context_s *cmd_ctx);
 static int ecosflash_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank);
index 0ad6c7a..4f4d272 100644 (file)
 #endif
 
 #include "flash.h"
-#include "command.h"
-#include "target.h"
-#include "time_support.h"
-#include "fileio.h"
 #include "image.h"
-#include "log.h"
-#include "armv4_5.h"
-#include "algorithm.h"
-#include "binarybuffer.h"
-#include "armv7m.h"
-
-#include <string.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-#include <errno.h>
+#include "time_support.h"
+
 #include <inttypes.h>
 
 /* command handlers */
index db0602f..2708d53 100644 (file)
 #endif
 
 #include "lpc2000.h"
-
-#include "flash.h"
-#include "target.h"
-#include "log.h"
 #include "armv4_5.h"
-#include "algorithm.h"
 #include "binarybuffer.h"
 
-#include <stdlib.h>
-#include <string.h>
 
 /* flash programming support for Philips LPC2xxx devices
  * currently supported devices:
index 1f47896..505dd1e 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-
 #include "lpc288x.h"
-
-#include "flash.h"
-#include "target.h"
-#include "log.h"
 #include "binarybuffer.h"
-#include "types.h"
 
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
 
 #define LOAD_TIMER_ERASE       0
 #define LOAD_TIMER_WRITE       1
index c24e30a..ffe7ce2 100644 (file)
 #endif
 
 #include "lpc3180_nand_controller.h"
-
-#include "replacements.h"
-#include "log.h"
-
-#include <stdlib.h>
-#include <string.h>
-
 #include "nand.h"
-#include "target.h"
 
 static int lpc3180_nand_device_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct nand_device_s *device);
 static int lpc3180_register_commands(struct command_context_s *cmd_ctx);
index 451d942..8913e16 100644 (file)
 #include "config.h"
 #endif
 
-#include <ctype.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <inttypes.h>
-
-#include "command.h"
-#include "log.h"
-#include "target.h"
+#include "mflash.h"
 #include "time_support.h"
 #include "fileio.h"
-#include "mflash.h"
+#include "log.h"
+
 
 static int s3c2440_set_gpio_to_output (mflash_gpio_num_t gpio);
 static int s3c2440_set_gpio_output_val (mflash_gpio_num_t gpio, u8 val);
index 67f1537..8efed03 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-#include "log.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <inttypes.h>
-
-#include <errno.h>
-
 #include "nand.h"
-#include "flash.h"
 #include "time_support.h"
 #include "fileio.h"
-#include "image.h"
+
+#include <inttypes.h>
+
 
 static int handle_nand_list_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
 static int handle_nand_probe_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
index 91dd8c6..c1a1883 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-
-#include <inttypes.h>
-
 #include "nand.h"
 
 /*
index 20aa9f1..3e86e0d 100644 (file)
 #include "config.h"
 #endif
 
-#include <stdlib.h>
-
-#include "log.h"
-
-#include "flash.h"
-#include "cfi.h"
 #include "non_cfi.h"
+#include "cfi.h"
+
 
 #define KB 1024
 #define MB (1024*1024)
index ec8c20d..e2099a1 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-
 #include "ocl.h"
-
 #include "flash.h"
-#include "target.h"
-#include "log.h"
-#include "binarybuffer.h"
-#include "types.h"
 #include "embeddedice.h"
-#include "arm7_9_common.h"
 
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
 
 static int ocl_register_commands(struct command_context_s *cmd_ctx);
 static int ocl_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank);
index 678eb94..fb5a340 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-#include "log.h"
-
-#include <stdlib.h>
-#include <string.h>
-
 #include "nand.h"
-#include "target.h"
 #include "armv4_5.h"
 #include "binarybuffer.h"
 
+
 typedef struct orion_nand_controller_s
 {
        struct target_s *target;
index 94ec745..2a5ce64 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-
 #include "pic32mx.h"
-#include "flash.h"
-#include "target.h"
-#include "log.h"
 #include "mips32.h"
-#include "algorithm.h"
-#include "binarybuffer.h"
 
-#include <stdlib.h>
-#include <string.h>
 
 static
 struct pic32mx_devs_s {
index 8d218f8..951677c 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-#include "log.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "nand.h"
 #include "s3c24xx_nand.h"
-#include "target.h"
+
 
 static int s3c2410_nand_device_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct nand_device_s *device);
 static int s3c2410_init(struct nand_device_s *device);
index 11e54e7..271b3c4 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-#include "log.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "nand.h"
 #include "s3c24xx_nand.h"
-#include "target.h"
+
 
 static int s3c2412_nand_device_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct nand_device_s *device);
 static int s3c2412_init(struct nand_device_s *device);
index 862a013..61aace6 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-#include "log.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "nand.h"
 #include "s3c24xx_nand.h"
-#include "target.h"
+
 
 static int s3c2440_nand_device_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct nand_device_s *device);
 static int s3c2440_init(struct nand_device_s *device);
index aa12966..7dc3aa3 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-#include "log.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "nand.h"
 #include "s3c24xx_nand.h"
-#include "target.h"
+
 
 static int s3c2443_nand_device_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct nand_device_s *device);
 static int s3c2443_init(struct nand_device_s *device);
index 380f320..ecd48ee 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-#include "log.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "nand.h"
 #include "s3c24xx_nand.h"
-#include "target.h"
+
 
 s3c24xx_nand_controller_t *
 s3c24xx_nand_device_command(struct command_context_s *cmd_ctx, char *cmd,
index 61e30f5..38ded4f 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-
 #include "stellaris.h"
-#include "cortex_m3.h"
-
-#include "flash.h"
-#include "target.h"
-#include "log.h"
+#include "armv7m.h"
 #include "binarybuffer.h"
-#include "types.h"
 
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
 
 #define DID0_VER(did0) ((did0>>28)&0x07)
 static int stellaris_register_commands(struct command_context_s *cmd_ctx);
index e151fc5..2a3b764 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-
 #include "stm32x.h"
-#include "flash.h"
-#include "target.h"
-#include "log.h"
 #include "armv7m.h"
-#include "algorithm.h"
 #include "binarybuffer.h"
 
-#include <stdlib.h>
-#include <string.h>
 
 static int stm32x_register_commands(struct command_context_s *cmd_ctx);
 static int stm32x_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank);
index 1d9396b..ffd01fa 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-
 #include "str7x.h"
-#include "flash.h"
-#include "target.h"
-#include "log.h"
 #include "armv4_5.h"
-#include "algorithm.h"
 #include "binarybuffer.h"
 
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
 
 str7x_mem_layout_t mem_layout_str7bank0[] = {
        {0x00000000, 0x02000, 0x01},
index fbba4fe..32445ae 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-
 #include "str9x.h"
-#include "flash.h"
-#include "target.h"
-#include "log.h"
-#include "armv4_5.h"
 #include "arm966e.h"
-#include "algorithm.h"
-#include "binarybuffer.h"
 
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
 
 static u32 bank1start = 0x00080000;
 
index f6ffa6e..dc195c1 100644 (file)
 #include "config.h"
 #endif
 
-#include "replacements.h"
-
 #include "str9xpec.h"
-#include "flash.h"
-#include "target.h"
-#include "log.h"
-#include "armv4_5.h"
 #include "arm7_9_common.h"
-#include "jtag.h"
-#include "binarybuffer.h"
 
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <getopt.h>
 
 static int str9xpec_register_commands(struct command_context_s *cmd_ctx);
 static int str9xpec_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank);
index 91f0cc0..1d7497f 100644 (file)
 #include "config.h"
 #endif
 
-#include "log.h"
 #include "tms470.h"
-#include <string.h>
-#include <unistd.h>
+
 
 static int tms470_register_commands(struct command_context_s *cmd_ctx);
 static int tms470_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct flash_bank_s *bank);