target: don't implicitly include "algorithm.h"
authorDavid Brownell <dbrownell@users.sourceforge.net>
Mon, 16 Nov 2009 08:35:05 +0000 (00:35 -0800)
committerDavid Brownell <dbrownell@users.sourceforge.net>
Mon, 16 Nov 2009 08:35:05 +0000 (00:35 -0800)
Most files in the tree seem to have ended up including this,
and *quite* needlessly ... only code implementing or using
downloadable algorithms actually needs these declarations.

So take it out of the header files which included it, and put
it in files which use it ... reduce needless interdependencies.

Also: "algorithm.h" doesn't need to include "types.h" again;
it already comes from a different header.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
16 files changed:
src/flash/aduc702x.c
src/flash/arm_nandio.c
src/flash/cfi.c
src/flash/ecos.c
src/flash/lpc2000.c
src/flash/lpc2900.c
src/flash/stellaris.c
src/flash/stm32x.c
src/flash/str7x.c
src/flash/str9x.c
src/target/algorithm.h
src/target/arm11.c
src/target/arm7_9_common.c
src/target/armv4_5.c
src/target/armv7m.c
src/target/target.h

index c2a1884860b1ce3c1764ae59aeab15e1934d99af..643705cae287c0df6cf1cc0ec31626c1ab99ca0b 100644 (file)
@@ -27,6 +27,7 @@
 #include "armv4_5.h"
 #include "binarybuffer.h"
 #include "time_support.h"
+#include "algorithm.h"
 
 
 static int aduc702x_build_sector_list(struct flash_bank *bank);
index 63eb0413a73b939a0cbef65e5fe6baa08f698919..81697fa5c1fdcd731b4848e21ba886dbe4c984a1 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "arm_nandio.h"
 #include "armv4_5.h"
+#include "algorithm.h"
 
 
 /*
@@ -43,8 +44,8 @@ int arm_nandwrite(struct arm_nand_data *nand, uint8_t *data, int size)
 {
        struct target           *target = nand->target;
        struct armv4_5_algorithm        algo;
-       struct arm      *armv4_5 = target->arch_info;
-       struct reg_param                reg_params[3];
+       struct arm              *armv4_5 = target->arch_info;
+       struct reg_param        reg_params[3];
        uint32_t                target_buf;
        uint32_t                exit = 0;
        int                     retval;
index 17f5c32bcb9379252ff5822cceaf3ac4c84c7b66..c0ad50dd19d100eeeaefad45eeb709429235b862 100644 (file)
@@ -27,6 +27,7 @@
 #include "non_cfi.h"
 #include "armv4_5.h"
 #include "binarybuffer.h"
+#include "algorithm.h"
 
 
 #define CFI_MAX_BUS_WIDTH      4
index 0525fbe3c712cd04392d93e3b61bb69fb83bdeae..c12ed9d247084d4da71c214900d2604a36c20ea9 100644 (file)
@@ -24,6 +24,7 @@
 #include "flash.h"
 #include "embeddedice.h"
 #include "image.h"
+#include "algorithm.h"
 
 
 #if 0
index df1f0824b3796be6f8066383fcafa83aa902301a..09bb13f211b045c41432ce6600f8610c3a01a8ff 100644 (file)
@@ -29,6 +29,7 @@
 #include "armv4_5.h"
 #include "armv7m.h"
 #include "binarybuffer.h"
+#include "algorithm.h"
 
 
 /* flash programming support for NXP LPC17xx and LPC2xxx devices
index 556a1512474ec7801ee6c17ac82f500f68f3d18f..35f15070a78217e7fe4e74a28b5df27b0aaf2481 100644 (file)
@@ -27,6 +27,7 @@
 #include "flash.h"
 #include "binarybuffer.h"
 #include "armv4_5.h"
+#include "algorithm.h"
 
 
 /* 1024 bytes */
index 56762d16550e43ee6ef929f81e6baf7c0720d73c..7b94675457ff39ecceca5be7604d802691cdf1d5 100644 (file)
@@ -31,6 +31,7 @@
 #include "stellaris.h"
 #include "armv7m.h"
 #include "binarybuffer.h"
+#include "algorithm.h"
 
 
 #define DID0_VER(did0) ((did0 >> 28)&0x07)
index 7ac06a68f9f7b379dd029a3a667b0770b20802a1..70727158bbf386e1516cdfcb6bcaab1297b7314a 100644 (file)
@@ -27,6 +27,7 @@
 #include "stm32x.h"
 #include "armv7m.h"
 #include "binarybuffer.h"
+#include "algorithm.h"
 
 
 static int stm32x_mass_erase(struct flash_bank *bank);
index 71709bb028572684d79fe06a7e174e207eb7ca3d..19ee160ea82116925560a499d4a3b906a25e3a5e 100644 (file)
@@ -27,6 +27,7 @@
 #include "str7x.h"
 #include "armv4_5.h"
 #include "binarybuffer.h"
+#include "algorithm.h"
 
 
 struct str7x_mem_layout mem_layout_str7bank0[] = {
index 1506cb59dd1495244b62eeb374316798281be76b..870871cc7a19dc165c6f4da3d726c4fe4bad23ff 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "str9x.h"
 #include "arm966e.h"
+#include "algorithm.h"
 
 
 static uint32_t bank1start = 0x00080000;
index 80f081dbfa99b882ea21b5ac8de3c8d18b541c5f..abb8ecfc6e2521e60eddc4c1c96598b00d24d671 100644 (file)
@@ -20,8 +20,6 @@
 #ifndef ALGORITHM_H
 #define ALGORITHM_H
 
-#include "types.h"
-
 enum param_direction
 {
        PARAM_IN,
index f4e2c0d56a1e777b82e1d9b07db6914b39813315..cdeb420039718dc947ea0ce73e8f7945c37ebc00 100644 (file)
@@ -33,6 +33,7 @@
 #include "arm_simulator.h"
 #include "time_support.h"
 #include "target_type.h"
+#include "algorithm.h"
 
 
 #if 0
index b07111eb8f37959bd72decb7078086491faba6db..76c79c3abd2d89f591dc4f9575c4d86fcccfe2ff 100644 (file)
@@ -36,6 +36,7 @@
 #include "arm7_9_common.h"
 #include "time_support.h"
 #include "arm_simulator.h"
+#include "algorithm.h"
 
 
 /**
index 47b32added3839bc53ca23c6b76d15cfc53c30d5..e6e0bd7e355c53752452e5c4c7af26e9f1f6419f 100644 (file)
@@ -31,6 +31,7 @@
 #include "breakpoints.h"
 #include "arm_disassembler.h"
 #include "binarybuffer.h"
+#include "algorithm.h"
 
 
 char* armv4_5_core_reg_list[] =
index 6c6a9ec60bcce66dfa1d17a0536084b5899f5246..3f9e7f55ac40c5ec2a43d437f6860919da2d8cbf 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "breakpoints.h"
 #include "armv7m.h"
+#include "algorithm.h"
 
 #define ARRAY_SIZE(x)  ((int)(sizeof(x)/sizeof((x)[0])))
 
index 06105ee6d60128d84452de6ebea5afd79b19c6d3..75bc4f0223e5603dd9af4389b427334cc61ca7a2 100644 (file)
@@ -28,7 +28,6 @@
 
 #include <stddef.h>
 
-#include "algorithm.h"
 #include "command.h"
 
 struct reg;
@@ -36,6 +35,8 @@ struct trace;
 struct command_context;
 struct breakpoint;
 struct watchpoint;
+struct mem_param;
+struct reg_param;
 
 
 /**

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)