change(gpspi): control hal function placement in the driver component

This commit is contained in:
morris 2025-01-24 16:21:55 +08:00
parent 23ce1cc47d
commit 11e66825a0
4 changed files with 8 additions and 19 deletions

View File

@ -24,7 +24,6 @@ menu "ESP-Driver:SPI Configurations"
default y
depends on !HEAP_PLACE_FUNCTION_INTO_FLASH
select PERIPH_CTRL_FUNC_IN_IRAM
select HAL_SPI_MASTER_FUNC_IN_IRAM
select ESP_SPI_BUS_LOCK_ISR_FUNCS_IN_IRAM
select GDMA_CTRL_FUNC_IN_IRAM if SOC_GDMA_SUPPORTED
help
@ -54,7 +53,6 @@ menu "ESP-Driver:SPI Configurations"
bool "Place SPI slave ISR function into IRAM"
default y
select PERIPH_CTRL_FUNC_IN_IRAM
select HAL_SPI_SLAVE_FUNC_IN_IRAM
select GDMA_CTRL_FUNC_IN_IRAM if SOC_GDMA_SUPPORTED
help
Place the SPI slave ISR in to IRAM to avoid possible cache miss.

View File

@ -8,3 +8,11 @@ entries:
if SOC_SPI_SUPPORT_SLAVE_HD_VER2 = y:
spi_dma: spi_dma_get_eof_desc (noflash)
[mapping:gpspi_hal]
archive: libhal.a
entries:
if SPI_MASTER_ISR_IN_IRAM = y:
spi_hal_iram (noflash)
if SPI_SLAVE_ISR_IN_IRAM = y:
spi_slave_hal_iram (noflash)

View File

@ -91,18 +91,6 @@ menu "Hardware Abstraction Layer (HAL) and Low Level (LL)"
features will be added and bugs will be fixed in the IDF source
but cannot be synced to ROM.
config HAL_SPI_MASTER_FUNC_IN_IRAM
bool
depends on SPI_MASTER_ISR_IN_IRAM
help
Enable this option to place SPI master hal layer functions into IRAM.
config HAL_SPI_SLAVE_FUNC_IN_IRAM
bool
depends on SPI_SLAVE_ISR_IN_IRAM
help
Enable this option to place SPI slave hal layer functions into IRAM.
config HAL_ECDSA_GEN_SIG_CM
bool "Enable countermeasure for ECDSA signature generation"
depends on IDF_TARGET_ESP32H2

View File

@ -9,11 +9,6 @@ entries:
cache_hal_esp32 (noflash)
else:
cache_hal (noflash)
if SOC_GPSPI_SUPPORTED = y:
if HAL_SPI_MASTER_FUNC_IN_IRAM = y:
spi_hal_iram (noflash)
if HAL_SPI_SLAVE_FUNC_IN_IRAM = y:
spi_slave_hal_iram (noflash)
if SOC_I2C_SUPPORTED = y:
i2c_hal_iram (noflash)
if HAL_WDT_USE_ROM_IMPL = n: