Merge branch 'bugfix/revert_c5_threshold_changes' into 'master'

Revert "fix(rom): fixed esprv_int_set_threshold on C5/C61"

See merge request espressif/esp-idf!31506
This commit is contained in:
Marius Vikhammer 2024-06-14 16:17:12 +08:00
commit 244c0fa2b0
10 changed files with 6 additions and 23 deletions

View File

@ -70,7 +70,7 @@ if(CONFIG_HAL_WDT_USE_ROM_IMPL)
list(APPEND sources "patches/esp_rom_wdt.c")
endif()
if(CONFIG_ESP_ROM_CLIC_INT_TYPE_PATCH OR CONFIG_ESP_ROM_CLIC_INT_THRESH_PATCH)
if(CONFIG_ESP_ROM_CLIC_INT_TYPE_PATCH)
list(APPEND sources "patches/esp_rom_clic.c")
endif()

View File

@ -86,7 +86,3 @@ config ESP_ROM_SUPPORT_DEEP_SLEEP_WAKEUP_STUB
config ESP_ROM_HAS_OUTPUT_PUTC_FUNC
bool
default y
config ESP_ROM_CLIC_INT_THRESH_PATCH
bool
default y

View File

@ -27,4 +27,3 @@
#define ESP_ROM_HAS_VERSION (1) // ROM has version/eco information
#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.
#define ESP_ROM_HAS_OUTPUT_PUTC_FUNC (1) // ROM has esp_rom_output_putc (or ets_write_char_uart)
#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

View File

@ -276,6 +276,7 @@ gpio_pad_hold = 0x40000740;
/* Functions */
esprv_intc_int_set_priority = 0x40000744;
esprv_intc_int_set_threshold = 0x40000748;
esprv_intc_int_enable = 0x4000074c;
esprv_intc_int_disable = 0x40000750;
esprv_intc_int_set_type = 0x40000754;

View File

@ -90,7 +90,3 @@ config ESP_ROM_USB_OTG_NUM
config ESP_ROM_HAS_OUTPUT_PUTC_FUNC
bool
default y
config ESP_ROM_CLIC_INT_THRESH_PATCH
bool
default y

View File

@ -30,4 +30,3 @@
#define ESP_ROM_HAS_SW_FLOAT (1) // ROM has libgcc software floating point emulation functions
#define ESP_ROM_USB_OTG_NUM (-1) // No USB_OTG CDC in the ROM, set -1 for Kconfig usage.
#define ESP_ROM_HAS_OUTPUT_PUTC_FUNC (1) // ROM has esp_rom_output_putc (or ets_write_char_uart)
#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

View File

@ -278,6 +278,7 @@ gpio_pad_hold = 0x40000724;
/* Functions */
esprv_intc_int_set_priority = 0x40000728;
esprv_intc_int_set_threshold = 0x4000072c;
esprv_intc_int_enable = 0x40000730;
esprv_intc_int_disable = 0x40000734;
esprv_intc_int_set_type = 0x40000738;

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -7,7 +7,6 @@
#include "esp_rom_caps.h"
#include "soc/clic_reg.h"
#include "riscv/interrupt.h"
#include "riscv/rv_utils.h"
#if ESP_ROM_CLIC_INT_TYPE_PATCH
@ -21,11 +20,3 @@ void esprv_int_set_type(int rv_int_num, enum intr_type type)
REG_SET_FIELD(CLIC_INT_CTRL_REG(rv_int_num + CLIC_EXT_INTR_NUM_OFFSET), CLIC_INT_ATTR_TRIG, type);
}
#endif
#if ESP_ROM_CLIC_INT_THRESH_PATCH
void esprv_int_set_threshold(int priority_threshold)
{
/* ROM functions assume minimum MINTTHRESH is 0x1F, but it is actually 0xF */
rv_utils_set_intlevel(priority_threshold);
}
#endif //ESP_ROM_CLIC_INT_THRESH_PATCH

View File

@ -10,7 +10,7 @@
extern "C" {
#endif
#define NLBITS 4
#define NLBITS 3
#define CLIC_EXT_INTR_NUM_OFFSET 16
#define DUALCORE_CLIC_CTRL_OFF 0x10000

View File

@ -10,7 +10,7 @@
extern "C" {
#endif
#define NLBITS 4
#define NLBITS 3
#define CLIC_EXT_INTR_NUM_OFFSET 16
#define DR_REG_CLIC_BASE (0x20800000)