aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-12-04 14:06:20 -0800
committerZachary T Welch <zw@superlucidity.net>2009-12-04 16:56:23 -0800
commitd9dc604a4d790f557a7ba502babdabffa27eaa17 (patch)
tree2df028ecfa72a89775956202975c890493f83714
parent1527272fb21beee7839335ea5587e879163d2ed1 (diff)
downloadriscv-openocd-d9dc604a4d790f557a7ba502babdabffa27eaa17.zip
riscv-openocd-d9dc604a4d790f557a7ba502babdabffa27eaa17.tar.gz
riscv-openocd-d9dc604a4d790f557a7ba502babdabffa27eaa17.tar.bz2
remove target.h from flash.h
The flash.h header does not require the target.h header file, but its implementation source files do. Move it to flash/nor/imp.h.
-rw-r--r--src/flash/flash.h1
-rw-r--r--src/flash/nor/aduc702x.c4
-rw-r--r--src/flash/nor/at91sam3.c8
-rw-r--r--src/flash/nor/at91sam7.c1
-rw-r--r--src/flash/nor/avrf.c2
-rw-r--r--src/flash/nor/cfi.c1
-rw-r--r--src/flash/nor/ecos.c4
-rw-r--r--src/flash/nor/faux.c2
-rw-r--r--src/flash/nor/imp.h4
-rw-r--r--src/flash/nor/lpc2000.c3
-rw-r--r--src/flash/nor/lpc288x.c1
-rw-r--r--src/flash/nor/lpc2900.c6
-rw-r--r--src/flash/nor/ocl.c2
-rw-r--r--src/flash/nor/pic32mx.c1
-rw-r--r--src/flash/nor/stellaris.c3
-rw-r--r--src/flash/nor/stm32x.c3
-rw-r--r--src/flash/nor/str7x.c1
-rw-r--r--src/flash/nor/str9x.c1
-rw-r--r--src/flash/nor/str9xpec.c1
-rw-r--r--src/flash/nor/tms470.c1
-rw-r--r--src/server/gdb_server.h1
21 files changed, 31 insertions, 20 deletions
diff --git a/src/flash/flash.h b/src/flash/flash.h
index 1e1be85..8cd50f6 100644
--- a/src/flash/flash.h
+++ b/src/flash/flash.h
@@ -27,7 +27,6 @@
#define FLASH_H
#include <flash/common.h>
-#include <target/target.h>
struct image;
diff --git a/src/flash/nor/aduc702x.c b/src/flash/nor/aduc702x.c
index 6696912..1b9f5c0 100644
--- a/src/flash/nor/aduc702x.c
+++ b/src/flash/nor/aduc702x.c
@@ -23,11 +23,11 @@
#include "config.h"
#endif
-#include <flash/flash.h>
-#include <target/armv4_5.h>
+#include "imp.h"
#include <helper/binarybuffer.h>
#include <helper/time_support.h>
#include <target/algorithm.h>
+#include <target/armv4_5.h>
static int aduc702x_build_sector_list(struct flash_bank *bank);
diff --git a/src/flash/nor/at91sam3.c b/src/flash/nor/at91sam3.c
index dd4f347..1194e25 100644
--- a/src/flash/nor/at91sam3.c
+++ b/src/flash/nor/at91sam3.c
@@ -57,13 +57,9 @@
#endif
-#include <stdio.h>
-#include <string.h>
-#include <stddef.h>
-#include <helper/types.h>
-#include <flash/flash.h>
-#include <helper/membuf.h>
+#include "imp.h"
#include "at91sam3.h"
+#include <helper/membuf.h>
#include <helper/time_support.h>
#define REG_NAME_WIDTH (12)
diff --git a/src/flash/nor/at91sam7.c b/src/flash/nor/at91sam7.c
index 3201737..97d6b56 100644
--- a/src/flash/nor/at91sam7.c
+++ b/src/flash/nor/at91sam7.c
@@ -49,6 +49,7 @@
#include "config.h"
#endif
+#include "imp.h"
#include "at91sam7.h"
#include <helper/binarybuffer.h>
diff --git a/src/flash/nor/avrf.c b/src/flash/nor/avrf.c
index fbc9277..6c2d17f 100644
--- a/src/flash/nor/avrf.c
+++ b/src/flash/nor/avrf.c
@@ -21,9 +21,9 @@
#include "config.h"
#endif
+#include "imp.h"
#include "avrf.h"
#include <target/avrt.h>
-#include <flash/flash.h>
/* AVR_JTAG_Instructions */
diff --git a/src/flash/nor/cfi.c b/src/flash/nor/cfi.c
index 61b5d4c..c00d65f 100644
--- a/src/flash/nor/cfi.c
+++ b/src/flash/nor/cfi.c
@@ -23,6 +23,7 @@
#include "config.h"
#endif
+#include "imp.h"
#include "cfi.h"
#include "non_cfi.h"
#include <target/armv4_5.h>
diff --git a/src/flash/nor/ecos.c b/src/flash/nor/ecos.c
index 8f8f746..799015e 100644
--- a/src/flash/nor/ecos.c
+++ b/src/flash/nor/ecos.c
@@ -21,10 +21,10 @@
#include "config.h"
#endif
-#include <flash/flash.h>
+#include "imp.h"
#include <target/embeddedice.h>
-#include <target/image.h>
#include <target/algorithm.h>
+#include <target/image.h>
#if 0
diff --git a/src/flash/nor/faux.c b/src/flash/nor/faux.c
index c996522..948f305 100644
--- a/src/flash/nor/faux.c
+++ b/src/flash/nor/faux.c
@@ -21,7 +21,7 @@
#include "config.h"
#endif
-#include <flash/flash.h>
+#include "imp.h"
#include <target/image.h>
#include "hello.h"
diff --git a/src/flash/nor/imp.h b/src/flash/nor/imp.h
index ade7297..84ef871 100644
--- a/src/flash/nor/imp.h
+++ b/src/flash/nor/imp.h
@@ -21,6 +21,10 @@
// this is an internal header
#include "core.h"
+// common flash internals
+#include <flash/common.h>
+// almost all drivers will need this file
+#include <target/target.h>
/**
* Adds a new NOR bank to the global list of banks.
diff --git a/src/flash/nor/lpc2000.c b/src/flash/nor/lpc2000.c
index 295e3e7..d824c37 100644
--- a/src/flash/nor/lpc2000.c
+++ b/src/flash/nor/lpc2000.c
@@ -25,10 +25,11 @@
#include "config.h"
#endif
+#include "imp.h"
#include "lpc2000.h"
-#include <target/armv7m.h>
#include <helper/binarybuffer.h>
#include <target/algorithm.h>
+#include <target/armv7m.h>
/* flash programming support for NXP LPC17xx and LPC2xxx devices
diff --git a/src/flash/nor/lpc288x.c b/src/flash/nor/lpc288x.c
index 252a813..5cb36d0 100644
--- a/src/flash/nor/lpc288x.c
+++ b/src/flash/nor/lpc288x.c
@@ -31,6 +31,7 @@
#include "config.h"
#endif
+#include "imp.h"
#include "lpc288x.h"
#include <helper/binarybuffer.h>
diff --git a/src/flash/nor/lpc2900.c b/src/flash/nor/lpc2900.c
index dc466f8..0b42d48 100644
--- a/src/flash/nor/lpc2900.c
+++ b/src/flash/nor/lpc2900.c
@@ -23,11 +23,11 @@
#endif
-#include <target/image.h>
-#include <flash/flash.h>
+#include "imp.h"
#include <helper/binarybuffer.h>
-#include <target/armv4_5.h>
#include <target/algorithm.h>
+#include <target/armv4_5.h>
+#include <target/image.h>
/* 1024 bytes */
diff --git a/src/flash/nor/ocl.c b/src/flash/nor/ocl.c
index 6e3ad1c..961537e 100644
--- a/src/flash/nor/ocl.c
+++ b/src/flash/nor/ocl.c
@@ -21,8 +21,8 @@
#include "config.h"
#endif
+#include "imp.h"
#include "ocl.h"
-#include <flash/flash.h>
#include <target/embeddedice.h>
diff --git a/src/flash/nor/pic32mx.c b/src/flash/nor/pic32mx.c
index d2289b2..7d98af3 100644
--- a/src/flash/nor/pic32mx.c
+++ b/src/flash/nor/pic32mx.c
@@ -27,6 +27,7 @@
#include "config.h"
#endif
+#include "imp.h"
#include "pic32mx.h"
#include <target/mips32.h>
diff --git a/src/flash/nor/stellaris.c b/src/flash/nor/stellaris.c
index f0028ea..3988542 100644
--- a/src/flash/nor/stellaris.c
+++ b/src/flash/nor/stellaris.c
@@ -28,10 +28,11 @@
#include "config.h"
#endif
+#include "imp.h"
#include "stellaris.h"
-#include <target/armv7m.h>
#include <helper/binarybuffer.h>
#include <target/algorithm.h>
+#include <target/armv7m.h>
#define DID0_VER(did0) ((did0 >> 28)&0x07)
diff --git a/src/flash/nor/stm32x.c b/src/flash/nor/stm32x.c
index 3792547..9e761f9 100644
--- a/src/flash/nor/stm32x.c
+++ b/src/flash/nor/stm32x.c
@@ -24,10 +24,11 @@
#include "config.h"
#endif
+#include "imp.h"
#include "stm32x.h"
-#include <target/armv7m.h>
#include <helper/binarybuffer.h>
#include <target/algorithm.h>
+#include <target/armv7m.h>
static int stm32x_mass_erase(struct flash_bank *bank);
diff --git a/src/flash/nor/str7x.c b/src/flash/nor/str7x.c
index c5a1c34..4f93ec9 100644
--- a/src/flash/nor/str7x.c
+++ b/src/flash/nor/str7x.c
@@ -24,6 +24,7 @@
#include "config.h"
#endif
+#include "imp.h"
#include "str7x.h"
#include <target/armv4_5.h>
#include <helper/binarybuffer.h>
diff --git a/src/flash/nor/str9x.c b/src/flash/nor/str9x.c
index 045ab20..36096ff 100644
--- a/src/flash/nor/str9x.c
+++ b/src/flash/nor/str9x.c
@@ -27,6 +27,7 @@
#include "config.h"
#endif
+#include "imp.h"
#include "str9x.h"
#include <target/arm966e.h>
#include <target/algorithm.h>
diff --git a/src/flash/nor/str9xpec.c b/src/flash/nor/str9xpec.c
index 87a4b06..734f2d1 100644
--- a/src/flash/nor/str9xpec.c
+++ b/src/flash/nor/str9xpec.c
@@ -24,6 +24,7 @@
#include "config.h"
#endif
+#include "imp.h"
#include "str9xpec.h"
#include <target/arm7_9_common.h>
diff --git a/src/flash/nor/tms470.c b/src/flash/nor/tms470.c
index 5965934..7efcbd4 100644
--- a/src/flash/nor/tms470.c
+++ b/src/flash/nor/tms470.c
@@ -22,6 +22,7 @@
#endif
#include "tms470.h"
+#include "imp.h"
/* ----------------------------------------------------------------------
diff --git a/src/server/gdb_server.h b/src/server/gdb_server.h
index 0414975..05666a5 100644
--- a/src/server/gdb_server.h
+++ b/src/server/gdb_server.h
@@ -27,6 +27,7 @@
#define GDB_SERVER_H
struct image;
+#include <target/target.h>
#define GDB_BUFFER_SIZE 16384