From 528fd4934ef3a34d82d98a207ce4f07cec880afa Mon Sep 17 00:00:00 2001 From: Siva Durga Prasad Paladugu Date: Mon, 24 Feb 2014 11:36:55 +0530 Subject: [PATCH] sf: Set QUAD enable of upper flash in Dual Stacked Sets the QUAD enable bit for upper flash incase of dual stacked mode. This fixes the issue of where the quad enable bit of the upperflash was not set and hence not able to access the upperflash using quad commands in Dual stacked mode. Signed-off-by: Siva Durga Prasad Paladugu Signed-off-by: Michal Simek --- drivers/mtd/spi/sf_probe.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c index 2730daa4de1..083c52491e1 100644 --- a/drivers/mtd/spi/sf_probe.c +++ b/drivers/mtd/spi/sf_probe.c @@ -192,6 +192,17 @@ static struct spi_flash *spi_flash_validate_params(struct spi_slave *spi, debug("SF: Fail to set QEB for %02x\n", idcode[0]); return NULL; } +#ifdef CONFIG_SF_DUAL_FLASH + if (flash->dual_flash & SF_DUAL_STACKED_FLASH) { + flash->spi->flags |= SPI_XFER_U_PAGE; + if (spi_flash_set_qeb(flash, idcode[0])) { + debug("SF: Fail to set QEB Upper Flash %02x\n", + idcode[0]); + return NULL; + } + flash->spi->flags &= ~SPI_XFER_U_PAGE; + } +#endif } /* Read dummy_byte: dummy byte is determined based on the -- 2.47.3