[source] generic: mtd: backport mx25u25635f stateless 4b support
LEDE Commits
lede-commits at lists.infradead.org
Wed Apr 19 12:03:10 PDT 2017
mkresin pushed a commit to source.git, branch master:
https://git.lede-project.org/226e194335c0d9a92402fbab772eac4f38786e45
commit 226e194335c0d9a92402fbab772eac4f38786e45
Author: Mathias Kresin <dev at kresin.me>
AuthorDate: Tue Apr 11 19:46:16 2017 +0200
generic: mtd: backport mx25u25635f stateless 4b support
Use the stateless 4-byte op codes for this flash chip to fix reboot
hangs on SoCs expecting the flash chip in 3-byte mode.
Fixes: FS#179
Signed-off-by: Mathias Kresin <dev at kresin.me>
---
...-enable-stateless-4b-op-codes-for-mx25u25.patch | 29 ++++++++++++++++++++++
.../patches-4.9/105-mtd-nor-add-mx25l25635f.patch | 2 +-
2 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/target/linux/generic/patches-4.9/063-mtd-spi-nor-enable-stateless-4b-op-codes-for-mx25u25.patch b/target/linux/generic/patches-4.9/063-mtd-spi-nor-enable-stateless-4b-op-codes-for-mx25u25.patch
new file mode 100644
index 0000000..3395915
--- /dev/null
+++ b/target/linux/generic/patches-4.9/063-mtd-spi-nor-enable-stateless-4b-op-codes-for-mx25u25.patch
@@ -0,0 +1,29 @@
+From b0fcb4b413028376894feaaaf62bcb09ab1b52f2 Mon Sep 17 00:00:00 2001
+From: Mathias Kresin <dev at kresin.me>
+Date: Thu, 13 Apr 2017 09:23:54 +0200
+Subject: [PATCH] mtd: spi-nor: enable stateless 4b op codes for mx25u25635f
+
+All required stateless 4-byte op codes are supported by this flash
+chip. The stateless 4-byte support can't be autodetected due to a
+missing 4-byte Address Instruction Table in SFDP.
+
+Fixes hangs on reboot for SoCs expecting the flash chip in 3byte mode.
+
+Signed-off-by: Mathias Kresin <dev at kresin.me>
+Acked-by: Marek Vasut <marek.vasut at gmail.com>
+Signed-off-by: Cyrille Pitchen <cyrille.pitchen at atmel.com>
+---
+ drivers/mtd/spi-nor/spi-nor.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/mtd/spi-nor/spi-nor.c
++++ b/drivers/mtd/spi-nor/spi-nor.c
+@@ -1017,7 +1017,7 @@ static const struct flash_info spi_nor_i
+ { "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) },
+ { "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) },
+ { "mx25l25635e", INFO(0xc22019, 0, 64 * 1024, 512, 0) },
+- { "mx25u25635f", INFO(0xc22539, 0, 64 * 1024, 512, SECT_4K) },
++ { "mx25u25635f", INFO(0xc22539, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_4B_OPCODES) },
+ { "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) },
+ { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_QUAD_READ) },
+ { "mx66l1g55g", INFO(0xc2261b, 0, 64 * 1024, 2048, SPI_NOR_QUAD_READ) },
diff --git a/target/linux/ipq806x/patches-4.9/105-mtd-nor-add-mx25l25635f.patch b/target/linux/ipq806x/patches-4.9/105-mtd-nor-add-mx25l25635f.patch
index de54dba..edfafda 100644
--- a/target/linux/ipq806x/patches-4.9/105-mtd-nor-add-mx25l25635f.patch
+++ b/target/linux/ipq806x/patches-4.9/105-mtd-nor-add-mx25l25635f.patch
@@ -17,6 +17,6 @@ the ubi volume created by the other.
{ "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) },
- { "mx25l25635e", INFO(0xc22019, 0, 64 * 1024, 512, 0) },
+ { "mx25l25635f", INFO(0xc22019, 0, 64 * 1024, 512, SECT_4K) },
- { "mx25u25635f", INFO(0xc22539, 0, 64 * 1024, 512, SECT_4K) },
+ { "mx25u25635f", INFO(0xc22539, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_4B_OPCODES) },
{ "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) },
{ "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_QUAD_READ) },
More information about the lede-commits
mailing list