diff options
Diffstat (limited to 'drivers/mtd/nand')
28 files changed, 47 insertions, 6 deletions
diff --git a/drivers/mtd/nand/bbt.c b/drivers/mtd/nand/bbt.c index f3d05e6757..133670cb19 100644 --- a/drivers/mtd/nand/bbt.c +++ b/drivers/mtd/nand/bbt.c @@ -10,6 +10,7 @@ #define pr_fmt(fmt) "nand-bbt: " fmt #include <common.h> +#include <dm/devres.h> #include <linux/mtd/nand.h> #ifndef __UBOOT__ #include <linux/slab.h> diff --git a/drivers/mtd/nand/core.c b/drivers/mtd/nand/core.c index 3abaef23c5..bc0accf8c6 100644 --- a/drivers/mtd/nand/core.c +++ b/drivers/mtd/nand/core.c @@ -11,6 +11,7 @@ #include <common.h> #ifndef __UBOOT__ +#include <linux/compat.h> #include <linux/module.h> #endif #include <linux/mtd/nand.h> diff --git a/drivers/mtd/nand/raw/atmel_nand.c b/drivers/mtd/nand/raw/atmel_nand.c index 31ad2cfa88..996d3dbb71 100644 --- a/drivers/mtd/nand/raw/atmel_nand.c +++ b/drivers/mtd/nand/raw/atmel_nand.c @@ -13,6 +13,8 @@ #include <common.h> #include <asm/gpio.h> #include <asm/arch/gpio.h> +#include <dm/device_compat.h> +#include <dm/devres.h> #include <malloc.h> #include <nand.h> diff --git a/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c index 16b0d4440a..ea7c65a1f6 100644 --- a/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c +++ b/drivers/mtd/nand/raw/brcmnand/bcm63158_nand.c @@ -4,6 +4,7 @@ #include <asm/io.h> #include <memalign.h> #include <nand.h> +#include <linux/err.h> #include <linux/errno.h> #include <linux/io.h> #include <linux/ioport.h> diff --git a/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c index ece944485c..3a136155dd 100644 --- a/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c +++ b/drivers/mtd/nand/raw/brcmnand/bcm6838_nand.c @@ -4,6 +4,7 @@ #include <asm/io.h> #include <memalign.h> #include <nand.h> +#include <linux/err.h> #include <linux/errno.h> #include <linux/io.h> #include <linux/ioport.h> diff --git a/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c index 3586baa4fa..6aca011db2 100644 --- a/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c +++ b/drivers/mtd/nand/raw/brcmnand/bcm6858_nand.c @@ -4,6 +4,7 @@ #include <asm/io.h> #include <memalign.h> #include <nand.h> +#include <linux/err.h> #include <linux/errno.h> #include <linux/io.h> #include <linux/ioport.h> diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c index 0745929253..5232328e1e 100644 --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c @@ -17,6 +17,9 @@ #include <memalign.h> #include <nand.h> #include <clk.h> +#include <dm/device_compat.h> +#include <dm/devres.h> +#include <linux/err.h> #include <linux/ioport.h> #include <linux/completion.h> #include <linux/errno.h> diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c b/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c index 883948355c..c58679834e 100644 --- a/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand_compat.c @@ -1,6 +1,8 @@ // SPDX-License-Identifier: GPL-2.0+ #include <common.h> +#include <malloc.h> +#include <dm/devres.h> #include "brcmnand_compat.h" static char *devm_kvasprintf(struct udevice *dev, gfp_t gfp, const char *fmt, diff --git a/drivers/mtd/nand/raw/denali.c b/drivers/mtd/nand/raw/denali.c index be1b3627ad..f51d3e25c7 100644 --- a/drivers/mtd/nand/raw/denali.c +++ b/drivers/mtd/nand/raw/denali.c @@ -7,9 +7,13 @@ #include <asm/dma-mapping.h> #include <dm.h> +#include <malloc.h> #include <nand.h> +#include <dm/device_compat.h> +#include <dm/devres.h> #include <linux/bitfield.h> #include <linux/dma-direction.h> +#include <linux/err.h> #include <linux/errno.h> #include <linux/io.h> #include <linux/mtd/mtd.h> @@ -1156,7 +1160,7 @@ static int denali_ooblayout_free(struct mtd_info *mtd, int section, static const struct mtd_ooblayout_ops denali_ooblayout_ops = { .ecc = denali_ooblayout_ecc, - .free = denali_ooblayout_free, + .rfree = denali_ooblayout_free, }; static int denali_multidev_fixup(struct denali_nand_info *denali) diff --git a/drivers/mtd/nand/raw/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c index 759ad40e51..41b93e660a 100644 --- a/drivers/mtd/nand/raw/denali_dt.c +++ b/drivers/mtd/nand/raw/denali_dt.c @@ -6,6 +6,7 @@ #include <clk.h> #include <dm.h> +#include <dm/device_compat.h> #include <linux/io.h> #include <linux/ioport.h> #include <linux/printk.h> diff --git a/drivers/mtd/nand/raw/fsl_elbc_nand.c b/drivers/mtd/nand/raw/fsl_elbc_nand.c index cbf689af63..0c1bd7b474 100644 --- a/drivers/mtd/nand/raw/fsl_elbc_nand.c +++ b/drivers/mtd/nand/raw/fsl_elbc_nand.c @@ -11,6 +11,7 @@ #include <command.h> #include <malloc.h> #include <nand.h> +#include <dm/devres.h> #include <linux/mtd/mtd.h> #include <linux/mtd/rawnand.h> diff --git a/drivers/mtd/nand/raw/fsl_ifc_nand.c b/drivers/mtd/nand/raw/fsl_ifc_nand.c index e2419e18a9..cf20238782 100644 --- a/drivers/mtd/nand/raw/fsl_ifc_nand.c +++ b/drivers/mtd/nand/raw/fsl_ifc_nand.c @@ -10,6 +10,7 @@ #include <command.h> #include <malloc.h> #include <nand.h> +#include <dm/devres.h> #include <linux/mtd/mtd.h> #include <linux/mtd/rawnand.h> diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c b/drivers/mtd/nand/raw/mxs_nand_spl.c index 975a91a37d..a653dfa5ed 100644 --- a/drivers/mtd/nand/raw/mxs_nand_spl.c +++ b/drivers/mtd/nand/raw/mxs_nand_spl.c @@ -7,6 +7,7 @@ #include <nand.h> #include <malloc.h> #include <mxs_nand.h> +#include <linux/err.h> static struct mtd_info *mtd; static struct nand_chip nand_chip; diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c index aba8ac019d..49d5e261b5 100644 --- a/drivers/mtd/nand/raw/nand_base.c +++ b/drivers/mtd/nand/raw/nand_base.c @@ -34,6 +34,7 @@ #endif #include <malloc.h> #include <watchdog.h> +#include <dm/devres.h> #include <linux/err.h> #include <linux/compat.h> #include <linux/mtd/mtd.h> diff --git a/drivers/mtd/nand/raw/nand_bbt.c b/drivers/mtd/nand/raw/nand_bbt.c index ba785c5d53..a6e6e0ef6d 100644 --- a/drivers/mtd/nand/raw/nand_bbt.c +++ b/drivers/mtd/nand/raw/nand_bbt.c @@ -59,6 +59,7 @@ #include <common.h> #include <malloc.h> +#include <dm/devres.h> #include <linux/compat.h> #include <linux/mtd/mtd.h> #include <linux/mtd/bbm.h> diff --git a/drivers/mtd/nand/raw/nand_bch.c b/drivers/mtd/nand/raw/nand_bch.c index afa0418168..11a22e021d 100644 --- a/drivers/mtd/nand/raw/nand_bch.c +++ b/drivers/mtd/nand/raw/nand_bch.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <dm/devres.h> /*#include <asm/io.h>*/ #include <linux/types.h> diff --git a/drivers/mtd/nand/raw/nand_timings.c b/drivers/mtd/nand/raw/nand_timings.c index c0545a4fb1..e6aa790391 100644 --- a/drivers/mtd/nand/raw/nand_timings.c +++ b/drivers/mtd/nand/raw/nand_timings.c @@ -9,6 +9,7 @@ * */ #include <common.h> +#include <linux/err.h> #include <linux/kernel.h> #include <linux/mtd/rawnand.h> diff --git a/drivers/mtd/nand/raw/nand_util.c b/drivers/mtd/nand/raw/nand_util.c index fc2235c1a0..f3c8f7f2cb 100644 --- a/drivers/mtd/nand/raw/nand_util.c +++ b/drivers/mtd/nand/raw/nand_util.c @@ -24,6 +24,7 @@ #include <malloc.h> #include <memalign.h> #include <div64.h> +#include <dm/devres.h> #include <linux/errno.h> #include <linux/mtd/mtd.h> diff --git a/drivers/mtd/nand/raw/pxa3xx_nand.c b/drivers/mtd/nand/raw/pxa3xx_nand.c index 4d2712df4c..03f210bdb0 100644 --- a/drivers/mtd/nand/raw/pxa3xx_nand.c +++ b/drivers/mtd/nand/raw/pxa3xx_nand.c @@ -10,6 +10,9 @@ #include <malloc.h> #include <fdtdec.h> #include <nand.h> +#include <dm/device_compat.h> +#include <dm/devres.h> +#include <linux/err.h> #include <linux/errno.h> #include <asm/io.h> #include <asm/arch/cpu.h> diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c index f3179cc21f..1c212daa1d 100644 --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c @@ -9,6 +9,7 @@ #include <dm.h> #include <nand.h> #include <reset.h> +#include <linux/err.h> #include <linux/iopoll.h> #include <linux/ioport.h> diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c index 3ccb168d13..9b99be10e6 100644 --- a/drivers/mtd/nand/raw/sunxi_nand.c +++ b/drivers/mtd/nand/raw/sunxi_nand.c @@ -26,8 +26,12 @@ #include <common.h> #include <fdtdec.h> +#include <malloc.h> #include <memalign.h> #include <nand.h> +#include <dm/device_compat.h> +#include <dm/devres.h> +#include <linux/err.h> #include <linux/kernel.h> #include <linux/mtd/mtd.h> diff --git a/drivers/mtd/nand/raw/tegra_nand.c b/drivers/mtd/nand/raw/tegra_nand.c index 74acdfb308..ae699d1da5 100644 --- a/drivers/mtd/nand/raw/tegra_nand.c +++ b/drivers/mtd/nand/raw/tegra_nand.c @@ -13,6 +13,7 @@ #include <asm/arch/clock.h> #include <asm/arch/funcmux.h> #include <asm/arch-tegra/clk_rst.h> +#include <dm/device_compat.h> #include <linux/errno.h> #include <asm/gpio.h> #include <fdtdec.h> diff --git a/drivers/mtd/nand/raw/vf610_nfc.c b/drivers/mtd/nand/raw/vf610_nfc.c index 3326c2b096..52c8a94778 100644 --- a/drivers/mtd/nand/raw/vf610_nfc.c +++ b/drivers/mtd/nand/raw/vf610_nfc.c @@ -23,6 +23,7 @@ #include <common.h> #include <malloc.h> +#include <dm/device_compat.h> #include <linux/mtd/mtd.h> #include <linux/mtd/rawnand.h> diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index cb8ffa3fa9..cd624ec6ae 100644 --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -24,6 +24,8 @@ #include <errno.h> #include <spi.h> #include <spi-mem.h> +#include <dm/device_compat.h> +#include <dm/devres.h> #include <linux/mtd/spinand.h> #endif @@ -1021,7 +1023,7 @@ static int spinand_noecc_ooblayout_free(struct mtd_info *mtd, int section, static const struct mtd_ooblayout_ops spinand_noecc_ooblayout = { .ecc = spinand_noecc_ooblayout_ecc, - .free = spinand_noecc_ooblayout_free, + .rfree = spinand_noecc_ooblayout_free, }; static int spinand_init(struct spinand_device *spinand) diff --git a/drivers/mtd/nand/spi/gigadevice.c b/drivers/mtd/nand/spi/gigadevice.c index 3681c5eed9..0b228dcb5b 100644 --- a/drivers/mtd/nand/spi/gigadevice.c +++ b/drivers/mtd/nand/spi/gigadevice.c @@ -7,6 +7,7 @@ */ #ifndef __UBOOT__ +#include <malloc.h> #include <linux/device.h> #include <linux/kernel.h> #endif @@ -103,7 +104,7 @@ static int gd5fxgq4xexxg_ecc_get_status(struct spinand_device *spinand, static const struct mtd_ooblayout_ops gd5fxgq4xexxg_ooblayout = { .ecc = gd5fxgq4xexxg_ooblayout_ecc, - .free = gd5fxgq4xexxg_ooblayout_free, + .rfree = gd5fxgq4xexxg_ooblayout_free, }; static const struct spinand_info gigadevice_spinand_table[] = { diff --git a/drivers/mtd/nand/spi/macronix.c b/drivers/mtd/nand/spi/macronix.c index 662c561e50..67d092be2c 100644 --- a/drivers/mtd/nand/spi/macronix.c +++ b/drivers/mtd/nand/spi/macronix.c @@ -6,6 +6,7 @@ */ #ifndef __UBOOT__ +#include <malloc.h> #include <linux/device.h> #include <linux/kernel.h> #endif @@ -47,7 +48,7 @@ static int mx35lfxge4ab_ooblayout_free(struct mtd_info *mtd, int section, static const struct mtd_ooblayout_ops mx35lfxge4ab_ooblayout = { .ecc = mx35lfxge4ab_ooblayout_ecc, - .free = mx35lfxge4ab_ooblayout_free, + .rfree = mx35lfxge4ab_ooblayout_free, }; static int mx35lf1ge4ab_get_eccsr(struct spinand_device *spinand, u8 *eccsr) diff --git a/drivers/mtd/nand/spi/micron.c b/drivers/mtd/nand/spi/micron.c index 83951c5d0f..687306e33e 100644 --- a/drivers/mtd/nand/spi/micron.c +++ b/drivers/mtd/nand/spi/micron.c @@ -7,6 +7,7 @@ */ #ifndef __UBOOT__ +#include <malloc.h> #include <linux/device.h> #include <linux/kernel.h> #endif @@ -63,7 +64,7 @@ static int mt29f2g01abagd_ooblayout_free(struct mtd_info *mtd, int section, static const struct mtd_ooblayout_ops mt29f2g01abagd_ooblayout = { .ecc = mt29f2g01abagd_ooblayout_ecc, - .free = mt29f2g01abagd_ooblayout_free, + .rfree = mt29f2g01abagd_ooblayout_free, }; static int mt29f2g01abagd_ecc_get_status(struct spinand_device *spinand, diff --git a/drivers/mtd/nand/spi/winbond.c b/drivers/mtd/nand/spi/winbond.c index 6ba8bc5c7b..6ede98c85d 100644 --- a/drivers/mtd/nand/spi/winbond.c +++ b/drivers/mtd/nand/spi/winbond.c @@ -8,6 +8,7 @@ */ #ifndef __UBOOT__ +#include <malloc.h> #include <linux/device.h> #include <linux/kernel.h> #endif @@ -59,7 +60,7 @@ static int w25m02gv_ooblayout_free(struct mtd_info *mtd, int section, static const struct mtd_ooblayout_ops w25m02gv_ooblayout = { .ecc = w25m02gv_ooblayout_ecc, - .free = w25m02gv_ooblayout_free, + .rfree = w25m02gv_ooblayout_free, }; static int w25m02gv_select_target(struct spinand_device *spinand, |