[U-Boot] [PATCH 9/9] spi: spi_flash: Set Quad enable bit of upper flash
Siva Durga Prasad Paladugu
siva.durga.paladugu at xilinx.com
Mon Jun 6 11:44:54 CEST 2016
Set quad enable for upper flash incase of
Dual stacked mode.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur at xilinx.com>
---
drivers/mtd/spi/spi_flash.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
index 2de2a35..7caf905 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -1164,6 +1164,17 @@ int spi_flash_scan(struct spi_flash *flash)
debug("SF: Fail to set QEB for %02x\n", idcode[0]);
return -EINVAL;
}
+#ifdef CONFIG_SF_DUAL_FLASH
+ if (flash->dual_flash & SF_DUAL_STACKED_FLASH) {
+ flash->spi->flags |= SPI_XFER_U_PAGE;
+ if (set_quad_mode(flash, idcode[0])) {
+ debug("SF: Fail to set QEB Upper Flash %02x\n",
+ idcode[0]);
+ return 0;
+ }
+ flash->spi->flags &= ~SPI_XFER_U_PAGE;
+ }
+#endif
}
/* Read dummy_byte: dummy byte is determined based on the
--
1.7.1
More information about the U-Boot
mailing list