Skip to contentSkip to conversation

mtd: spinand: add support for GigaDevice GD5FxGQ4xA

PATCH Superseded Chuanhong Guo 1 participant 1 message Nov 28, 2018

Subsystems (2)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mtd: spinand: add support for GigaDevice GD5FxGQ4xA

Add support for GigaDevice GD5F1G/2G/4GQ4xA SPI NAND.

---
Changes since v1:
fixed broken indent at the beginning
fixed OOB layout. Only the first byte is reserved for bad block mark replaced STATUS_ECC_HAS_BITFLIPS with a device-specific definition

 drivers/mtd/nand/spi/Makefile     |   2 +-
 drivers/mtd/nand/spi/core.c       |   1 +
 drivers/mtd/nand/spi/gigadevice.c | 148 ++++++++++++++++++++++++++++++
 include/linux/mtd/spinand.h       |   1 +
 4 files changed, 151 insertions(+), 1 deletion(-)
 create mode 100644 drivers/mtd/nand/spi/gigadevice.c
drivers/mtd/nand/spi/Makefile +1 -1
index be5f73512ece..753125082640 100644
@@ -1,3 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0
-spinand-objs := core.o macronix.o micron.o toshiba.o winbond.o
+spinand-objs := core.o gigadevice.o macronix.o micron.o toshiba.o winbond.o
 obj-$(CONFIG_MTD_SPI_NAND) += spinand.o
drivers/mtd/nand/spi/core.c +1 -0
index 87bdf2a7b724..479c2f2cf17f 100644
@@ -764,6 +764,7 @@ static const struct nand_ops spinand_ops = {
 };
 
 static const struct spinand_manufacturer *spinand_manufacturers[] = {
+	&gigadevice_spinand_manufacturer,
 	&macronix_spinand_manufacturer,
 	&micron_spinand_manufacturer,
 	&toshiba_spinand_manufacturer,
drivers/mtd/nand/spi/gigadevice.c new file +148 -0

148 lines not on this page · raw message

include/linux/mtd/spinand.h +1 -0
index 816c4b00abca..b92e2aa955b6 100644
@@ -194,6 +194,7 @@ struct spinand_manufacturer {
 };
 
 /* SPI NAND manufacturers */
+extern const struct spinand_manufacturer gigadevice_spinand_manufacturer;
 extern const struct spinand_manufacturer macronix_spinand_manufacturer;
 extern const struct spinand_manufacturer micron_spinand_manufacturer;
 extern const struct spinand_manufacturer toshiba_spinand_manufacturer;
Signature · 1 line
2.19.1