|
@@ -284,6 +284,20 @@ static inline int set_4byte(struct spi_nor *nor, const struct flash_info *info,
|
|
|
if (need_wren)
|
|
|
write_disable(nor);
|
|
|
|
|
|
+ if (!status && !enable &&
|
|
|
+ JEDEC_MFR(info) == SNOR_MFR_WINBOND) {
|
|
|
+ /*
|
|
|
+ * On Winbond W25Q256FV, leaving 4byte mode causes
|
|
|
+ * the Extended Address Register to be set to 1, so all
|
|
|
+ * 3-byte-address reads come from the second 16M.
|
|
|
+ * We must clear the register to enable normal behavior.
|
|
|
+ */
|
|
|
+ write_enable(nor);
|
|
|
+ nor->cmd_buf[0] = 0;
|
|
|
+ nor->write_reg(nor, SPINOR_OP_WREAR, nor->cmd_buf, 1);
|
|
|
+ write_disable(nor);
|
|
|
+ }
|
|
|
+
|
|
|
return status;
|
|
|
default:
|
|
|
/* Spansion style */
|