Skip to content

Commit e1c2dde

Browse files
committed
Merge branch 'fix/esp32p4_eco5_clic' into 'master'
fix: get rid of the hardware workarounds for the latest ESP32P4 revision Closes IDF-13409, IDF-13781, and IDF-13782 See merge request espressif/esp-idf!41719
2 parents 0ac9dfb + cea17be commit e1c2dde

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

components/esp_rom/esp32p4/esp_rom_caps.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
#define ESP_ROM_HAS_NEWLIB_NANO_FORMAT (1) // ROM has the newlib nano version of formatting functions
2626
#define ESP_ROM_HAS_NEWLIB_NANO_PRINTF_FLOAT_BUG (1) // ROM has the printf float bug with newlib nano version
2727
#define ESP_ROM_HAS_VERSION (1) // ROM has version/eco information
28-
#define ESP_ROM_CLIC_INT_TYPE_PATCH (1) // ROM api esprv_intc_int_set_type configuring edge type interrupt is invalid TODO: IDF-13409
28+
#define ESP_ROM_CLIC_INT_TYPE_PATCH (1) // ROM api esprv_intc_int_set_type configuring edge type interrupt (old revisions)
2929
#define ESP_ROM_HAS_OUTPUT_PUTC_FUNC (1) // ROM has esp_rom_output_putc (or ets_write_char_uart)
3030
#define ESP_ROM_HAS_SUBOPTIMAL_NEWLIB_ON_MISALIGNED_MEMORY (1) // ROM mem/str functions are not optimized well for misaligned memory access.

components/esp_rom/patches/esp_rom_clic.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
/*
2-
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7+
#include "sdkconfig.h"
78
#include "esp_rom_caps.h"
89
#include "soc/clic_reg.h"
910
#include "riscv/interrupt.h"
1011

11-
#if ESP_ROM_CLIC_INT_TYPE_PATCH
12+
#if ESP_ROM_CLIC_INT_TYPE_PATCH && CONFIG_ESP32P4_SELECTS_REV_LESS_V3
1213

1314
/* Rom api esprv_intc_int_set_type, if the configured interrupt type is INTR_TYPE_EDGE,
1415
* the actual configured type is still INTR_TYPE_LEVEL. So the patch is to solve this issue.

components/riscv/vectors.S

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,8 @@ hwlp_not_used:
278278
* For example, bit 1 can be set and bit 0 won't, even if the reason is an FPU instruction. */
279279
andi a1, a0, EXT_ILL_RSN_FPU
280280
bnez a1, rtos_save_fpu_coproc
281-
#if SOC_CPU_HAS_FPU_EXT_ILL_BUG
281+
/* The FPU_EXT_ILL bug was fixed on revision 3.0 and higher */
282+
#if SOC_CPU_HAS_FPU_EXT_ILL_BUG && CONFIG_ESP32P4_SELECTS_REV_LESS_V3
282283
/* If the SOC present the hardware EXT_ILL CSR bug, it doesn't support FPU load/store detection
283284
* so we have to check the instruction's opcode (in `mtval` = `t0`) */
284285
andi a0, t0, 0b1011111

0 commit comments

Comments
 (0)