]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
nand.h: Cleanup linux/mtd/rawnand.h usage
authorTom Rini <trini@konsulko.com>
Wed, 22 Sep 2021 18:50:35 +0000 (14:50 -0400)
committerTom Rini <trini@konsulko.com>
Wed, 6 Oct 2021 13:16:23 +0000 (09:16 -0400)
We only include <linux/mtd/rawnand.h> in <nand.h> for the forward
declaration of struct nand_chip, so do that directly.  Then, include
<linux/mtd/rawnand.h> where required directly.

Signed-off-by: Tom Rini <trini@konsulko.com>
37 files changed:
arch/arm/include/asm/ti-common/davinci_nand.h
arch/arm/mach-imx/cmd_nandbcb.c
board/cssi/MCR3000/nand.c
board/freescale/m5329evb/nand.c
board/freescale/m5373evb/nand.c
board/socrates/nand.c
board/xes/common/actl_nand.c
cmd/nand.c
drivers/mtd/nand/raw/am335x_spl_bch.c
drivers/mtd/nand/raw/atmel_nand.c
drivers/mtd/nand/raw/brcmnand/brcmnand.c
drivers/mtd/nand/raw/cortina_nand.c
drivers/mtd/nand/raw/davinci_nand.c
drivers/mtd/nand/raw/fsl_elbc_spl.c
drivers/mtd/nand/raw/fsl_upm.c
drivers/mtd/nand/raw/fsmc_nand.c
drivers/mtd/nand/raw/kb9202_nand.c
drivers/mtd/nand/raw/kirkwood_nand.c
drivers/mtd/nand/raw/kmeter1_nand.c
drivers/mtd/nand/raw/lpc32xx_nand_mlc.c
drivers/mtd/nand/raw/lpc32xx_nand_slc.c
drivers/mtd/nand/raw/mxc_nand.c
drivers/mtd/nand/raw/mxc_nand_spl.c
drivers/mtd/nand/raw/mxs_nand_spl.c
drivers/mtd/nand/raw/nand.c
drivers/mtd/nand/raw/nand_plat.c
drivers/mtd/nand/raw/nand_spl_simple.c
drivers/mtd/nand/raw/nand_util.c
drivers/mtd/nand/raw/octeontx_nand.c
drivers/mtd/nand/raw/omap_gpmc.c
drivers/mtd/nand/raw/rockchip_nfc.c
drivers/mtd/nand/raw/stm32_fmc2_nand.c
drivers/mtd/nand/raw/sunxi_nand_spl.c
drivers/mtd/nand/raw/tegra_nand.c
fs/yaffs2/yaffs_uboot_glue.c
include/mxs_nand.h
include/nand.h

index ffaac6840ba774e8b55130e326d765626c7c5eeb..a4cc27e920d838b9ce90f55c7b82ae859125178d 100644 (file)
@@ -9,7 +9,6 @@
 #ifndef _DAVINCI_NAND_H_
 #define _DAVINCI_NAND_H_
 
-#include <linux/mtd/rawnand.h>
 #include <asm/arch/hardware.h>
 
 #define NAND_READ_START                0x00
index cd513445978740de31663daef6567f9617be54d2..09622c13c9808410c987d316a2fa209066a38083 100644 (file)
@@ -23,6 +23,7 @@
 #include <jffs2/jffs2.h>
 #include <linux/bch.h>
 #include <linux/mtd/mtd.h>
+#include <linux/mtd/rawnand.h>
 
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/imx-nandbcb.h>
index 15a10bffadc1a0c44dc3325b06e91cafe6ab5074..11aca4ff73638db5102f50129a81e0f4cbcf0269 100644 (file)
@@ -8,6 +8,7 @@
 #include <config.h>
 #include <common.h>
 #include <nand.h>
+#include <linux/mtd/rawnand.h>
 #include <asm/io.h>
 
 #define BIT_CLE                        ((unsigned short)0x0800)
index 58b8ee51d37802f8bd40fdb5a44ca4cd2e5ef8a3..a10c365ec3788fd2ab9caaa46d3af73f6ef68868 100644 (file)
@@ -15,6 +15,7 @@
 #if defined(CONFIG_CMD_NAND)
 #include <nand.h>
 #include <linux/mtd/mtd.h>
