From c2b9a85d8bc0a16d3fbef295f755e09d5a52b77c Mon Sep 17 00:00:00 2001 From: Siva Durga Prasad Paladugu Date: Thu, 22 Dec 2016 14:12:31 +0530 Subject: [UBOOT PATCH] spi: Select lower flash while reading Id again Select lower flash while reading Id gaian for Spansion. We alreasdy read the Ids from both the flashes and hence reading from lower flash should be sufficient. Reading the Id with out specifying the flash causes error in case of dual parallel and this patch fixed it. Signed-off-by: Siva Durga Prasad Paladugu --- drivers/mtd/spi/spi_flash.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c index 1caa49d..665fee8 100644 --- a/drivers/mtd/spi/spi_flash.c +++ b/drivers/mtd/spi/spi_flash.c @@ -1259,6 +1259,11 @@ int spi_flash_scan(struct spi_flash *flash) int ret; u8 id[6]; +#ifdef CONFIG_SPI_GENERIC + if (spi->option & SF_DUAL_PARALLEL_FLASH) + flash->spi->flags |= SPI_XFER_LOWER; +#endif + /* Read the ID codes again, 6 bytes */ ret = spi_flash_cmd(flash->spi, CMD_READ_ID, id, sizeof(id)); if (ret) -- 2.7.4