Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/flash/spi_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ static int spi_flash_configure_device (const struct spi_flash *flash, bool wake_

if (reset_device) {
status = spi_flash_reset_device (flash);
if (status != 0) {
if ((status != 0) && (status != SPI_FLASH_RESET_NOT_SUPPORTED)) {
goto exit;
}
}
Expand Down
8 changes: 7 additions & 1 deletion core/flash/spi_flash_sfdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,13 @@ int spi_flash_sfdp_get_4byte_mode_switch (const struct spi_flash_sfdp_basic_tabl

params = (struct spi_flash_sfdp_basic_parameter_table_1_5*) table->data;
if (table->sfdp->sfdp_header.parameter0.minor_revision >= 5) {
if ((params->enter_4b & 0x7f) == 0) {

// 4 bytes only flash, no switch command available:
if ((params->table_1_0.dspi_qspi & SPI_FLASH_SFDP_ADDRESS_BYTES) ==
SPI_FLASH_SFDP_4BYTE_ONLY) {
*addr_4byte = SPI_FLASH_SFDP_4BYTE_MODE_FIXED;
}
else if ((params->enter_4b & 0x7f) == 0) {
*addr_4byte = SPI_FLASH_SFDP_4BYTE_MODE_UNSUPPORTED;
}
else if ((params->enter_4b & SPI_FLASH_SFDP_4B_ENTER_B7) &&
Expand Down