From: zwelch Date: Mon, 11 May 2009 04:28:24 +0000 (+0000) Subject: Audit and eliminate redundant #include directives in src/flash headers. X-Git-Tag: v0.2.0~795 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0643263d68bcddc56eaa7e3678b7502798410711;p=openocd Audit and eliminate redundant #include directives in src/flash headers. git-svn-id: svn://svn.berlios.de/openocd/trunk@1711 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- diff --git a/src/flash/at91sam7.h b/src/flash/at91sam7.h index f57f36ec..5e652bf0 100644 --- a/src/flash/at91sam7.h +++ b/src/flash/at91sam7.h @@ -24,7 +24,6 @@ #define AT91SAM7_H #include "flash.h" -#include "target.h" typedef struct at91sam7_flash_bank_s { diff --git a/src/flash/avrf.h b/src/flash/avrf.h index 6c5868c4..12ef8bdb 100644 --- a/src/flash/avrf.h +++ b/src/flash/avrf.h @@ -20,6 +20,8 @@ #ifndef AVRF_H #define AVRF_H +#include "types.h" + typedef struct avrf_type_s { char name[15]; diff --git a/src/flash/cfi.h b/src/flash/cfi.h index dc43dd18..49fbad49 100644 --- a/src/flash/cfi.h +++ b/src/flash/cfi.h @@ -21,7 +21,6 @@ #define CFI_H #include "flash.h" -#include "target.h" #define CFI_STATUS_POLL_MASK_DQ5_DQ6_DQ7 0xE0 /* DQ5..DQ7 */ #define CFI_STATUS_POLL_MASK_DQ6_DQ7 0xC0 /* DQ6..DQ7 */ diff --git a/src/flash/flash.h b/src/flash/flash.h index 817c6062..1a98286c 100644 --- a/src/flash/flash.h +++ b/src/flash/flash.h @@ -27,7 +27,9 @@ #define FLASH_H #include "target.h" -#include "image.h" +#include "log.h" + +struct image_s; #define FLASH_MAX_ERROR_STR (128) @@ -65,7 +67,7 @@ typedef struct flash_driver_s typedef struct flash_bank_s { - target_t *target; + struct target_s *target; flash_driver_t *driver; void *driver_priv; int bank_number; @@ -81,8 +83,8 @@ typedef struct flash_bank_s extern int flash_register_commands(struct command_context_s *cmd_ctx); extern int flash_init_drivers(struct command_context_s *cmd_ctx); -extern int flash_erase_address_range(target_t *target, u32 addr, u32 length); -extern int flash_write(target_t *target, image_t *image, u32 *written, int erase); +extern int flash_erase_address_range(struct target_s *target, u32 addr, u32 length); +extern int flash_write(struct target_s *target, struct image_s *image, u32 *written, int erase); extern void flash_set_dirty(void); extern int flash_get_bank_count(void); extern int default_flash_blank_check(struct flash_bank_s *bank); @@ -90,7 +92,7 @@ extern int default_flash_mem_blank_check(struct flash_bank_s *bank); extern flash_bank_t *get_flash_bank_by_num(int num); extern flash_bank_t *get_flash_bank_by_num_noprobe(int num); -extern flash_bank_t *get_flash_bank_by_addr(target_t *target, u32 addr); +extern flash_bank_t *get_flash_bank_by_addr(struct target_s *target, u32 addr); #define ERROR_FLASH_BANK_INVALID (-900) #define ERROR_FLASH_SECTOR_INVALID (-901) diff --git a/src/flash/lpc2000.h b/src/flash/lpc2000.h index c527588c..a047381f 100644 --- a/src/flash/lpc2000.h +++ b/src/flash/lpc2000.h @@ -21,7 +21,6 @@ #define LPC2000_H #include "flash.h" -#include "target.h" typedef struct lpc2000_flash_bank_s { diff --git a/src/flash/lpc288x.h b/src/flash/lpc288x.h index d9f99dd4..522d0eb4 100644 --- a/src/flash/lpc288x.h +++ b/src/flash/lpc288x.h @@ -22,7 +22,6 @@ #define lpc288x_H #include "flash.h" -#include "target.h" typedef struct lpc288x_flash_bank_s { diff --git a/src/flash/mflash.h b/src/flash/mflash.h index 4f9e0a00..e78f2486 100644 --- a/src/flash/mflash.h +++ b/src/flash/mflash.h @@ -20,6 +20,8 @@ #ifndef _MFLASH_H #define _MFLASH_H +#include "target.h" + typedef unsigned long mg_io_uint32; typedef unsigned short mg_io_uint16; typedef unsigned char mg_io_uint8; diff --git a/src/flash/non_cfi.h b/src/flash/non_cfi.h index e4b33d40..3950e21b 100644 --- a/src/flash/non_cfi.h +++ b/src/flash/non_cfi.h @@ -20,7 +20,7 @@ #ifndef NON_CFI_H #define NON_CFI_H -#include "types.h" +#include "flash.h" typedef struct non_cfi_s { diff --git a/src/flash/pic32mx.h b/src/flash/pic32mx.h index f799a467..da102c07 100644 --- a/src/flash/pic32mx.h +++ b/src/flash/pic32mx.h @@ -27,7 +27,6 @@ #define PIC32MX_H #include "flash.h" -#include "target.h" typedef struct pic32mx_flash_bank_s { diff --git a/src/flash/s3c24xx_nand.h b/src/flash/s3c24xx_nand.h index d77bafe5..8f96f2d2 100644 --- a/src/flash/s3c24xx_nand.h +++ b/src/flash/s3c24xx_nand.h @@ -24,7 +24,7 @@ * Many thanks to Simtec Electronics for sponsoring this work. */ -#include "target.h" +#include "nand.h" #include "s3c24xx_regs_nand.h" typedef struct s3c24xx_nand_controller_s diff --git a/src/flash/stellaris.h b/src/flash/stellaris.h index 2bf4aa6c..317309a6 100644 --- a/src/flash/stellaris.h +++ b/src/flash/stellaris.h @@ -21,7 +21,6 @@ #define STELLARIS_FLASH_H #include "flash.h" -#include "target.h" typedef struct stellaris_flash_bank_s { diff --git a/src/flash/stm32x.h b/src/flash/stm32x.h index 1357162c..587f97f7 100644 --- a/src/flash/stm32x.h +++ b/src/flash/stm32x.h @@ -24,7 +24,6 @@ #define STM32X_H #include "flash.h" -#include "target.h" typedef struct stm32x_options_s { diff --git a/src/flash/str7x.h b/src/flash/str7x.h index b602498c..5d0b1824 100644 --- a/src/flash/str7x.h +++ b/src/flash/str7x.h @@ -24,7 +24,6 @@ #define STR7X_H #include "flash.h" -#include "target.h" typedef struct str7x_flash_bank_s { diff --git a/src/flash/str9x.h b/src/flash/str9x.h index 5e36e48d..b5e569d0 100644 --- a/src/flash/str9x.h +++ b/src/flash/str9x.h @@ -24,7 +24,6 @@ #define STR9X_H #include "flash.h" -#include "target.h" typedef struct str9x_flash_bank_s { diff --git a/src/flash/str9xpec.h b/src/flash/str9xpec.h index 7796026f..250e251b 100644 --- a/src/flash/str9xpec.h +++ b/src/flash/str9xpec.h @@ -24,7 +24,6 @@ #define STR9XPEC_H #include "flash.h" -#include "target.h" #include "jtag.h" typedef struct str9xpec_flash_controller_s