From: Tom Rini Date: Wed, 22 Sep 2021 18:50:35 +0000 (-0400) Subject: nand.h: Cleanup linux/mtd/rawnand.h usage X-Git-Url: http://git.dujemihanovic.xyz/login.html?a=commitdiff_plain;h=1cefed1e39f0038ac6afd9e0c48b8b85fb458fbc;p=u-boot.git nand.h: Cleanup linux/mtd/rawnand.h usage We only include in for the forward declaration of struct nand_chip, so do that directly. Then, include where required directly. Signed-off-by: Tom Rini --- diff --git a/arch/arm/include/asm/ti-common/davinci_nand.h b/arch/arm/include/asm/ti-common/davinci_nand.h index ffaac6840b..a4cc27e920 100644 --- a/arch/arm/include/asm/ti-common/davinci_nand.h +++ b/arch/arm/include/asm/ti-common/davinci_nand.h @@ -9,7 +9,6 @@ #ifndef _DAVINCI_NAND_H_ #define _DAVINCI_NAND_H_ -#include #include #define NAND_READ_START 0x00 diff --git a/arch/arm/mach-imx/cmd_nandbcb.c b/arch/arm/mach-imx/cmd_nandbcb.c index cd51344597..09622c13c9 100644 --- a/arch/arm/mach-imx/cmd_nandbcb.c +++ b/arch/arm/mach-imx/cmd_nandbcb.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include diff --git a/board/cssi/MCR3000/nand.c b/board/cssi/MCR3000/nand.c index 15a10bffad..11aca4ff73 100644 --- a/board/cssi/MCR3000/nand.c +++ b/board/cssi/MCR3000/nand.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #define BIT_CLE ((unsigned short)0x0800) diff --git a/board/freescale/m5329evb/nand.c b/board/freescale/m5329evb/nand.c index 58b8ee51d3..a10c365ec3 100644 --- a/board/freescale/m5329evb/nand.c +++ b/board/freescale/m5329evb/nand.c @@ -15,6 +15,7 @@ #if defined(CONFIG_CMD_NAND) #include #include +#include #define SET_CLE 0x10 #define SET_ALE 0x08 diff --git a/board/freescale/m5373evb/nand.c b/board/freescale/m5373evb/nand.c index 4c30d51001..fdf3e0ac1b 100644 --- a/board/freescale/m5373evb/nand.c +++ b/board/freescale/m5373evb/nand.c @@ -15,6 +15,7 @@ #if defined(CONFIG_CMD_NAND) #include #include +#include #define SET_CLE 0x10 #define SET_ALE 0x08 diff --git a/board/socrates/nand.c b/board/socrates/nand.c index 07c493679b..9b7ffee83a 100644 --- a/board/socrates/nand.c +++ b/board/socrates/nand.c @@ -9,6 +9,7 @@ #if defined(CONFIG_SYS_NAND_BASE) #include #include +#include #include static int state; diff --git a/board/xes/common/actl_nand.c b/board/xes/common/actl_nand.c index 4e52838c90..2d8a57576a 100644 --- a/board/xes/common/actl_nand.c +++ b/board/xes/common/actl_nand.c @@ -8,6 +8,7 @@ #include #include +#include #include /* diff --git a/cmd/nand.c b/cmd/nand.c index d381053c6a..df5a4b1db1 100644 --- a/cmd/nand.c +++ b/cmd/nand.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/mtd/nand/raw/am335x_spl_bch.c b/drivers/mtd/nand/raw/am335x_spl_bch.c index b6fc5f29c7..83590a63cc 100644 --- a/drivers/mtd/nand/raw/am335x_spl_bch.c +++ b/drivers/mtd/nand/raw/am335x_spl_bch.c @@ -14,6 +14,7 @@ #include #include #include +#include static int nand_ecc_pos[] = CONFIG_SYS_NAND_ECCPOS; static struct mtd_info *mtd; diff --git a/drivers/mtd/nand/raw/atmel_nand.c b/drivers/mtd/nand/raw/atmel_nand.c index 6541c3bea8..06bf5ac18f 100644 --- a/drivers/mtd/nand/raw/atmel_nand.c +++ b/drivers/mtd/nand/raw/atmel_nand.c @@ -24,6 +24,7 @@ #include #include #include +#include #ifdef CONFIG_ATMEL_NAND_HWECC diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c index 99a1c2e6e2..f8434ca88d 100644 --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include diff --git a/drivers/mtd/nand/raw/cortina_nand.c b/drivers/mtd/nand/raw/cortina_nand.c index 81fa8788a4..c5e97da5e0 100644 --- a/drivers/mtd/nand/raw/cortina_nand.c +++ b/drivers/mtd/nand/raw/cortina_nand.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c index e4860561f8..ef7ee395c0 100644 --- a/drivers/mtd/nand/raw/davinci_nand.c +++ b/drivers/mtd/nand/raw/davinci_nand.c @@ -30,6 +30,7 @@ #include #include +#include #include #include #include diff --git a/drivers/mtd/nand/raw/fsl_elbc_spl.c b/drivers/mtd/nand/raw/fsl_elbc_spl.c index a62ab69ee1..e55b40f8f1 100644 --- a/drivers/mtd/nand/raw/fsl_elbc_spl.c +++ b/drivers/mtd/nand/raw/fsl_elbc_spl.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/drivers/mtd/nand/raw/fsl_upm.c b/drivers/mtd/nand/raw/fsl_upm.c index 6c86a7e767..91cc133953 100644 --- a/drivers/mtd/nand/raw/fsl_upm.c +++ b/drivers/mtd/nand/raw/fsl_upm.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include diff --git a/drivers/mtd/nand/raw/fsmc_nand.c b/drivers/mtd/nand/raw/fsmc_nand.c index 1c24710b2d..5d197ce0c5 100644 --- a/drivers/mtd/nand/raw/fsmc_nand.c +++ b/drivers/mtd/nand/raw/fsmc_nand.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include diff --git a/drivers/mtd/nand/raw/kb9202_nand.c b/drivers/mtd/nand/raw/kb9202_nand.c index 0f68f1cd86..9d26532c78 100644 --- a/drivers/mtd/nand/raw/kb9202_nand.c +++ b/drivers/mtd/nand/raw/kb9202_nand.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/drivers/mtd/nand/raw/kirkwood_nand.c b/drivers/mtd/nand/raw/kirkwood_nand.c index 0757fa840b..621d2d232c 100644 --- a/drivers/mtd/nand/raw/kirkwood_nand.c +++ b/drivers/mtd/nand/raw/kirkwood_nand.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/drivers/mtd/nand/raw/kmeter1_nand.c b/drivers/mtd/nand/raw/kmeter1_nand.c index cf33f2863e..b838164bf2 100644 --- a/drivers/mtd/nand/raw/kmeter1_nand.c +++ b/drivers/mtd/nand/raw/kmeter1_nand.c @@ -8,6 +8,7 @@ #include #include #include +#include #define CONFIG_NAND_MODE_REG (void *)(CONFIG_SYS_NAND_BASE + 0x20000) #define CONFIG_NAND_DATA_REG (void *)(CONFIG_SYS_NAND_BASE + 0x30000) diff --git a/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c b/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c index b3232ed59d..5bc5301d63 100644 --- a/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c +++ b/drivers/mtd/nand/raw/lpc32xx_nand_mlc.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/mtd/nand/raw/lpc32xx_nand_slc.c b/drivers/mtd/nand/raw/lpc32xx_nand_slc.c index 9cca3c55cc..3d6cb1dc63 100644 --- a/drivers/mtd/nand/raw/lpc32xx_nand_slc.c +++ b/drivers/mtd/nand/raw/lpc32xx_nand_slc.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/mtd/nand/raw/mxc_nand.c b/drivers/mtd/nand/raw/mxc_nand.c index c38f286e61..2b8a132a5f 100644 --- a/drivers/mtd/nand/raw/mxc_nand.c +++ b/drivers/mtd/nand/raw/mxc_nand.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #if defined(CONFIG_MX27) || \ defined(CONFIG_MX51) || defined(CONFIG_MX53) diff --git a/drivers/mtd/nand/raw/mxc_nand_spl.c b/drivers/mtd/nand/raw/mxc_nand_spl.c index 2f054b60ed..0fea307ea4 100644 --- a/drivers/mtd/nand/raw/mxc_nand_spl.c +++ b/drivers/mtd/nand/raw/mxc_nand_spl.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include "mxc_nand.h" diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c b/drivers/mtd/nand/raw/mxs_nand_spl.c index d16224a2e0..6b70d68fe7 100644 --- a/drivers/mtd/nand/raw/mxs_nand_spl.c +++ b/drivers/mtd/nand/raw/mxs_nand_spl.c @@ -13,6 +13,7 @@ #include #include #include +#include static struct mtd_info *mtd; static struct nand_chip nand_chip; diff --git a/drivers/mtd/nand/raw/nand.c b/drivers/mtd/nand/raw/nand.c index 026419e4e6..59ad1392b0 100644 --- a/drivers/mtd/nand/raw/nand.c +++ b/drivers/mtd/nand/raw/nand.c @@ -9,6 +9,7 @@ #include #include #include +#include #ifndef CONFIG_SYS_NAND_BASE_LIST #define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE } diff --git a/drivers/mtd/nand/raw/nand_plat.c b/drivers/mtd/nand/raw/nand_plat.c index 335c3e3471..81e7aa218d 100644 --- a/drivers/mtd/nand/raw/nand_plat.c +++ b/drivers/mtd/nand/raw/nand_plat.c @@ -15,6 +15,7 @@ */ #include +#include #include #ifdef NAND_PLAT_GPIO_DEV_READY # include diff --git a/drivers/mtd/nand/raw/nand_spl_simple.c b/drivers/mtd/nand/raw/nand_spl_simple.c index ede7dbf15b..727861c8f7 100644 --- a/drivers/mtd/nand/raw/nand_spl_simple.c +++ b/drivers/mtd/nand/raw/nand_spl_simple.c @@ -8,6 +8,7 @@ #include #include #include +#include static int nand_ecc_pos[] = CONFIG_SYS_NAND_ECCPOS; static struct mtd_info *mtd; diff --git a/drivers/mtd/nand/raw/nand_util.c b/drivers/mtd/nand/raw/nand_util.c index d03b8645c4..5409c9f322 100644 --- a/drivers/mtd/nand/raw/nand_util.c +++ b/drivers/mtd/nand/raw/nand_util.c @@ -30,6 +30,7 @@ #include #include +#include #include #include diff --git a/drivers/mtd/nand/raw/octeontx_nand.c b/drivers/mtd/nand/raw/octeontx_nand.c index e0ccc7b0d9..75476c098f 100644 --- a/drivers/mtd/nand/raw/octeontx_nand.c +++ b/drivers/mtd/nand/raw/octeontx_nand.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/mtd/nand/raw/omap_gpmc.c b/drivers/mtd/nand/raw/omap_gpmc.c index 97fd5690f5..530574898c 100644 --- a/drivers/mtd/nand/raw/omap_gpmc.c +++ b/drivers/mtd/nand/raw/omap_gpmc.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/mtd/nand/raw/rockchip_nfc.c b/drivers/mtd/nand/raw/rockchip_nfc.c index 21776f3b14..d016d25575 100644 --- a/drivers/mtd/nand/raw/rockchip_nfc.c +++ b/drivers/mtd/nand/raw/rockchip_nfc.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c index e17f1f8975..eee65949d7 100644 --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c @@ -19,6 +19,7 @@ #include #include #include +#include /* Bad block marker length */ #define FMC2_BBM_LEN 2 diff --git a/drivers/mtd/nand/raw/sunxi_nand_spl.c b/drivers/mtd/nand/raw/sunxi_nand_spl.c index 85d8013b1a..a29a76c58d 100644 --- a/drivers/mtd/nand/raw/sunxi_nand_spl.c +++ b/drivers/mtd/nand/raw/sunxi_nand_spl.c @@ -12,6 +12,7 @@ #include #include #include +#include /* registers */ #define NFC_CTL 0x00000000 diff --git a/drivers/mtd/nand/raw/tegra_nand.c b/drivers/mtd/nand/raw/tegra_nand.c index 6310253efa..8e70c8e73b 100644 --- a/drivers/mtd/nand/raw/tegra_nand.c +++ b/drivers/mtd/nand/raw/tegra_nand.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/yaffs2/yaffs_uboot_glue.c b/fs/yaffs2/yaffs_uboot_glue.c index 7a15a02974..ec8d028316 100644 --- a/fs/yaffs2/yaffs_uboot_glue.c +++ b/fs/yaffs2/yaffs_uboot_glue.c @@ -35,6 +35,7 @@ #else #include "malloc.h" #endif +#include unsigned yaffs_trace_mask = 0x0; /* Disable logging */ static int yaffs_errno; diff --git a/include/mxs_nand.h b/include/mxs_nand.h index c0cefaca90..66c909318d 100644 --- a/include/mxs_nand.h +++ b/include/mxs_nand.h @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/include/nand.h b/include/nand.h index 80dd6469bc..75c605193a 100644 --- a/include/nand.h +++ b/include/nand.h @@ -31,7 +31,6 @@ unsigned long nand_size(void); #include #include -#include int nand_mtd_to_devnum(struct mtd_info *mtd); @@ -39,6 +38,8 @@ int nand_mtd_to_devnum(struct mtd_info *mtd); void board_nand_init(void); int nand_register(int devnum, struct mtd_info *mtd); #else +struct nand_chip; + extern int board_nand_init(struct nand_chip *nand); #endif