There is no need to read bank address register when working
in 4-byte mode and hence bypass it.
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
/* Configure the BAR - discover bank cmds and read current bank */
#ifdef CONFIG_SPI_FLASH_BAR
- ret = read_bar(flash, info);
- if (ret < 0)
- return ret;
+ if (flash->spi->bytemode != SPI_4BYTE_MODE) {
+ ret = read_bar(flash, info);
+ if (ret < 0)
+ return ret;
+ }
#endif
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)