[PATCH v2 12/14] fastboot: check device type for SPI NAND too

Alexey Romanov avromanov at salutedevices.com
Tue Jan 9 18:32:24 CET 2024


SPI NAND devices also supports 'fastboot erase / flash' commands.

Signed-off-by: Alexey Romanov <avromanov at salutedevices.com>
Reviewed-by: Sean Anderson <sean.anderson at seco.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek at baylibre.com>
---
 drivers/fastboot/fb_nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/fastboot/fb_nand.c b/drivers/fastboot/fb_nand.c
index bbe26ddcc9..6d94bfdc45 100644
--- a/drivers/fastboot/fb_nand.c
+++ b/drivers/fastboot/fb_nand.c
@@ -54,7 +54,7 @@ static int fb_nand_lookup(const char *partname,
 		return ret;
 	}
 
-	if (dev->id->type != MTD_DEV_TYPE_NAND) {
+	if (dev->id->type != MTD_DEV_TYPE_NAND && dev->id->type != MTD_DEV_TYPE_SPINAND) {
 		pr_err("partition '%s' is not stored on a NAND device",
 		      partname);
 		fastboot_fail("not a NAND device", response);
-- 
2.30.1



More information about the U-Boot mailing list