From d9dc604a4d790f557a7ba502babdabffa27eaa17 Mon Sep 17 00:00:00 2001 From: Zachary T Welch Date: Fri, 4 Dec 2009 14:06:20 -0800 Subject: [PATCH 1/1] 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. --- src/flash/flash.h | 1 - src/flash/nor/aduc702x.c | 4 ++-- src/flash/nor/at91sam3.c | 8 ++------ src/flash/nor/at91sam7.c | 1 + src/flash/nor/avrf.c | 2 +- src/flash/nor/cfi.c | 1 + src/flash/nor/ecos.c | 4 ++-- src/flash/nor/faux.c | 2 +- src/flash/nor/imp.h | 4 ++++ src/flash/nor/lpc2000.c | 3 ++- src/flash/nor/lpc288x.c | 1 + src/flash/nor/lpc2900.c | 6 +++--- src/flash/nor/ocl.c | 2 +- src/flash/nor/pic32mx.c | 1 + src/flash/nor/stellaris.c | 3 ++- src/flash/nor/stm32x.c | 3 ++- src/flash/nor/str7x.c | 1 + src/flash/nor/str9x.c | 1 + src/flash/nor/str9xpec.c | 1 + src/flash/nor/tms470.c | 1 + src/server/gdb_server.h | 1 + 21 files changed, 31 insertions(+), 20 deletions(-) diff --git a/src/flash/flash.h b/src/flash/flash.h index 1e1be85ec2..8cd50f6825 100644 --- a/src/flash/flash.h +++ b/src/flash/flash.h @@ -27,7 +27,6 @@ #define FLASH_H #include -#include struct image; diff --git a/src/flash/nor/aduc702x.c b/src/flash/nor/aduc702x.c index 66969127b3..1b9f5c0835 100644 --- a/src/flash/nor/aduc702x.c +++ b/src/flash/nor/aduc702x.c @@ -23,11 +23,11 @@ #include "config.h" #endif -#include -#include +#include "imp.h" #include #include #include +#include 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 dd4f3471cc..1194e25f1a 100644 --- a/src/flash/nor/at91sam3.c +++ b/src/flash/nor/at91sam3.c @@ -57,13 +57,9 @@ #endif -#include -#include -#include -#include -#include -#include +#include "imp.h" #include "at91sam3.h" +#include #include #define REG_NAME_WIDTH (12) diff --git a/src/flash/nor/at91sam7.c b/src/flash/nor/at91sam7.c index 3201737da9..97d6b568b0 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 diff --git a/src/flash/nor/avrf.c b/src/flash/nor/avrf.c index fbc92772bc..6c2d17fe5d 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 -#include /* AVR_JTAG_Instructions */ diff --git a/src/flash/nor/cfi.c b/src/flash/nor/cfi.c index 61b5d4cf91..c00d65f170 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 diff --git a/src/flash/nor/ecos.c b/src/flash/nor/ecos.c index 8f8f746ebe..799015ef61 100644 --- a/src/flash/nor/ecos.c +++ b/src/flash/nor/ecos.c @@ -21,10 +21,10 @@ #include "config.h" #endif -#include +#include "imp.h" #include -#include #include +#include #if 0 diff --git a/src/flash/nor/faux.c b/src/flash/nor/faux.c index c996522c58..948f305572 100644 --- a/src/flash/nor/faux.c +++ b/src/flash/nor/faux.c @@ -21,7 +21,7 @@ #include "config.h" #endif -#include +#include "imp.h" #include #include "hello.h" diff --git a/src/flash/nor/imp.h b/src/flash/nor/imp.h index ade7297a4f..84ef8715bb 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 +// almost all drivers will need this file +#include /** * 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 295e3e7f14..d824c37abe 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 #include #include +#include /* flash programming support for NXP LPC17xx and LPC2xxx devices diff --git a/src/flash/nor/lpc288x.c b/src/flash/nor/lpc288x.c index 252a8133f7..5cb36d07de 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 diff --git a/src/flash/nor/lpc2900.c b/src/flash/nor/lpc2900.c index dc466f8e2b..0b42d48c2f 100644 --- a/src/flash/nor/lpc2900.c +++ b/src/flash/nor/lpc2900.c @@ -23,11 +23,11 @@ #endif -#include -#include +#include "imp.h" #include -#include #include +#include +#include /* 1024 bytes */ diff --git a/src/flash/nor/ocl.c b/src/flash/nor/ocl.c index 6e3ad1c9a7..961537e088 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 #include diff --git a/src/flash/nor/pic32mx.c b/src/flash/nor/pic32mx.c index d2289b297f..7d98af3114 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 diff --git a/src/flash/nor/stellaris.c b/src/flash/nor/stellaris.c index f0028ea64b..3988542987 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 #include #include +#include #define DID0_VER(did0) ((did0 >> 28)&0x07) diff --git a/src/flash/nor/stm32x.c b/src/flash/nor/stm32x.c index 37925470f6..9e761f91ca 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 #include #include +#include static int stm32x_mass_erase(struct flash_bank *bank); diff --git a/src/flash/nor/str7x.c b/src/flash/nor/str7x.c index c5a1c345c8..4f93ec9a84 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 #include diff --git a/src/flash/nor/str9x.c b/src/flash/nor/str9x.c index 045ab20bbe..36096ff531 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 #include diff --git a/src/flash/nor/str9xpec.c b/src/flash/nor/str9xpec.c index 87a4b06252..734f2d1524 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 diff --git a/src/flash/nor/tms470.c b/src/flash/nor/tms470.c index 5965934697..7efcbd4b91 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 041497510c..05666a59bb 100644 --- a/src/server/gdb_server.h +++ b/src/server/gdb_server.h @@ -27,6 +27,7 @@ #define GDB_SERVER_H struct image; +#include #define GDB_BUFFER_SIZE 16384 -- 2.30.2