Skip to content

Commit 11d9465

Browse files
committed
Merge branch 'bugfix/revert_c5_threshold_changes_v5.3' into 'release/v5.3'
Revert "fix(rom): fixed esprv_int_set_threshold on C5" (v5.3) See merge request espressif/esp-idf!31507
2 parents 0a1dc07 + d6eedc0 commit 11d9465

File tree

7 files changed

+5
-18
lines changed

7 files changed

+5
-18
lines changed

components/esp_rom/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ if(CONFIG_HAL_WDT_USE_ROM_IMPL)
6969
list(APPEND sources "patches/esp_rom_wdt.c")
7070
endif()
7171

72-
if(CONFIG_ESP_ROM_CLIC_INT_TYPE_PATCH OR CONFIG_ESP_ROM_CLIC_INT_THRESH_PATCH)
72+
if(CONFIG_ESP_ROM_CLIC_INT_TYPE_PATCH)
7373
list(APPEND sources "patches/esp_rom_clic.c")
7474
endif()
7575

components/esp_rom/esp32c5/mp/esp32c5/Kconfig.soc_caps.in

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,3 @@ config ESP_ROM_HAS_VERSION
8282
config ESP_ROM_SUPPORT_DEEP_SLEEP_WAKEUP_STUB
8383
bool
8484
default y
85-
86-
config ESP_ROM_CLIC_INT_THRESH_PATCH
87-
bool
88-
default y

components/esp_rom/esp32c5/mp/esp32c5/esp_rom_caps.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@
2828
#define ESP_ROM_RAM_APP_NEEDS_MMU_INIT (1) // ROM doesn't init cache MMU when it's a RAM APP, needs MMU hal to init
2929
#define ESP_ROM_HAS_VERSION (1) // ROM has version/eco information
3030
#define ESP_ROM_SUPPORT_DEEP_SLEEP_WAKEUP_STUB (1) // ROM supports the HP core to jump to the RTC memory to execute stub code after waking up from deepsleep.
31-
#define ESP_ROM_CLIC_INT_THRESH_PATCH (1) // ROM version of esprv_intc_int_set_threshold incorrectly assumes lowest MINTTHRESH is 0x1F, should be 0xF

components/esp_rom/esp32c5/mp/esp32c5/ld/esp32c5.rom.ld

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ gpio_pad_hold = 0x40000740;
276276

277277
/* Functions */
278278
esprv_intc_int_set_priority = 0x40000744;
279+
esprv_intc_int_set_threshold = 0x40000748;
279280
esprv_intc_int_enable = 0x4000074c;
280281
esprv_intc_int_disable = 0x40000750;
281282
esprv_intc_int_set_type = 0x40000754;
Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
/*
2-
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

77
#include "esp_rom_caps.h"
88
#include "soc/clic_reg.h"
99
#include "riscv/interrupt.h"
10-
#include "riscv/rv_utils.h"
1110

1211
#if ESP_ROM_CLIC_INT_TYPE_PATCH
1312

@@ -21,11 +20,3 @@ void esprv_int_set_type(int rv_int_num, enum intr_type type)
2120
REG_SET_FIELD(CLIC_INT_CTRL_REG(rv_int_num + CLIC_EXT_INTR_NUM_OFFSET), CLIC_INT_ATTR_TRIG, type);
2221
}
2322
#endif
24-
25-
#if ESP_ROM_CLIC_INT_THRESH_PATCH
26-
void esprv_int_set_threshold(int priority_threshold)
27-
{
28-
/* ROM functions assume minimum MINTTHRESH is 0x1F, but it is actually 0xF */
29-
rv_utils_set_intlevel(priority_threshold);
30-
}
31-
#endif //ESP_ROM_CLIC_INT_THRESH_PATCH

components/soc/esp32c5/mp/include/soc/clic_reg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
extern "C" {
1111
#endif
1212

13-
#define NLBITS 4
13+
#define NLBITS 3
1414
#define CLIC_EXT_INTR_NUM_OFFSET 16
1515
#define DUALCORE_CLIC_CTRL_OFF 0x10000
1616

components/soc/esp32c61/include/soc/clic_reg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
extern "C" {
1111
#endif
1212

13-
#define NLBITS 4
13+
#define NLBITS 3
1414
#define CLIC_EXT_INTR_NUM_OFFSET 16
1515

1616
#define DR_REG_CLIC_BASE (0x20800000)

0 commit comments

Comments
 (0)