+#include <linux/mtd/rawnand.h>
 
 #define SET_CLE                0x10
 #define SET_ALE                0x08
index 4c30d5100181339984f155c50ca4744bb80b4e99..fdf3e0ac1b1bdb23f0f67bf495d6ec9a9c7ac405 100644 (file)
@@ -15,6 +15,7 @@
 #if defined(CONFIG_CMD_NAND)
 #include <nand.h>
 #include <linux/mtd/mtd.h>
+#include <linux/mtd/rawnand.h>
 
 #define SET_CLE                0x10
 #define SET_ALE                0x08
index 07c493679bf021840fbd325f213110551f78b3d9..9b7ffee83a4195d183435e897c7d265edd962f85 100644 (file)
@@ -9,6 +9,7 @@
 #if defined(CONFIG_SYS_NAND_BASE)
 #include <nand.h>
 #include <linux/errno.h>
+#include <linux/mtd/rawnand.h>
 #include <asm/io.h>
 
 static int state;
index 4e52838c90951fe5946b9068244868baf6e7609a..2d8a57576a6c673a78fcdb0e3477ee0e49ec95b4 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <nand.h>
+#include <linux/mtd/rawnand.h>
 #include <asm/io.h>
 
 /*
index d381053c6ac6132fd5d050226af19399e3340e91..df5a4b1db1a037cd40698840e234bc1434666857 100644 (file)
@@ -24,6 +24,7 @@
 #include <image.h>
 #include <asm/cache.h>
 #include <linux/mtd/mtd.h>
+#include <linux/mtd/rawnand.h>
 #include <command.h>
 #include <console.h>
 #include <env.h>
index b6fc5f29c7a8a140413029c2205da9b78b5c72a4..83590a63ccafd4a82e4b7817cc2a81e3504a1b61 100644 (file)
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <linux/delay.h>
 #include <linux/mtd/nand_ecc.h>
+#include <linux/mtd/rawnand.h>
 
 static int nand_ecc_pos[] = CONFIG_SYS_NAND_ECCPOS;
 static struct mtd_info *mtd;
index 6541c3bea85110bb4b54811670b8d7707a8ff112..06bf5ac18ffcdfb5321e1f8737ea3de194701f3f 100644 (file)
@@ -24,6 +24,7 @@
 #include <nand.h>
 #include <watchdog.h>
 #include <linux/mtd/nand_ecc.h>
+#include <linux/mtd/rawnand.h>
 
 #ifdef CONFIG_ATMEL_NAND_HWECC
 
index 99a1c2e6e2e8b39d8c100c526ee1d718014b7f2e..f8434ca88db0bf33d97f4020826feff12be3dafb 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/completion.h>
 #include <linux/errno.h>
 #include <linux/log2.h>
+#include <linux/mtd/rawnand.h>
 #include <asm/processor.h>
 #include <dm.h>
 
index 81fa8788a498dbf976d44942ccd971ba59238359..c5e97da5e05f983cd8f9951ab60c59ba388cf9ff 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/delay.h>
 #include <linux/iopoll.h>
 #include <linux/errno.h>
+#include <linux/mtd/rawnand.h>
 #include <asm/gpio.h>
 #include <fdtdec.h>
 #include <bouncebuf.h>
index e4860561f8eb1c115b150a76800621b45e15e4ab..ef7ee395c0ca38d9be747ef57ec3af316e576327 100644 (file)
@@ -30,6 +30,7 @@
 
 #include <common.h>
 #include <log.h>
+#include <linux/mtd/rawnand.h>
 #include <asm/io.h>
 #include <nand.h>
 #include <dm/uclass.h>
index a62ab69ee1e0858b797536e3e0f61966892b806e..e55b40f8f13c9d7cd4f12a18e70ba230a423988e 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <linux/mtd/rawnand.h>
 #include <asm/io.h>
 #include <asm/fsl_lbc.h>
 #include <nand.h>
index 6c86a7e76712a80c08c77f2d36652d1787b0e800..91cc133953725c1b414e1df11e1ec058069d8488 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/mtd/mtd.h>
+#include <linux/mtd/rawnand.h>
 #include <linux/mtd/fsl_upm.h>
 #include <nand.h>
 
index 1c24710b2db6b298391ed33267aa2fc6728a0fb3..5d197ce0c51c1cadefa27ba5b764df10ef9ee4df 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/bitops.h>
 #include <linux/err.h>
 #include <linux/mtd/nand_ecc.h>
+#include <linux/mtd/rawnand.h>
 #include <linux/mtd/fsmc_nand.h>
 #include <asm/arch/hardware.h>
 
index 0f68f1cd867ccdfa6af75a51654f3272726d89aa..9d26532c780714f967dfe2bf149ef877598b0c74 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <linux/mtd/rawnand.h>
 #include <asm/io.h>
 #include <asm/arch/AT91RM9200.h>
 #include <asm/arch/hardware.h>
index 0757fa840b880c38a3477f6a1e8f01639f19344b..621d2d232c88907a452540c8d7142c1a6897ed04 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <linux/mtd/rawnand.h>
 #include <asm/io.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
index cf33f2863e1b437c54cec11b7511d24f01714e3e..b838164bf2e4c7bbcaef97b20858c73177255e26 100644 (file)
@@ -8,6 +8,7 @@
 #include <nand.h>
 #include <asm/io.h>
 #include <linux/delay.h>
+#include <linux/mtd/rawnand.h>
 
 #define CONFIG_NAND_MODE_REG   (void *)(CONFIG_SYS_NAND_BASE + 0x20000)
 #define CONFIG_NAND_DATA_REG   (void *)(CONFIG_SYS_NAND_BASE + 0x30000)
index b3232ed59d533b8fc6dffacdca82a009c329fb49..5bc5301d63497d387166f92162a0b660bbe440b7 100644 (file)
@@ -23,6 +23,7 @@
 #include <nand.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/mtd/rawnand.h>
 #include <asm/io.h>
 #include <nand.h>
 #include <asm/arch/clk.h>
index 9cca3c55cc0944a7e84ae936b287947b0aa2e38a..3d6cb1dc6350838bfe80931b2a83a344a01b8110 100644 (file)
@@ -15,6 +15,7 @@
 #include <nand.h>
 #include <linux/bug.h>
 #include <linux/mtd/nand_ecc.h>
+#include <linux/mtd/rawnand.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/arch/config.h>
index c38f286e61d5457c1fc7f372e8b4feff365b0dce..2b8a132a5fcb8e00932ac44ae2789495b9c24fc1 100644 (file)
@@ -10,6 +10,7 @@
 #include <nand.h>
 #include <linux/delay.h>
 #include <linux/err.h>
+#include <linux/mtd/rawnand.h>
 #include <asm/io.h>
 #if defined(CONFIG_MX27) || \
        defined(CONFIG_MX51) || defined(CONFIG_MX53)
index 2f054b60ed72db9de7c5b9f63ff6d1877b72ab92..0fea307ea461bcc07ede1a3ba718143d8a98a131 100644 (file)
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <hang.h>
 #include <nand.h>
+#include <linux/mtd/rawnand.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/io.h>
 #include "mxc_nand.h"
index d16224a2e088a0728415071cad9a38d2595266dc..6b70d68fe7ba5a0e2f8cf1cd1c99ea6ec325593e 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/err.h>
+#include <linux/mtd/rawnand.h>
 
 static struct mtd_info *mtd;
 static struct nand_chip nand_chip;
index 026419e4e6464a9734efa7e98ee44a48f2556eb7..59ad1392b0e602789bc908659c557a63ca8544b7 100644 (file)
@@ -9,6 +9,7 @@
 #include <nand.h>
 #include <errno.h>
 #include <linux/mtd/concat.h>
+#include <linux/mtd/rawnand.h>
 
 #ifndef CONFIG_SYS_NAND_BASE_LIST
 #define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
index 335c3e34714cf4bf1d7655dd828846786a3f3db6..81e7aa218d54491b17dc3e18e2d392b342348703 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 #include <common.h>
+#include <linux/mtd/rawnand.h>
 #include <asm/io.h>
 #ifdef NAND_PLAT_GPIO_DEV_READY
 # include <asm/gpio.h>
index ede7dbf15b9032f797c90b0f555cb331573de9c8..727861c8f7ee78d1c633cc9710bef37dc3da0f10 100644 (file)
@@ -8,6 +8,7 @@
 #include <nand.h>
 #include <asm/io.h>
 #include <linux/mtd/nand_ecc.h>
+#include <linux/mtd/rawnand.h>
 
 static int nand_ecc_pos[] = CONFIG_SYS_NAND_ECCPOS;
 static struct mtd_info *mtd;
index d03b8645c4463c075e1922fa4f328658ae500b79..5409c9f32243f3c62f97257223af8b41f61716db 100644 (file)
@@ -30,6 +30,7 @@
 
 #include <linux/errno.h>
 #include <linux/mtd/mtd.h>
+#include <linux/mtd/rawnand.h>
 #include <nand.h>
 #include <jffs2/jffs2.h>
 
index e0ccc7b0d90dbab6b673fd6ce0352d76207a0b8a..75476c098fe9aad1020efd9d7f4774eecc2763d3 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/nand_bch.h>
 #include <linux/mtd/nand_ecc.h>
+#include <linux/mtd/rawnand.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <asm/types.h>
index 97fd5690f518237de6c9fdae8741e8345b025906..530574898ce690a11abe03c5df89325ae1dcce1d 100644 (file)
@@ -11,6 +11,7 @@
 #include <asm/arch/mem.h>
 #include <linux/mtd/omap_gpmc.h>
 #include <linux/mtd/nand_ecc.h>
+#include <linux/mtd/rawnand.h>
 #include <linux/bch.h>
 #include <linux/compiler.h>
 #include <nand.h>
index 21776f3b14ce8ec0fd40d5e169425fb5725bd869..d016d255753140fec521ab9ba65e3e9134235d73 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
+#include <linux/mtd/rawnand.h>
 #include <memalign.h>
 #include <nand.h>
 
index e17f1f8975ef1c5543040e61fd5946399dc66fe5..eee65949d775487bf05ee7a0e065635eb11ae398 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/err.h>
 #include <linux/iopoll.h>
 #include <linux/ioport.h>
+#include <linux/mtd/rawnand.h>
 
 /* Bad block marker length */
 #define FMC2_BBM_LEN                   2
