
Most functions that work with NAND device (for example fastboot), use the get_nand_dev_by_index() function to work with NAND MTD. In order to use this feature, SPI NAND must be registered via nand_register().
Signed-off-by: Alexey Romanov avromanov@salutedevices.com --- drivers/mtd/nand/spi/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index 27ad6fefdb..5210332712 100644 --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -23,6 +23,7 @@ #else #include <common.h> #include <errno.h> +#include <nand.h> #include <watchdog.h> #include <spi.h> #include <spi-mem.h> @@ -1222,7 +1223,7 @@ static int spinand_probe(struct udevice *dev) #ifndef __UBOOT__ ret = mtd_device_register(mtd, NULL, 0); #else - ret = add_mtd_device(mtd); + ret = nand_register(0, mtd); #endif if (ret) goto err_spinand_cleanup;