It should go to 3-byte mode if flash size is less than or
equal to 16MiB. This patch corrects the if condition for
going to 3-byte mode.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* and make sure the chip (> 16MiB) in default 3-byte address mode,
* in case of warm bootup, the chip was set to 4-byte mode in kernel.
*/
- if (((flash->size >> flash->shift) < SPI_FLASH_16MB_BOUN) &&
+ if (((flash->size >> flash->shift) <= SPI_FLASH_16MB_BOUN) &&
(flash->spi->bytemode == SPI_4BYTE_MODE))
/*
* Clear the 4-byte support if the flash size is