Skip to content

Commit 96c3f6c

Browse files
committed
Merge branch 'fix/build_when_rom_patch_disable_v5.4' into 'release/v5.4'
fix(spi_flash): Fix build fail when rom_patch config disabled (backport v5.4) See merge request espressif/esp-idf!37103
2 parents f9ae8df + 569ac03 commit 96c3f6c

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

components/esp_rom/patches/esp_rom_spiflash.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -21,8 +21,6 @@
2121

2222
#define SPI_IDX 1
2323

24-
#if CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
25-
2624
#if CONFIG_IDF_TARGET_ESP32
2725

2826
extern esp_rom_spiflash_chip_t g_rom_spiflash_chip;
@@ -108,6 +106,12 @@ __attribute__((__unused__)) esp_rom_spiflash_result_t esp_rom_spiflash_clear_bp(
108106
}
109107
esp_rom_spiflash_result_t esp_rom_spiflash_unlock(void) __attribute__((alias("esp_rom_spiflash_clear_bp")));
110108

109+
#endif // CONFIG_IDF_TARGET_ESP32
110+
111+
#if CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
112+
113+
#if CONFIG_IDF_TARGET_ESP32
114+
111115
static esp_rom_spiflash_result_t esp_rom_spiflash_enable_write(esp_rom_spiflash_chip_t *spi);
112116

113117
//only support spi1

components/spi_flash/spi_flash_chip_generic.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -839,11 +839,6 @@ esp_err_t spi_flash_common_set_io_mode(esp_flash_t *chip, esp_flash_wrsr_func_t
839839

840840
esp_err_t spi_flash_chip_generic_suspend_cmd_conf(esp_flash_t *chip)
841841
{
842-
// chips which support auto-suspend
843-
if (chip->chip_id >> 16 != 0x20 && chip->chip_id >> 16 != 0xa1 && chip->chip_id >> 16 != 0x46) {
844-
ESP_EARLY_LOGE(TAG, "The flash you use doesn't support auto suspend, only \'XMC\' is supported");
845-
return ESP_ERR_NOT_SUPPORTED;
846-
}
847842
spi_flash_sus_cmd_conf sus_conf = {
848843
.sus_mask = 0x80,
849844
.cmd_rdsr = CMD_RDSR2,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=n

0 commit comments

Comments
 (0)