index 85d8013b1a6b6279747a5c4639016d31fec02a82..a29a76c58d3a2fdc7829886a9060eb58ed4c28c7 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/bitops.h>
 #include <linux/ctype.h>
 #include <linux/delay.h>
+#include <linux/mtd/rawnand.h>
 
 /* registers */
 #define NFC_CTL                    0x00000000
index 6310253efa6aa7a75fb7195aa1918c2e60ab8031..8e70c8e73b63943b482ac8c8d696b2917157a2dc 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/bug.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
+#include <linux/mtd/rawnand.h>
 #include <asm/gpio.h>
 #include <fdtdec.h>
 #include <bouncebuf.h>
index 7a15a02974d07c6b2aee58eb767cda7ca5bfd3ef..ec8d028316a0d91d3961cd3687eb34a41760f0d9 100644 (file)
@@ -35,6 +35,7 @@
 #else
 #include "malloc.h"
 #endif
+#include <linux/mtd/rawnand.h>
 
 unsigned yaffs_trace_mask = 0x0; /* Disable logging */
 static int yaffs_errno;
index c0cefaca90b6e1e8ad425332b08de7c71d7a36af..66c909318d1fe114bb391b05cd3690d90f9bbe8c 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <linux/mtd/mtd.h>
+#include <linux/mtd/rawnand.h>
 #include <asm/cache.h>
 #include <nand.h>
 #include <asm/mach-imx/dma.h>
index 80dd6469bc0547bca97ed52969d49b9f2124fea0..75c605193ab140d8943e69a11eef0d9607d23f1a 100644 (file)
@@ -31,7 +31,6 @@ unsigned long nand_size(void);
 
 #include <linux/compat.h>
 #include <linux/mtd/mtd.h>
-#include <linux/mtd/rawnand.h>
 
 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