spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_LOCK);
return ret;
-@@ -1165,7 +1217,7 @@ static const struct flash_info spi_nor_i
+@@ -1177,7 +1229,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) },
{ "w25m512jv", INFO(0xef7119, 0, 64 * 1024, 1024,
SECT_4K | SPI_NOR_QUAD_READ | SPI_NOR_DUAL_READ) },
-@@ -1225,6 +1277,9 @@ static int spi_nor_read(struct mtd_info
+@@ -1237,6 +1289,9 @@ static int spi_nor_read(struct mtd_info
if (ret)
return ret;
while (len) {
loff_t addr = from;
-@@ -1249,6 +1304,18 @@ static int spi_nor_read(struct mtd_info
+@@ -1261,6 +1316,18 @@ static int spi_nor_read(struct mtd_info
ret = 0;
read_err:
spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_READ);
return ret;
}
-@@ -1350,6 +1417,10 @@ static int spi_nor_write(struct mtd_info
+@@ -1362,6 +1429,10 @@ static int spi_nor_write(struct mtd_info
if (ret)
return ret;
for (i = 0; i < len; ) {
ssize_t written;
loff_t addr = to + i;
-@@ -1390,6 +1461,7 @@ static int spi_nor_write(struct mtd_info
+@@ -1402,6 +1473,7 @@ static int spi_nor_write(struct mtd_info
}
write_err:
spi_nor_unlock_and_unprep(nor, SPI_NOR_OPS_WRITE);
return ret;
}
-@@ -2806,8 +2878,10 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -2818,8 +2890,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;