SPI erase, write and read operations were not happening properly and due to
this compare operation was getting failed. This patch checks addressing
mode before calling clean_bar() function. There is no need to set bank
address in 4 bytes addressing mode. This is to be inline with write_bar()
function.
Signed-off-by: Vipul Kumar <vipulk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
len -= erase_size;
}
+ if (flash->spi->bytemode != SPI_4BYTE_MODE) {
#ifdef CONFIG_SPI_FLASH_BAR
- ret = clean_bar(flash);
+ ret = clean_bar(flash);
#endif
+ }
return ret;
}
offset += chunk_len;
}
+ if (flash->spi->bytemode != SPI_4BYTE_MODE) {
#ifdef CONFIG_SPI_FLASH_BAR
- ret = clean_bar(flash);
+ ret = clean_bar(flash);
#endif
+ }
return ret;
}
spi->dummy_bytes = 0;
+ if (flash->spi->bytemode != SPI_4BYTE_MODE) {
#ifdef CONFIG_SPI_FLASH_BAR
- ret = clean_bar(flash);
+ ret = clean_bar(flash);
#endif
+ }
free(cmd);
return ret;