From d9dc604a4d790f557a7ba502babdabffa27eaa17 Mon Sep 17 00:00:00 2001 From: Zachary T Welch Date: Fri, 4 Dec 2009 14:06:20 -0800 Subject: 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 + 20 files changed, 30 insertions(+), 20 deletions(-) (limited to 'src/flash') diff --git a/src/flash/flash.h b/src/flash/flash.h index 1e1be85e..8cd50f68 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 66969127..1b9f5c08 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 dd4f3471..1194e25f 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 3201737d..97d6b568 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 fbc92772..6c2d17fe 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 61b5d4cf..c00d65f1 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 8f8f746e..799015ef 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 c996522c..948f3055 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 ade7297a..84ef8715 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 295e3e7f..d824c37a 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 252a8133..5cb36d07 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 dc466f8e..0b42d48c 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 6e3ad1c9..961537e0 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 d2289b29..7d98af31 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 f0028ea6..39885429 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 37925470..9e761f91 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 c5a1c345..4f93ec9a 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 045ab20b..36096ff5 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 87a4b062..734f2d15 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 59659346..7efcbd4b 100644 --- a/src/flash/nor/tms470.c +++ b/src/flash/nor/tms470.c @@ -22,6 +22,7 @@ #endif #include "tms470.h" +#include "imp.h" /* ---------------------------------------------------------------------- -- cgit v1.2.3