summaryrefslogtreecommitdiff
path: root/target/linux/layerscape/patches-4.4/1094-mtd-spi-nor-stop-passing-around-retlen.patch
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2016-12-20 05:19:08 -0300
committerMathias Kresin <dev@kresin.me>2017-01-03 19:58:00 +0100
commitd6c831e0e5a0ef97eb054dd3eb382d66b1bffc40 (patch)
treeb5723cc59f2456cbda62eeee4556c8cf88b7c50f /target/linux/layerscape/patches-4.4/1094-mtd-spi-nor-stop-passing-around-retlen.patch
parent799d0dddf608ff012b49282d5832ddd2ef1b916e (diff)
downloadmtk-20170518-d6c831e0e5a0ef97eb054dd3eb382d66b1bffc40.zip
mtk-20170518-d6c831e0e5a0ef97eb054dd3eb382d66b1bffc40.tar.gz
mtk-20170518-d6c831e0e5a0ef97eb054dd3eb382d66b1bffc40.tar.bz2
generic: mtd: backport SPI_NOR_HAS_LOCK
This flag was added to 4.9 with upstream commit 76a4707de5e18dc32d9cb4e990686140c5664a15. Signed-off-by: Victor Shyba <victor1984@riseup.net> [refresh and adjust platform patches, fix commit message] Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/layerscape/patches-4.4/1094-mtd-spi-nor-stop-passing-around-retlen.patch')
-rw-r--r--target/linux/layerscape/patches-4.4/1094-mtd-spi-nor-stop-passing-around-retlen.patch14
1 files changed, 7 insertions, 7 deletions
diff --git a/target/linux/layerscape/patches-4.4/1094-mtd-spi-nor-stop-passing-around-retlen.patch b/target/linux/layerscape/patches-4.4/1094-mtd-spi-nor-stop-passing-around-retlen.patch
index 772eb9e..f72bc2c 100644
--- a/target/linux/layerscape/patches-4.4/1094-mtd-spi-nor-stop-passing-around-retlen.patch
+++ b/target/linux/layerscape/patches-4.4/1094-mtd-spi-nor-stop-passing-around-retlen.patch
@@ -113,7 +113,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com>
u8 cmd = nor->read_opcode;
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -920,12 +920,13 @@ static int spi_nor_read(struct mtd_info
+@@ -921,12 +921,13 @@ static int spi_nor_read(struct mtd_info
if (ret)
return ret;
@@ -128,7 +128,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com>
return 0;
}
-@@ -952,7 +953,7 @@ static int sst_write(struct mtd_info *mt
+@@ -953,7 +954,7 @@ static int sst_write(struct mtd_info *mt
nor->program_opcode = SPINOR_OP_BP;
/* write one byte. */
@@ -137,7 +137,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com>
if (ret < 0)
goto sst_write_err;
WARN(ret != 1, "While writing 1 byte written %i bytes\n",
-@@ -968,7 +969,7 @@ static int sst_write(struct mtd_info *mt
+@@ -969,7 +970,7 @@ static int sst_write(struct mtd_info *mt
nor->program_opcode = SPINOR_OP_AAI_WP;
/* write two bytes. */
@@ -146,7 +146,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com>
if (ret < 0)
goto sst_write_err;
WARN(ret != 2, "While writing 2 bytes written %i bytes\n",
-@@ -991,7 +992,7 @@ static int sst_write(struct mtd_info *mt
+@@ -992,7 +993,7 @@ static int sst_write(struct mtd_info *mt
write_enable(nor);
nor->program_opcode = SPINOR_OP_BP;
@@ -155,7 +155,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com>
if (ret < 0)
goto sst_write_err;
WARN(ret != 1, "While writing 1 byte written %i bytes\n",
-@@ -1000,8 +1001,10 @@ static int sst_write(struct mtd_info *mt
+@@ -1001,8 +1002,10 @@ static int sst_write(struct mtd_info *mt
if (ret)
goto sst_write_err;
write_disable(nor);
@@ -166,7 +166,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com>
spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_WRITE);
return ret;
}
-@@ -1030,15 +1033,17 @@ static int spi_nor_write(struct mtd_info
+@@ -1031,15 +1034,17 @@ static int spi_nor_write(struct mtd_info
/* do all the bytes fit onto one page? */
if (page_offset + len <= nor->page_size) {
@@ -186,7 +186,7 @@ Integrated-by: Jiang Yutang <yutang.jiang@nxp.com>
/* write everything in nor->page_size chunks */
for (i = ret; i < len; ) {
-@@ -1052,10 +1057,10 @@ static int spi_nor_write(struct mtd_info
+@@ -1053,10 +1058,10 @@ static int spi_nor_write(struct mtd_info
write_enable(nor);