summaryrefslogtreecommitdiff
path: root/target/linux
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2016-12-20 20:35:32 -0300
committerMathias Kresin <dev@kresin.me>2017-01-03 20:09:41 +0100
commite2f866d63ac75b00dc90ec1925138c5d655ed3aa (patch)
treedc93d35f872e01bf8fcd757b166a1a940ad9f32f /target/linux
parentd6c831e0e5a0ef97eb054dd3eb382d66b1bffc40 (diff)
downloadmtk-20170518-e2f866d63ac75b00dc90ec1925138c5d655ed3aa.zip
mtk-20170518-e2f866d63ac75b00dc90ec1925138c5d655ed3aa.tar.gz
mtk-20170518-e2f866d63ac75b00dc90ec1925138c5d655ed3aa.tar.bz2
generic: mtd: add lock/unlock support for f25l32pa
This chip has write protection enabled on power-up, so this flag is necessary to support write operations. Signed-off-by: Victor Shyba <victor1984@riseup.net>
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/generic/patches-4.4/479-enable_mtd_has_lock_for_f25l32pa.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/target/linux/generic/patches-4.4/479-enable_mtd_has_lock_for_f25l32pa.patch b/target/linux/generic/patches-4.4/479-enable_mtd_has_lock_for_f25l32pa.patch
new file mode 100644
index 0000000..2e3d3d1
--- /dev/null
+++ b/target/linux/generic/patches-4.4/479-enable_mtd_has_lock_for_f25l32pa.patch
@@ -0,0 +1,24 @@
+mtd: spi-nor: Add lock/unlock support for f25l32pa
+
+This chip has write protection enabled on power-up,
+so this flag is necessary to support write operations.
+
+Signed-off-by: Victor Shyba <victor1984@riseup.net>
+Acked-by: Marek Vasut <marek.vasut@gmail.com>
+---
+ drivers/mtd/spi-nor/spi-nor.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
+index da7cd69..f325925 100644
+--- a/drivers/mtd/spi-nor/spi-nor.c
++++ b/drivers/mtd/spi-nor/spi-nor.c
+@@ -689,7 +689,7 @@ static const struct flash_info spi_nor_i
+ { "en25s64", INFO(0x1c3817, 0, 64 * 1024, 128, SECT_4K) },
+
+ /* ESMT */
+- { "f25l32pa", INFO(0x8c2016, 0, 64 * 1024, 64, SECT_4K) },
++ { "f25l32pa", INFO(0x8c2016, 0, 64 * 1024, 64, SECT_4K | SPI_NOR_HAS_LOCK) },
+ { "f25l32qa", INFO(0x8c4116, 0, 64 * 1024, 64, SECT_4K) },
+ { "f25l64qa", INFO(0x8c4117, 0, 64 * 1024, 128, SECT_4K) },
+