gl-infra-builder-FUjr/patches-21.02.2/0015-add-spi_nor_write.patch
2022-05-10 18:58:01 +08:00

78 lines
3.7 KiB
Diff

From a417695d1bad98240995e15f697374992719198b Mon Sep 17 00:00:00 2001
From: "GL.iNet-Hongjian.Zhang" <hongjian.zhang@gl-inet.com>
Date: Tue, 10 May 2022 18:52:07 +0800
Subject: [PATCH] add spi_nor_write.patch
---
.../ath79/patches-5.4/320-add_spi_nor_write.patch | 13 +++++++++++++
.../patches-5.4/499-mtd-spinand-add-support.patch | 14 +++++++-------
2 files changed, 20 insertions(+), 7 deletions(-)
create mode 100644 target/linux/ath79/patches-5.4/320-add_spi_nor_write.patch
diff --git a/target/linux/ath79/patches-5.4/320-add_spi_nor_write.patch b/target/linux/ath79/patches-5.4/320-add_spi_nor_write.patch
new file mode 100644
index 0000000000..160d2c9d2e
--- /dev/null
+++ b/target/linux/ath79/patches-5.4/320-add_spi_nor_write.patch
@@ -0,0 +1,13 @@
+Index: b/drivers/mtd/spi-nor/spi-nor.c
+===================================================================
+--- a/drivers/mtd/spi-nor/spi-nor.c 2022-05-10 18:48:43.628950665 +0800
++++ b/drivers/mtd/spi-nor/spi-nor.c 2022-05-10 18:50:19.037408439 +0800
+@@ -5023,6 +5023,8 @@ int spi_nor_scan(struct spi_nor *nor, co
+ else
+ mtd->_write = spi_nor_write;
+
++ mtd->_panic_write = spi_nor_write;
++
+ if (info->flags & USE_FSR)
+ nor->flags |= SNOR_F_USE_FSR;
+ if (info->flags & SPI_NOR_HAS_TB)
diff --git a/target/linux/ath79/patches-5.4/499-mtd-spinand-add-support.patch b/target/linux/ath79/patches-5.4/499-mtd-spinand-add-support.patch
index 4a4b6e9bf0..7f8965889a 100644
--- a/target/linux/ath79/patches-5.4/499-mtd-spinand-add-support.patch
+++ b/target/linux/ath79/patches-5.4/499-mtd-spinand-add-support.patch
@@ -1,14 +1,14 @@
Index: b/drivers/mtd/nand/spi/gigadevice.c
===================================================================
---- a/drivers/mtd/nand/spi/gigadevice.c 2021-09-18 14:49:34.250500716 +0800
-+++ b/drivers/mtd/nand/spi/gigadevice.c 2021-09-18 14:55:06.091509000 +0800
+--- a/drivers/mtd/nand/spi/gigadevice.c 2022-05-10 18:30:27.215588502 +0800
++++ b/drivers/mtd/nand/spi/gigadevice.c 2022-05-10 18:30:53.308870949 +0800
@@ -278,6 +278,15 @@ static const struct spinand_info gigadev
SPINAND_HAS_QE_BIT,
SPINAND_ECCINFO(&gd5fxgq4_variant2_ooblayout,
gd5fxgq4uexxg_ecc_get_status)),
+ SPINAND_INFO("GD5F1GQ5UExxG", 0x51,
+ NAND_MEMORG(1, 2048, 128, 64, 1024, 20, 1, 1, 1),
-+ NAND_ECCREQ(8, 512),
++ NAND_ECCREQ(4, 512),
+ SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
+ &write_cache_variants,
+ &update_cache_variants),
@@ -20,8 +20,8 @@ Index: b/drivers/mtd/nand/spi/gigadevice.c
NAND_ECCREQ(8, 512),
Index: b/drivers/mtd/nand/spi/macronix.c
===================================================================
---- a/drivers/mtd/nand/spi/macronix.c 2021-08-26 20:55:22.000000000 +0800
-+++ b/drivers/mtd/nand/spi/macronix.c 2021-09-18 15:06:07.031203336 +0800
+--- a/drivers/mtd/nand/spi/macronix.c 2022-05-10 18:30:27.215588502 +0800
++++ b/drivers/mtd/nand/spi/macronix.c 2022-05-10 18:30:27.211588305 +0800
@@ -108,6 +108,15 @@ static const struct spinand_info macroni
SPINAND_HAS_QE_BIT,
SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout,
@@ -40,8 +40,8 @@ Index: b/drivers/mtd/nand/spi/macronix.c
NAND_ECCREQ(4, 512),
Index: b/drivers/mtd/nand/spi/paragon.c
===================================================================
---- a/drivers/mtd/nand/spi/paragon.c 2021-08-26 20:55:22.000000000 +0800
-+++ b/drivers/mtd/nand/spi/paragon.c 2021-09-18 15:01:02.476309144 +0800
+--- a/drivers/mtd/nand/spi/paragon.c 2022-05-10 18:30:27.215588502 +0800
++++ b/drivers/mtd/nand/spi/paragon.c 2022-05-10 18:30:27.211588305 +0800
@@ -115,6 +115,15 @@ static const struct spinand_info paragon
0,
SPINAND_ECCINFO(&pn26g0xa_ooblayout,
--
2.17.1