[PATCH 2/4] cmd/mtd.c: Support FPGAs in mtd command

u-boot at emagii.com u-boot at emagii.com
Sat Feb 11 11:07:41 CET 2023


From: Ulf Samuelsson <ulf at emagii.com>

Signed-off-by: Ulf Samuelsson <ulf at emagii.com>
---
 cmd/mtd.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/cmd/mtd.c b/cmd/mtd.c
index eb6e2d6892..09d5fdaa11 100644
--- a/cmd/mtd.c
+++ b/cmd/mtd.c
@@ -158,6 +158,9 @@ static void mtd_show_device(struct mtd_info *mtd)
 	case MTD_MLCNANDFLASH:
 		printf("MLC NAND flash\n");
 		break;
+	case MTD_FPGA:
+		printf("FPGA\n");
+		break;
 	case MTD_ABSENT:
 	default:
 		printf("Unknown\n");
@@ -275,6 +278,11 @@ static int do_mtd_io(struct cmd_tbl *cmdtp, int flag, int argc,
 	raw = strstr(cmd, ".raw");
 	woob = strstr(cmd, ".oob");
 	write_empty_pages = !has_pages || strstr(cmd, ".dontskipff");
+	if (mtd->type == MTD_FPGA) {
+		raw = true;
+		woob = false;
+		write_empty_pages = true;
+	}
 
 	argc -= 2;
 	argv += 2;
-- 
2.17.1



More information about the U-Boot mailing list