From: Siva Durga Prasad Paladugu Date: Fri, 20 Jan 2017 09:45:00 +0000 (+0530) Subject: spi: spi_flash: Set quad enable for macronix upper flash X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6ae94e5f772f6b84ce2abe3ff1758b4baf4a5ff7;p=thirdparty%2Fu-boot.git spi: spi_flash: Set quad enable for macronix upper flash Set quad enable bit for upper flash as well in case of dual parallel when using generic qspi. Signed-off-by: Siva Durga Prasad Paladugu Signed-off-by: Michal Simek --- diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c index eee7a7fa4eb..169c3ea93df 100644 --- a/drivers/mtd/spi/spi_flash.c +++ b/drivers/mtd/spi/spi_flash.c @@ -1045,9 +1045,21 @@ static int macronix_quad_enable(struct spi_flash *flash) ) { debug("SF: mxic: QEB is already set\n"); } else { +#ifdef CONFIG_SPI_GENERIC + if (flash->dual_flash & SF_DUAL_PARALLEL_FLASH) + flash->spi->flags |= SPI_XFER_LOWER; +#endif ret = write_sr(flash, STATUS_QEB_MXIC); if (ret < 0) return ret; +#ifdef CONFIG_SPI_GENERIC + if (flash->dual_flash & SF_DUAL_PARALLEL_FLASH) { + flash->spi->flags |= SPI_XFER_UPPER; + ret = write_sr(flash, STATUS_QEB_MXIC); + if (ret < 0) + return ret; + } +#endif } return ret;