Skip to content

Commit

Permalink
nand.h: Cleanup linux/mtd/rawnand.h usage
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
trini committed Oct 6, 2021
1 parent c0ad62c commit 1cefed1
Show file tree
Hide file tree
Showing 37 changed files with 37 additions and 2 deletions.
1 change: 0 additions & 1 deletion arch/arm/include/asm/ti-common/davinci_nand.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-imx/cmd_nandbcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions board/cssi/MCR3000/nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions board/freescale/m5329evb/nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions board/freescale/m5373evb/nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions board/socrates/nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions board/xes/common/actl_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include <common.h>
#include <nand.h>
#include <linux/mtd/rawnand.h>
#include <asm/io.h>

/*
Expand Down
1 change: 1 addition & 0 deletions cmd/nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/am335x_spl_bch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/atmel_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/brcmnand/brcmnand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/cortina_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/davinci_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/fsl_elbc_spl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/fsl_upm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/fsmc_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/kb9202_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/kirkwood_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/kmeter1_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/lpc32xx_nand_mlc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/lpc32xx_nand_slc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/mxc_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/mxc_nand_spl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/mxs_nand_spl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/nand_plat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/nand_spl_simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/nand_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/octeontx_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/omap_gpmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/rockchip_nfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/stm32_fmc2_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/sunxi_nand_spl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/tegra_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions fs/yaffs2/yaffs_uboot_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions include/mxs_nand.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
3 changes: 2 additions & 1 deletion include/nand.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ 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);

#ifdef CONFIG_SYS_NAND_SELF_INIT
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

Expand Down

0 comments on commit 1cefed1

Please sign in to comment.