|
@@ -2740,6 +2740,16 @@ static void spi_nor_resume(struct mtd_info *mtd)
|
|
|
dev_err(dev, "resume() failed\n");
|
|
|
}
|
|
|
|
|
|
+void spi_nor_restore(struct spi_nor *nor)
|
|
|
+{
|
|
|
+ /* restore the addressing mode */
|
|
|
+ if ((nor->addr_width == 4) &&
|
|
|
+ (JEDEC_MFR(nor->info) != SNOR_MFR_SPANSION) &&
|
|
|
+ !(nor->info->flags & SPI_NOR_4B_OPCODES))
|
|
|
+ set_4byte(nor, nor->info, 0);
|
|
|
+}
|
|
|
+EXPORT_SYMBOL_GPL(spi_nor_restore);
|
|
|
+
|
|
|
int spi_nor_scan(struct spi_nor *nor, const char *name,
|
|
|
const struct spi_nor_hwcaps *hwcaps)
|
|
|
{
|