Thread (7 messages) 7 messages, 1 author, 2021-11-06
STALE1687d

[PATCH v3 6/6] mtd: spi-nor: manuf-id-collisions: Add support for xm25qh64c

From: Tudor Ambarus <hidden>
Date: 2021-11-06 17:20:54
Subsystem: memory technology devices (mtd), spi nor subsystem, the rest · Maintainers: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra, Pratyush Yadav, Michael Walle, Linus Torvalds

Do not apply without:

# xxd -p /path/to/sfdp
# sha1sum /path/to/sfdp
# cat /path/to/jedec_id
# cat /path/to/partname
# cat /path/to/manufacturer 

Flash ignores the manufacturer continuation codes and is likely to
collide with other manufacturers flashes.

Signed-off-by: Tudor Ambarus <redacted>
---
 drivers/mtd/spi-nor/manuf-id-collisions.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff --git a/drivers/mtd/spi-nor/manuf-id-collisions.c b/drivers/mtd/spi-nor/manuf-id-collisions.c
index 7827cfc584df..0d0989dd25be 100644
--- a/drivers/mtd/spi-nor/manuf-id-collisions.c
+++ b/drivers/mtd/spi-nor/manuf-id-collisions.c
@@ -17,6 +17,15 @@ static const struct spi_nor_fixups boya_fixups = {
 	.late_init = boya_late_init,
 };
 
+static void xmc_late_init(struct spi_nor *nor)
+{
+	nor->manufacturer_name = "xmc";
+}
+
+static const struct spi_nor_fixups xmc_fixups = {
+	.late_init = xmc_late_init,
+};
+
 static void xtx_late_init(struct spi_nor *nor)
 {
 	nor->manufacturer_name = "xtx";
@@ -33,6 +42,10 @@ static const struct flash_info id_collision_parts[] = {
 			     SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
 		.fixups = &boya_fixups },
 
+	/* XMC (Wuhan Xinxin Semiconductor Manufacturing Corp.) */
+	{ "xm25qh64c", INFO(0x204017, 0, 64 * 1024, 128, SPI_NOR_PARSE_SFDP)
+		.fixups = &xmc_fixups },
+
 	/* XTX (XTX Technology Limited) */
 	{ "xt25f128b", INFO(0x0b4018, 0, 64 * 1024, 256, SPI_NOR_PARSE_SFDP)
 		.fixups = &xtx_fixups },
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help