aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/patches-4.14
diff options
context:
space:
mode:
authorBaptiste Jonglez <git@bitsofnetworks.org>2018-10-18 11:08:20 +0200
committerKoen Vandeputte <koen.vandeputte@ncentric.com>2018-11-07 11:41:59 +0100
commitaa0aa47aa176133ff302c4a5cea785d971bc26b3 (patch)
tree61e30f9737eaafdba507a32a6beb32ceaea33c4e /target/linux/ramips/patches-4.14
parent44084d89f2b0f60ba6d0d480ebf4d944c1ebe57d (diff)
downloadupstream-aa0aa47aa176133ff302c4a5cea785d971bc26b3.tar.gz
upstream-aa0aa47aa176133ff302c4a5cea785d971bc26b3.tar.bz2
upstream-aa0aa47aa176133ff302c4a5cea785d971bc26b3.zip
kernel: Add support for Winbond w25q128jv SPI NOR flash
Newer batches of several Mikrotik boards contain this yet-unsupported flash chip, for instance: - rb941-2nd (hAP lite) - rb952ui-5ac2nd (hAP ac lite) - RBM33G and probably other Mikrotik boards need this patch as well. The patch was submitted upstream by Robert Marko: https://patchwork.ozlabs.org/patch/934181/ Closes: FS#1715 Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org> Cc: Robert Marko <robimarko@gmail.com> [Rebased + refreshed on current kernels] Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Diffstat (limited to 'target/linux/ramips/patches-4.14')
-rw-r--r--target/linux/ramips/patches-4.14/0053-mtd-spi-nor-add-w25q256-3b-mode-switch.patch12
1 files changed, 6 insertions, 6 deletions
diff --git a/target/linux/ramips/patches-4.14/0053-mtd-spi-nor-add-w25q256-3b-mode-switch.patch b/target/linux/ramips/patches-4.14/0053-mtd-spi-nor-add-w25q256-3b-mode-switch.patch
index e7161af959..02b6ffbc2a 100644
--- a/target/linux/ramips/patches-4.14/0053-mtd-spi-nor-add-w25q256-3b-mode-switch.patch
+++ b/target/linux/ramips/patches-4.14/0053-mtd-spi-nor-add-w25q256-3b-mode-switch.patch
@@ -116,7 +116,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_LOCK);
return ret;
-@@ -1170,7 +1222,7 @@ static const struct flash_info spi_nor_i
+@@ -1175,7 +1227,7 @@ static const struct flash_info spi_nor_i
{ "w25q80", INFO(0xef5014, 0, 64 * 1024, 16, SECT_4K) },
{ "w25q80bl", INFO(0xef4014, 0, 64 * 1024, 16, SECT_4K) },
{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, SECT_4K) },
@@ -125,7 +125,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
{ "w25m512jv", INFO(0xef7119, 0, 64 * 1024, 1024,
SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_DUAL_READ) },
-@@ -1230,6 +1282,9 @@ static int spi_nor_read(struct mtd_info
+@@ -1235,6 +1287,9 @@ static int spi_nor_read(struct mtd_info
if (ret)
return ret;
@@ -135,7 +135,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
while (len) {
loff_t addr = from;
-@@ -1254,6 +1309,18 @@ static int spi_nor_read(struct mtd_info
+@@ -1259,6 +1314,18 @@ static int spi_nor_read(struct mtd_info
ret = 0;
read_err:
@@ -154,7 +154,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_READ);
return ret;
}
-@@ -1355,6 +1422,10 @@ static int spi_nor_write(struct mtd_info
+@@ -1360,6 +1427,10 @@ static int spi_nor_write(struct mtd_info
if (ret)
return ret;
@@ -165,7 +165,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
for (i = 0; i < len; ) {
ssize_t written;
loff_t addr = to + i;
-@@ -1395,6 +1466,7 @@ static int spi_nor_write(struct mtd_info
+@@ -1400,6 +1471,7 @@ static int spi_nor_write(struct mtd_info
}
write_err:
@@ -173,7 +173,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_WRITE);
return ret;
}
-@@ -2811,8 +2883,10 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -2816,8 +2888,10 @@ int spi_nor_scan(struct spi_nor *nor, co
} else if (mtd->size > 0x1000000) {
/* enable 4-byte addressing if the device exceeds 16MiB */
nor->addr_width = 4;