Skip to content

Commit 8b6587a

Browse files
committed
Unified single_status_byte & no_reset_cmd behavior
1 parent 9e01bb2 commit 8b6587a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

supervisor/shared/external_flash/external_flash.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,13 +244,14 @@ void supervisor_flash_init(void) {
244244
do {
245245
spi_flash_read_command(CMD_READ_STATUS, read_status_response, 1);
246246
} while ((read_status_response[0] & 0x1) != 0);
247-
248-
if (!(flash_device->no_reset_cmd)){
247+
if (!flash_device->single_status_byte) {
249248
// The suspended write/erase bit should be low.
250249
do {
251250
spi_flash_read_command(CMD_READ_STATUS2, read_status_response, 1);
252251
} while ((read_status_response[0] & 0x80) != 0);
253-
} else {
252+
}
253+
254+
if (!(flash_device->no_reset_cmd)){
254255
spi_flash_command(CMD_ENABLE_RESET);
255256
spi_flash_command(CMD_RESET);
256257
}

0 commit comments

Comments
 (0)