From 17ead040d402c6e1fe26ac5acc4773146c8a0918 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sat, 23 Jul 2022 13:05:03 -0400 Subject: Audit inclusion A large number of files include as it used to be how various SPI flash related functions were found, or for other reasons entirely. In order to migrate some further CONFIG symbols to Kconfig we need to not include flash.h in cases where we don't have a NOR flash of some sort enabled. Furthermore, in cases where we are in common code and it doesn't make sense to try and further refactor the code itself in to new files we need to guard this inclusion. Signed-off-by: Tom Rini --- board/atmel/at91sam9263ek/at91sam9263ek.c | 3 +-- board/buffalo/lsxl/lsxl.c | 1 - board/freescale/common/fsl_validate.c | 3 ++- board/gardena/smart-gateway-mt7688/board.c | 1 - board/logicpd/omap3som/omap3logic.c | 1 - board/siemens/taurus/taurus.c | 1 - board/socrates/socrates.c | 2 -- board/toradex/common/tdx-cfg-block.c | 2 ++ 8 files changed, 5 insertions(+), 9 deletions(-) (limited to 'board') diff --git a/board/atmel/at91sam9263ek/at91sam9263ek.c b/board/atmel/at91sam9263ek/at91sam9263ek.c index c3e1734..86b4050 100644 --- a/board/atmel/at91sam9263ek/at91sam9263ek.c +++ b/board/atmel/at91sam9263ek/at91sam9263ek.c @@ -7,7 +7,6 @@ #include #include -#include #include #include #include @@ -140,7 +139,7 @@ static void at91sam9263ek_lcd_hw_init(void) #include #ifdef CONFIG_MTD_NOR_FLASH -extern flash_info_t flash_info[]; +#include #endif void lcd_show_board_info(void) diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c index 738b6bc2..31d532b 100644 --- a/board/buffalo/lsxl/lsxl.c +++ b/board/buffalo/lsxl/lsxl.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/board/freescale/common/fsl_validate.c b/board/freescale/common/fsl_validate.c index f1a0b0c..f56e4e8 100644 --- a/board/freescale/common/fsl_validate.c +++ b/board/freescale/common/fsl_validate.c @@ -6,7 +6,6 @@ #include #include -#include #include #include #include @@ -79,6 +78,8 @@ static u32 check_ie(struct fsl_secboot_img_priv *img) * address */ #if defined(CONFIG_MPC85xx) +#include + int get_csf_base_addr(u32 *csf_addr, u32 *flash_base_addr) { struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c index aa833a0..0cfde91 100644 --- a/board/gardena/smart-gateway-mt7688/board.c +++ b/board/gardena/smart-gateway-mt7688/board.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/board/logicpd/omap3som/omap3logic.c b/board/logicpd/omap3som/omap3logic.c index 2379b52..559192e 100644 --- a/board/logicpd/omap3som/omap3logic.c +++ b/board/logicpd/omap3som/omap3logic.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c index dae064d..6c44afb 100644 --- a/board/siemens/taurus/taurus.c +++ b/board/siemens/taurus/taurus.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c index 27aad4e..f9e1bc6 100644 --- a/board/socrates/socrates.c +++ b/board/socrates/socrates.c @@ -30,8 +30,6 @@ DECLARE_GLOBAL_DATA_PTR; -extern flash_info_t flash_info[]; /* FLASH chips info */ - void local_bus_init (void); ulong flash_get_size (ulong base, int banknum); diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c index 7cf2dfa..22c67c6 100644 --- a/board/toradex/common/tdx-cfg-block.c +++ b/board/toradex/common/tdx-cfg-block.c @@ -14,7 +14,9 @@ #include #include #include +#ifdef CONFIG_TDX_CFG_BLOCK_IS_IN_NOR #include +#endif #include #include #include -- cgit v1.1