From 7706cc8daf92b2e9ee54e8e1a09c20ad9fc86da8 Mon Sep 17 00:00:00 2001 From: jiangguangming Date: Tue, 14 Jun 2022 11:23:21 +0800 Subject: [PATCH] spi_flash: remove back-compatible with caller function of S3Beta ROM --- components/hal/spi_flash_hal_common.inc | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/components/hal/spi_flash_hal_common.inc b/components/hal/spi_flash_hal_common.inc index 60fed70431..d12cce8688 100644 --- a/components/hal/spi_flash_hal_common.inc +++ b/components/hal/spi_flash_hal_common.inc @@ -135,16 +135,11 @@ esp_err_t spi_flash_hal_common_command(spi_flash_host_inst_t *host, spi_flash_tr esp_flash_io_mode_t io_mode = ((spi_flash_hal_context_t*)host)->base_io_mode; uint16_t command; uint8_t dummy_bitlen; - if (trans->reserved != 0) { - // Back-compatible with caller functions of ESP32-S3 ROM - command = (uint8_t)trans->reserved; - dummy_bitlen = 0; - } else { - command = trans->command; - dummy_bitlen = trans->dummy_bitlen; - if ((trans->flags & SPI_FLASH_TRANS_FLAG_IGNORE_BASEIO) != 0) { - io_mode = trans->io_mode; - } + + command = trans->command; + dummy_bitlen = trans->dummy_bitlen; + if ((trans->flags & SPI_FLASH_TRANS_FLAG_IGNORE_BASEIO) != 0) { + io_mode = trans->io_mode; } host->driver->configure_host_io_mode(host, command, trans->address_bitlen, dummy_bitlen, io_mode);