diff options
author | Victor Shyba <victor1984@riseup.net> | 2016-12-20 05:19:08 -0300 |
---|---|---|
committer | Mathias Kresin <dev@kresin.me> | 2017-01-03 19:58:00 +0100 |
commit | d6c831e0e5a0ef97eb054dd3eb382d66b1bffc40 (patch) | |
tree | b5723cc59f2456cbda62eeee4556c8cf88b7c50f /target/linux/layerscape/patches-4.4/1093-mtd-spi-nor-check-return-value-from-read-write.patch | |
parent | 799d0dddf608ff012b49282d5832ddd2ef1b916e (diff) | |
download | mtk-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/1093-mtd-spi-nor-check-return-value-from-read-write.patch')
-rw-r--r-- | target/linux/layerscape/patches-4.4/1093-mtd-spi-nor-check-return-value-from-read-write.patch | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/target/linux/layerscape/patches-4.4/1093-mtd-spi-nor-check-return-value-from-read-write.patch b/target/linux/layerscape/patches-4.4/1093-mtd-spi-nor-check-return-value-from-read-write.patch index 79c71b2..85a2315 100644 --- a/target/linux/layerscape/patches-4.4/1093-mtd-spi-nor-check-return-value-from-read-write.patch +++ b/target/linux/layerscape/patches-4.4/1093-mtd-spi-nor-check-return-value-from-read-write.patch @@ -14,7 +14,7 @@ Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@freescale.com> --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -923,7 +923,10 @@ static int spi_nor_read(struct mtd_info +@@ -924,7 +924,10 @@ static int spi_nor_read(struct mtd_info ret = nor->read(nor, from, len, retlen, buf); spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_READ); @@ -26,7 +26,7 @@ Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@freescale.com> } static int sst_write(struct mtd_info *mtd, loff_t to, size_t len, -@@ -949,10 +952,14 @@ static int sst_write(struct mtd_info *mt +@@ -950,10 +953,14 @@ static int sst_write(struct mtd_info *mt nor->program_opcode = SPINOR_OP_BP; /* write one byte. */ @@ -43,7 +43,7 @@ Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@freescale.com> } to += actual; -@@ -961,10 +968,14 @@ static int sst_write(struct mtd_info *mt +@@ -962,10 +969,14 @@ static int sst_write(struct mtd_info *mt nor->program_opcode = SPINOR_OP_AAI_WP; /* write two bytes. */ @@ -60,7 +60,7 @@ Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@freescale.com> to += 2; nor->sst_write_second = true; } -@@ -973,21 +984,24 @@ static int sst_write(struct mtd_info *mt +@@ -974,21 +985,24 @@ static int sst_write(struct mtd_info *mt write_disable(nor); ret = spi_nor_wait_till_ready(nor); if (ret) @@ -90,7 +90,7 @@ Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@freescale.com> spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_WRITE); return ret; } -@@ -1016,14 +1030,18 @@ static int spi_nor_write(struct mtd_info +@@ -1017,14 +1031,18 @@ static int spi_nor_write(struct mtd_info /* do all the bytes fit onto one page? */ if (page_offset + len <= nor->page_size) { @@ -112,7 +112,7 @@ Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@freescale.com> page_size = len - i; if (page_size > nor->page_size) page_size = nor->page_size; -@@ -1034,7 +1052,11 @@ static int spi_nor_write(struct mtd_info +@@ -1035,7 +1053,11 @@ static int spi_nor_write(struct mtd_info write_enable(nor); |