From 35bdd8c651f1fca0fc0026d40527bc4ae83fdf1e Mon Sep 17 00:00:00 2001 From: morris Date: Tue, 20 Jan 2026 23:39:33 +0800 Subject: [PATCH] feat(dma): graduate the dma driver from esp_hw_support to esp_driver_dma --- components/esp_adc/CMakeLists.txt | 2 +- .../esp_driver_bitscrambler/CMakeLists.txt | 2 +- components/esp_driver_cam/CMakeLists.txt | 2 +- components/esp_driver_dma/CMakeLists.txt | 50 +++++++++++++++++++ .../Kconfig.dma => esp_driver_dma/Kconfig} | 0 .../include/esp_async_memcpy.h | 1 + .../include/esp_dma_utils.h | 1 - .../include/esp_private/dma2d.h | 1 - .../include/esp_private/dw_gdma.h | 0 .../include/esp_private/esp_dma_utils.h | 0 .../include/esp_private/gdma.h | 0 .../include/esp_private/gdma_link.h | 0 .../dma => esp_driver_dma}/linker.lf | 6 +-- .../src}/async_memcpy_cp_dma.c | 0 .../src}/async_memcpy_gdma.c | 0 .../dma => esp_driver_dma/src}/dma2d.c | 9 ++-- .../dma => esp_driver_dma/src}/dma2d_priv.h | 0 .../dma => esp_driver_dma/src}/dw_gdma.c | 0 .../src}/esp_async_memcpy.c | 0 .../src}/esp_async_memcpy_priv.h | 0 .../src}/esp_dma_utils.c | 0 .../dma => esp_driver_dma/src}/gdma.c | 0 .../dma => esp_driver_dma/src}/gdma_crc.c | 0 .../dma => esp_driver_dma/src}/gdma_etm.c | 0 .../dma => esp_driver_dma/src}/gdma_link.c | 0 .../dma => esp_driver_dma/src}/gdma_priv.h | 0 .../src}/gdma_sleep_retention.c | 0 .../test_apps/.build-test-rules.yml | 16 ++++++ .../test_apps/dma/CMakeLists.txt | 6 +-- .../test_apps/dma/README.md | 0 .../test_apps/dma/main/CMakeLists.txt | 2 +- .../test_apps/dma/main/gdma_test_utils.c | 0 .../test_apps/dma/main/gdma_test_utils.h | 0 .../test_apps/dma/main/idf_component.yml | 0 .../test_apps/dma/main/test_app_main.c | 0 .../test_apps/dma/main/test_async_memcpy.c | 6 +-- .../test_apps/dma/main/test_dw_gdma.c | 0 .../test_apps/dma/main/test_gdma.c | 0 .../test_apps/dma/main/test_gdma_crc.c | 0 .../test_apps/dma/main/test_gdma_etm.c | 0 .../test_apps/dma/pytest_dma.py | 0 .../dma/sdkconfig.ci.ext_mem_encryption | 0 .../test_apps/dma/sdkconfig.ci.release | 0 .../dma/sdkconfig.ci.weighted_arbitration | 0 .../test_apps/dma/sdkconfig.defaults | 0 .../test_apps/dma/sdkconfig.defaults.esp32c5 | 0 .../test_apps/dma/sdkconfig.defaults.esp32c61 | 0 .../test_apps/dma/sdkconfig.defaults.esp32p4 | 0 .../test_apps/dma/sdkconfig.defaults.esp32s3 | 0 .../test_apps/dma2d/CMakeLists.txt | 5 +- .../test_apps/dma2d/README.md | 0 .../test_apps/dma2d/main/CMakeLists.txt | 2 +- .../test_apps/dma2d/main/dma2d_test_utils.c | 0 .../test_apps/dma2d/main/dma2d_test_utils.h | 0 .../test_apps/dma2d/main/test_app_main.c | 0 .../test_apps/dma2d/main/test_dma2d.c | 20 ++++---- .../test_apps/dma2d/pytest_dma2d.py | 0 .../test_apps/dma2d/sdkconfig.ci.release | 0 .../test_apps/dma2d/sdkconfig.defaults | 0 .../dma2d/sdkconfig.defaults.esp32p4 | 0 components/esp_driver_i2s/CMakeLists.txt | 2 +- components/esp_driver_i3c/CMakeLists.txt | 2 +- components/esp_driver_i3c/linker.lf | 2 +- components/esp_driver_jpeg/CMakeLists.txt | 2 +- components/esp_driver_parlio/CMakeLists.txt | 2 +- components/esp_driver_parlio/linker.lf | 2 +- components/esp_driver_ppa/CMakeLists.txt | 2 +- components/esp_driver_rmt/CMakeLists.txt | 2 +- components/esp_driver_rmt/linker.lf | 2 +- components/esp_driver_spi/CMakeLists.txt | 4 +- components/esp_driver_uart/CMakeLists.txt | 2 +- components/esp_driver_uart/linker.lf | 2 +- components/esp_hal_ana_conv/CMakeLists.txt | 2 +- components/esp_hal_gpspi/CMakeLists.txt | 2 +- .../test_apps/crypto/main/CMakeLists.txt | 2 +- components/esp_hw_support/CMakeLists.txt | 39 ++------------- components/esp_hw_support/Kconfig | 1 - components/esp_hw_support/README.md | 11 ---- .../test_apps/.build-test-rules.yml | 17 ------- components/esp_lcd/CMakeLists.txt | 2 +- components/esp_lcd/linker.lf | 4 +- components/esp_mm/CMakeLists.txt | 2 +- components/esp_mm/heap_align_hw.c | 1 - components/esp_system/CMakeLists.txt | 3 +- components/mbedtls/CMakeLists.txt | 11 ++-- .../mbedtls/esp_tee/esp_tee_mbedtls.cmake | 2 +- components/sdmmc/include/sd_protocol_types.h | 1 - docs/doxygen/Doxyfile | 2 +- .../release-6.x/6.0/peripherals.rst | 5 +- .../release-6.x/6.0/peripherals.rst | 5 +- .../system/g1_components/CMakeLists.txt | 3 ++ 91 files changed, 139 insertions(+), 133 deletions(-) create mode 100644 components/esp_driver_dma/CMakeLists.txt rename components/{esp_hw_support/dma/Kconfig.dma => esp_driver_dma/Kconfig} (100%) rename components/{esp_hw_support => esp_driver_dma}/include/esp_async_memcpy.h (99%) rename components/{esp_hw_support/dma => esp_driver_dma}/include/esp_dma_utils.h (99%) rename components/{esp_hw_support/dma => esp_driver_dma}/include/esp_private/dma2d.h (99%) rename components/{esp_hw_support/dma => esp_driver_dma}/include/esp_private/dw_gdma.h (100%) rename components/{esp_hw_support/dma => esp_driver_dma}/include/esp_private/esp_dma_utils.h (100%) rename components/{esp_hw_support/dma => esp_driver_dma}/include/esp_private/gdma.h (100%) rename components/{esp_hw_support/dma => esp_driver_dma}/include/esp_private/gdma_link.h (100%) rename components/{esp_hw_support/dma => esp_driver_dma}/linker.lf (98%) rename components/{esp_hw_support/dma => esp_driver_dma/src}/async_memcpy_cp_dma.c (100%) rename components/{esp_hw_support/dma => esp_driver_dma/src}/async_memcpy_gdma.c (100%) rename components/{esp_hw_support/dma => esp_driver_dma/src}/dma2d.c (99%) rename components/{esp_hw_support/dma => esp_driver_dma/src}/dma2d_priv.h (100%) rename components/{esp_hw_support/dma => esp_driver_dma/src}/dw_gdma.c (100%) rename components/{esp_hw_support/dma => esp_driver_dma/src}/esp_async_memcpy.c (100%) rename components/{esp_hw_support/dma => esp_driver_dma/src}/esp_async_memcpy_priv.h (100%) rename components/{esp_hw_support/dma => esp_driver_dma/src}/esp_dma_utils.c (100%) rename components/{esp_hw_support/dma => esp_driver_dma/src}/gdma.c (100%) rename components/{esp_hw_support/dma => esp_driver_dma/src}/gdma_crc.c (100%) rename components/{esp_hw_support/dma => esp_driver_dma/src}/gdma_etm.c (100%) rename components/{esp_hw_support/dma => esp_driver_dma/src}/gdma_link.c (100%) rename components/{esp_hw_support/dma => esp_driver_dma/src}/gdma_priv.h (100%) rename components/{esp_hw_support/dma => esp_driver_dma/src}/gdma_sleep_retention.c (100%) create mode 100644 components/esp_driver_dma/test_apps/.build-test-rules.yml rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma/CMakeLists.txt (69%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma/README.md (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma/main/CMakeLists.txt (97%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma/main/gdma_test_utils.c (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma/main/gdma_test_utils.h (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma/main/idf_component.yml (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma/main/test_app_main.c (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma/main/test_async_memcpy.c (99%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma/main/test_dw_gdma.c (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma/main/test_gdma.c (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma/main/test_gdma_crc.c (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma/main/test_gdma_etm.c (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma/pytest_dma.py (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma/sdkconfig.ci.ext_mem_encryption (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma/sdkconfig.ci.release (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma/sdkconfig.ci.weighted_arbitration (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma/sdkconfig.defaults (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma/sdkconfig.defaults.esp32c5 (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma/sdkconfig.defaults.esp32c61 (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma/sdkconfig.defaults.esp32p4 (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma/sdkconfig.defaults.esp32s3 (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma2d/CMakeLists.txt (65%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma2d/README.md (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma2d/main/CMakeLists.txt (81%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma2d/main/dma2d_test_utils.c (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma2d/main/dma2d_test_utils.h (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma2d/main/test_app_main.c (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma2d/main/test_dma2d.c (98%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma2d/pytest_dma2d.py (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma2d/sdkconfig.ci.release (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma2d/sdkconfig.defaults (100%) rename components/{esp_hw_support => esp_driver_dma}/test_apps/dma2d/sdkconfig.defaults.esp32p4 (100%) diff --git a/components/esp_adc/CMakeLists.txt b/components/esp_adc/CMakeLists.txt index af13e07c66..b37b5d0682 100644 --- a/components/esp_adc/CMakeLists.txt +++ b/components/esp_adc/CMakeLists.txt @@ -56,6 +56,6 @@ endif() idf_component_register(SRCS ${srcs} INCLUDE_DIRS ${includes} - PRIV_REQUIRES esp_driver_gpio efuse esp_pm esp_ringbuf esp_mm ${extra_requires} + PRIV_REQUIRES esp_driver_gpio esp_driver_dma efuse esp_pm esp_ringbuf esp_mm ${extra_requires} REQUIRES esp_hal_ana_conv LDFRAGMENTS linker.lf) diff --git a/components/esp_driver_bitscrambler/CMakeLists.txt b/components/esp_driver_bitscrambler/CMakeLists.txt index 2be1f9db05..3ab4ef5f58 100644 --- a/components/esp_driver_bitscrambler/CMakeLists.txt +++ b/components/esp_driver_bitscrambler/CMakeLists.txt @@ -11,6 +11,6 @@ endif() idf_component_register(SRCS ${srcs} REQUIRES "esp_hal_dma" - PRIV_REQUIRES "esp_mm" + PRIV_REQUIRES "esp_mm" "esp_driver_dma" INCLUDE_DIRS "include" LDFRAGMENTS "linker.lf") diff --git a/components/esp_driver_cam/CMakeLists.txt b/components/esp_driver_cam/CMakeLists.txt index f5e7a22d10..425eb76172 100644 --- a/components/esp_driver_cam/CMakeLists.txt +++ b/components/esp_driver_cam/CMakeLists.txt @@ -6,7 +6,7 @@ set(includes "include" "interface") set(requires "esp_driver_isp" "esp_hal_cam") -set(priv_requires "esp_driver_gpio") +set(priv_requires "esp_driver_gpio" "esp_driver_dma") if(CONFIG_SOC_MIPI_CSI_SUPPORTED) list(APPEND srcs "csi/src/esp_cam_ctlr_csi.c") diff --git a/components/esp_driver_dma/CMakeLists.txt b/components/esp_driver_dma/CMakeLists.txt new file mode 100644 index 0000000000..40671b0359 --- /dev/null +++ b/components/esp_driver_dma/CMakeLists.txt @@ -0,0 +1,50 @@ +idf_build_get_property(target IDF_TARGET) +if(${target} STREQUAL "linux") + return() # This component is not supported by the POSIX/Linux simulator +endif() + +set(public_include "include") +set(requires esp_hal_dma) +set(srcs "src/esp_dma_utils.c" "src/gdma_link.c") + +if(CONFIG_SOC_GDMA_SUPPORTED) + list(APPEND srcs "src/gdma.c") + if(CONFIG_SOC_GDMA_SUPPORT_SLEEP_RETENTION AND CONFIG_SOC_PAU_SUPPORTED) + list(APPEND srcs "src/gdma_sleep_retention.c") + endif() + if(CONFIG_SOC_GDMA_SUPPORT_ETM) + list(APPEND srcs "src/gdma_etm.c") + endif() + if(CONFIG_SOC_GDMA_SUPPORT_CRC) + list(APPEND srcs "src/gdma_crc.c") + endif() +endif() + +if(CONFIG_SOC_ASYNC_MEMCPY_SUPPORTED) + list(APPEND srcs "src/esp_async_memcpy.c") + if(CONFIG_SOC_GDMA_SUPPORTED) + list(APPEND srcs "src/async_memcpy_gdma.c") + endif() # CONFIG_SOC_GDMA_SUPPORTED + if(CONFIG_SOC_CP_DMA_SUPPORTED) + list(APPEND srcs "src/async_memcpy_cp_dma.c") + endif() # CONFIG_SOC_CP_DMA_SUPPORTED +endif() # CONFIG_SOC_ASYNC_MEMCPY_SUPPORTED + +if(CONFIG_SOC_DW_GDMA_SUPPORTED) + list(APPEND srcs "src/dw_gdma.c") +endif() + +if(CONFIG_SOC_DMA2D_SUPPORTED) + list(APPEND srcs "src/dma2d.c") +endif() + +idf_component_register(SRCS ${srcs} + INCLUDE_DIRS ${public_include} + REQUIRES ${requires} + PRIV_REQUIRES esp_mm + LDFRAGMENTS "linker.lf" + ) + +if(CONFIG_SPIRAM) + idf_component_optional_requires(PRIVATE esp_psram) +endif() diff --git a/components/esp_hw_support/dma/Kconfig.dma b/components/esp_driver_dma/Kconfig similarity index 100% rename from components/esp_hw_support/dma/Kconfig.dma rename to components/esp_driver_dma/Kconfig diff --git a/components/esp_hw_support/include/esp_async_memcpy.h b/components/esp_driver_dma/include/esp_async_memcpy.h similarity index 99% rename from components/esp_hw_support/include/esp_async_memcpy.h rename to components/esp_driver_dma/include/esp_async_memcpy.h index 770dff07c6..e6abff77b6 100644 --- a/components/esp_hw_support/include/esp_async_memcpy.h +++ b/components/esp_driver_dma/include/esp_async_memcpy.h @@ -62,6 +62,7 @@ typedef struct { #define ASYNC_MEMCPY_DEFAULT_CONFIG() \ { \ .backlog = 8, \ + .weight = 0, \ .dma_burst_size = 16, \ .flags = 0, \ } diff --git a/components/esp_hw_support/dma/include/esp_dma_utils.h b/components/esp_driver_dma/include/esp_dma_utils.h similarity index 99% rename from components/esp_hw_support/dma/include/esp_dma_utils.h rename to components/esp_driver_dma/include/esp_dma_utils.h index 78f3f6d616..ae6630b7b3 100644 --- a/components/esp_hw_support/dma/include/esp_dma_utils.h +++ b/components/esp_driver_dma/include/esp_dma_utils.h @@ -10,7 +10,6 @@ extern "C" { #endif - #ifdef __cplusplus } #endif diff --git a/components/esp_hw_support/dma/include/esp_private/dma2d.h b/components/esp_driver_dma/include/esp_private/dma2d.h similarity index 99% rename from components/esp_hw_support/dma/include/esp_private/dma2d.h rename to components/esp_driver_dma/include/esp_private/dma2d.h index 10c964d210..c508174298 100644 --- a/components/esp_hw_support/dma/include/esp_private/dma2d.h +++ b/components/esp_driver_dma/include/esp_private/dma2d.h @@ -173,7 +173,6 @@ esp_err_t dma2d_enqueue(dma2d_pool_handle_t dma2d_pool, const dma2d_trans_config */ esp_err_t dma2d_force_end(dma2d_trans_t *trans, bool *need_yield); - /*********************************************** DMA CHANNEL OPERATIONS ***********************************************/ /** diff --git a/components/esp_hw_support/dma/include/esp_private/dw_gdma.h b/components/esp_driver_dma/include/esp_private/dw_gdma.h similarity index 100% rename from components/esp_hw_support/dma/include/esp_private/dw_gdma.h rename to components/esp_driver_dma/include/esp_private/dw_gdma.h diff --git a/components/esp_hw_support/dma/include/esp_private/esp_dma_utils.h b/components/esp_driver_dma/include/esp_private/esp_dma_utils.h similarity index 100% rename from components/esp_hw_support/dma/include/esp_private/esp_dma_utils.h rename to components/esp_driver_dma/include/esp_private/esp_dma_utils.h diff --git a/components/esp_hw_support/dma/include/esp_private/gdma.h b/components/esp_driver_dma/include/esp_private/gdma.h similarity index 100% rename from components/esp_hw_support/dma/include/esp_private/gdma.h rename to components/esp_driver_dma/include/esp_private/gdma.h diff --git a/components/esp_hw_support/dma/include/esp_private/gdma_link.h b/components/esp_driver_dma/include/esp_private/gdma_link.h similarity index 100% rename from components/esp_hw_support/dma/include/esp_private/gdma_link.h rename to components/esp_driver_dma/include/esp_private/gdma_link.h diff --git a/components/esp_hw_support/dma/linker.lf b/components/esp_driver_dma/linker.lf similarity index 98% rename from components/esp_hw_support/dma/linker.lf rename to components/esp_driver_dma/linker.lf index 6a67e74021..d21636fd89 100644 --- a/components/esp_hw_support/dma/linker.lf +++ b/components/esp_driver_dma/linker.lf @@ -1,5 +1,5 @@ [mapping:gdma_driver] -archive: libesp_hw_support.a +archive: libesp_driver_dma.a entries: if GDMA_ISR_HANDLER_IN_IRAM = y: gdma: gdma_default_tx_isr (noflash) @@ -68,7 +68,7 @@ entries: gdma_hal_axi: gdma_axi_hal_reset (noflash) [mapping:dw_gdma_driver] -archive: libesp_hw_support.a +archive: libesp_driver_dma.a entries: # performance optimization, always put the DW_GDMA default interrupt handler in IRAM if SOC_DW_GDMA_SUPPORTED = y: @@ -88,7 +88,7 @@ entries: dw_gdma: dw_gdma_link_list_get_item (noflash) [mapping:dma2d_driver] -archive: libesp_hw_support.a +archive: libesp_driver_dma.a entries: # performance optimization, always put the 2D-DMA default interrupt handler in IRAM if SOC_DMA2D_SUPPORTED = y: diff --git a/components/esp_hw_support/dma/async_memcpy_cp_dma.c b/components/esp_driver_dma/src/async_memcpy_cp_dma.c similarity index 100% rename from components/esp_hw_support/dma/async_memcpy_cp_dma.c rename to components/esp_driver_dma/src/async_memcpy_cp_dma.c diff --git a/components/esp_hw_support/dma/async_memcpy_gdma.c b/components/esp_driver_dma/src/async_memcpy_gdma.c similarity index 100% rename from components/esp_hw_support/dma/async_memcpy_gdma.c rename to components/esp_driver_dma/src/async_memcpy_gdma.c diff --git a/components/esp_hw_support/dma/dma2d.c b/components/esp_driver_dma/src/dma2d.c similarity index 99% rename from components/esp_hw_support/dma/dma2d.c rename to components/esp_driver_dma/src/dma2d.c index 4b21325ebd..748dc00ca0 100644 --- a/components/esp_hw_support/dma/dma2d.c +++ b/components/esp_driver_dma/src/dma2d.c @@ -60,7 +60,6 @@ uint32_t dma2d_rx_channel_reserved_mask[DMA2D_LL_GET(INST_NUM)] = { [0 ... DMA2D // The most number of channels required for a 2D-DMA transaction (a PPA Blend operation requires 2 TX + 1 RX) #define DMA2D_MAX_CHANNEL_NUM_PER_TRANSACTION 3 - /* This static function is not thread-safe, group's spinlock protection should be added in its caller */ static bool acquire_free_channels_for_trans(dma2d_group_t *dma2d_group, const dma2d_trans_config_t *trans_desc, dma2d_trans_channel_info_t *channel_handle_array) { @@ -73,7 +72,7 @@ static bool acquire_free_channels_for_trans(dma2d_group_t *dma2d_group, const dm if (!trans_desc->specified_tx_channel_mask) { tx_free_channel_mask = dma2d_group->tx_channel_free_mask; tx_free_channel_mask &= (((trans_desc->channel_flags & DMA2D_CHANNEL_FUNCTION_FLAG_TX_REORDER) ? DMA2D_LL_TX_CHANNEL_SUPPORT_RO_MASK : UINT32_MAX) & - ((trans_desc->channel_flags & DMA2D_CHANNEL_FUNCTION_FLAG_TX_CSC) ? DMA2D_LL_TX_CHANNEL_SUPPORT_CSC_MASK : UINT32_MAX)); + ((trans_desc->channel_flags & DMA2D_CHANNEL_FUNCTION_FLAG_TX_CSC) ? DMA2D_LL_TX_CHANNEL_SUPPORT_CSC_MASK : UINT32_MAX)); tx_free_channel_mask &= ~dma2d_group->tx_channel_reserved_mask; if (trans_desc->channel_flags & DMA2D_CHANNEL_FUNCTION_FLAG_SIBLING) { uint32_t rx_channel_candidate = dma2d_group->rx_channel_free_mask & @@ -121,7 +120,7 @@ static bool acquire_free_channels_for_trans(dma2d_group_t *dma2d_group, const dm } else { rx_free_channel_mask = dma2d_group->rx_channel_free_mask; rx_free_channel_mask &= (((trans_desc->channel_flags & DMA2D_CHANNEL_FUNCTION_FLAG_RX_REORDER) ? DMA2D_LL_RX_CHANNEL_SUPPORT_RO_MASK : UINT32_MAX) & - ((trans_desc->channel_flags & DMA2D_CHANNEL_FUNCTION_FLAG_RX_CSC) ? DMA2D_LL_RX_CHANNEL_SUPPORT_CSC_MASK : UINT32_MAX)); + ((trans_desc->channel_flags & DMA2D_CHANNEL_FUNCTION_FLAG_RX_CSC) ? DMA2D_LL_RX_CHANNEL_SUPPORT_CSC_MASK : UINT32_MAX)); rx_free_channel_mask &= ~dma2d_group->rx_channel_reserved_mask; // As long as __builtin_popcount(rx_free_channel_mask) >= trans_desc->rx_channel_num, it can meet the criteria of "found" } @@ -910,8 +909,8 @@ esp_err_t dma2d_enqueue(dma2d_pool_handle_t dma2d_pool, const dma2d_trans_config dma2d_group_t *dma2d_group = dma2d_pool; if (trans_desc->specified_tx_channel_mask || trans_desc->specified_rx_channel_mask) { ESP_GOTO_ON_FALSE_ISR( - (trans_desc->specified_tx_channel_mask ? (trans_desc->specified_tx_channel_mask & dma2d_group->tx_channel_reserved_mask) : 1 ) && - (trans_desc->specified_rx_channel_mask ? (trans_desc->specified_rx_channel_mask & dma2d_group->rx_channel_reserved_mask) : 1 ), + (trans_desc->specified_tx_channel_mask ? (trans_desc->specified_tx_channel_mask & dma2d_group->tx_channel_reserved_mask) : 1) && + (trans_desc->specified_rx_channel_mask ? (trans_desc->specified_rx_channel_mask & dma2d_group->rx_channel_reserved_mask) : 1), ESP_ERR_INVALID_ARG, err, TAG, "specified channel(s) not reserved"); ESP_GOTO_ON_FALSE_ISR( (__builtin_popcount(trans_desc->specified_tx_channel_mask) == trans_desc->tx_channel_num) && diff --git a/components/esp_hw_support/dma/dma2d_priv.h b/components/esp_driver_dma/src/dma2d_priv.h similarity index 100% rename from components/esp_hw_support/dma/dma2d_priv.h rename to components/esp_driver_dma/src/dma2d_priv.h diff --git a/components/esp_hw_support/dma/dw_gdma.c b/components/esp_driver_dma/src/dw_gdma.c similarity index 100% rename from components/esp_hw_support/dma/dw_gdma.c rename to components/esp_driver_dma/src/dw_gdma.c diff --git a/components/esp_hw_support/dma/esp_async_memcpy.c b/components/esp_driver_dma/src/esp_async_memcpy.c similarity index 100% rename from components/esp_hw_support/dma/esp_async_memcpy.c rename to components/esp_driver_dma/src/esp_async_memcpy.c diff --git a/components/esp_hw_support/dma/esp_async_memcpy_priv.h b/components/esp_driver_dma/src/esp_async_memcpy_priv.h similarity index 100% rename from components/esp_hw_support/dma/esp_async_memcpy_priv.h rename to components/esp_driver_dma/src/esp_async_memcpy_priv.h diff --git a/components/esp_hw_support/dma/esp_dma_utils.c b/components/esp_driver_dma/src/esp_dma_utils.c similarity index 100% rename from components/esp_hw_support/dma/esp_dma_utils.c rename to components/esp_driver_dma/src/esp_dma_utils.c diff --git a/components/esp_hw_support/dma/gdma.c b/components/esp_driver_dma/src/gdma.c similarity index 100% rename from components/esp_hw_support/dma/gdma.c rename to components/esp_driver_dma/src/gdma.c diff --git a/components/esp_hw_support/dma/gdma_crc.c b/components/esp_driver_dma/src/gdma_crc.c similarity index 100% rename from components/esp_hw_support/dma/gdma_crc.c rename to components/esp_driver_dma/src/gdma_crc.c diff --git a/components/esp_hw_support/dma/gdma_etm.c b/components/esp_driver_dma/src/gdma_etm.c similarity index 100% rename from components/esp_hw_support/dma/gdma_etm.c rename to components/esp_driver_dma/src/gdma_etm.c diff --git a/components/esp_hw_support/dma/gdma_link.c b/components/esp_driver_dma/src/gdma_link.c similarity index 100% rename from components/esp_hw_support/dma/gdma_link.c rename to components/esp_driver_dma/src/gdma_link.c diff --git a/components/esp_hw_support/dma/gdma_priv.h b/components/esp_driver_dma/src/gdma_priv.h similarity index 100% rename from components/esp_hw_support/dma/gdma_priv.h rename to components/esp_driver_dma/src/gdma_priv.h diff --git a/components/esp_hw_support/dma/gdma_sleep_retention.c b/components/esp_driver_dma/src/gdma_sleep_retention.c similarity index 100% rename from components/esp_hw_support/dma/gdma_sleep_retention.c rename to components/esp_driver_dma/src/gdma_sleep_retention.c diff --git a/components/esp_driver_dma/test_apps/.build-test-rules.yml b/components/esp_driver_dma/test_apps/.build-test-rules.yml new file mode 100644 index 0000000000..e0fd96d7e3 --- /dev/null +++ b/components/esp_driver_dma/test_apps/.build-test-rules.yml @@ -0,0 +1,16 @@ +# Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps + +components/esp_driver_dma/test_apps/dma: + disable: + - if: SOC_GDMA_SUPPORTED != 1 and SOC_CP_DMA_SUPPORTED != 1 + - if: CONFIG_NAME == "ext_mem_encryption" and SOC_FLASH_ENC_SUPPORTED != 1 + depends_components: + - esp_driver_dma + - esp_hal_dma + +components/esp_driver_dma/test_apps/dma2d: + disable: + - if: SOC_DMA2D_SUPPORTED != 1 + depends_components: + - esp_driver_dma + - esp_hal_dma diff --git a/components/esp_hw_support/test_apps/dma/CMakeLists.txt b/components/esp_driver_dma/test_apps/dma/CMakeLists.txt similarity index 69% rename from components/esp_hw_support/test_apps/dma/CMakeLists.txt rename to components/esp_driver_dma/test_apps/dma/CMakeLists.txt index 5c9665d9b4..54e29de98a 100644 --- a/components/esp_hw_support/test_apps/dma/CMakeLists.txt +++ b/components/esp_driver_dma/test_apps/dma/CMakeLists.txt @@ -1,11 +1,9 @@ -# This is the project CMakeLists.txt file for the test subproject cmake_minimum_required(VERSION 3.22) include($ENV{IDF_PATH}/tools/cmake/project.cmake) -# "Trim" the build. Include the minimal set of components, main, and anything it depends on. We also depend on esp_psram -# as we set CONFIG_SPIRAM_... options. -set(COMPONENTS main esp_psram) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(dma_test) diff --git a/components/esp_hw_support/test_apps/dma/README.md b/components/esp_driver_dma/test_apps/dma/README.md similarity index 100% rename from components/esp_hw_support/test_apps/dma/README.md rename to components/esp_driver_dma/test_apps/dma/README.md diff --git a/components/esp_hw_support/test_apps/dma/main/CMakeLists.txt b/components/esp_driver_dma/test_apps/dma/main/CMakeLists.txt similarity index 97% rename from components/esp_hw_support/test_apps/dma/main/CMakeLists.txt rename to components/esp_driver_dma/test_apps/dma/main/CMakeLists.txt index 1e66978d0e..560a51409b 100644 --- a/components/esp_hw_support/test_apps/dma/main/CMakeLists.txt +++ b/components/esp_driver_dma/test_apps/dma/main/CMakeLists.txt @@ -23,7 +23,7 @@ endif() # In order for the cases defined by `TEST_CASE` to be linked into the final elf, # the component can be registered as WHOLE_ARCHIVE idf_component_register(SRCS ${srcs} - PRIV_REQUIRES unity esp_mm esp_driver_gpio + PRIV_REQUIRES unity esp_mm esp_driver_gpio esp_psram esp_driver_dma WHOLE_ARCHIVE) idf_component_get_property(lib_name esp_hal_dma COMPONENT_LIB) diff --git a/components/esp_hw_support/test_apps/dma/main/gdma_test_utils.c b/components/esp_driver_dma/test_apps/dma/main/gdma_test_utils.c similarity index 100% rename from components/esp_hw_support/test_apps/dma/main/gdma_test_utils.c rename to components/esp_driver_dma/test_apps/dma/main/gdma_test_utils.c diff --git a/components/esp_hw_support/test_apps/dma/main/gdma_test_utils.h b/components/esp_driver_dma/test_apps/dma/main/gdma_test_utils.h similarity index 100% rename from components/esp_hw_support/test_apps/dma/main/gdma_test_utils.h rename to components/esp_driver_dma/test_apps/dma/main/gdma_test_utils.h diff --git a/components/esp_hw_support/test_apps/dma/main/idf_component.yml b/components/esp_driver_dma/test_apps/dma/main/idf_component.yml similarity index 100% rename from components/esp_hw_support/test_apps/dma/main/idf_component.yml rename to components/esp_driver_dma/test_apps/dma/main/idf_component.yml diff --git a/components/esp_hw_support/test_apps/dma/main/test_app_main.c b/components/esp_driver_dma/test_apps/dma/main/test_app_main.c similarity index 100% rename from components/esp_hw_support/test_apps/dma/main/test_app_main.c rename to components/esp_driver_dma/test_apps/dma/main/test_app_main.c diff --git a/components/esp_hw_support/test_apps/dma/main/test_async_memcpy.c b/components/esp_driver_dma/test_apps/dma/main/test_async_memcpy.c similarity index 99% rename from components/esp_hw_support/test_apps/dma/main/test_async_memcpy.c rename to components/esp_driver_dma/test_apps/dma/main/test_async_memcpy.c index 5936a5164d..41f23b16ff 100644 --- a/components/esp_hw_support/test_apps/dma/main/test_async_memcpy.c +++ b/components/esp_driver_dma/test_apps/dma/main/test_async_memcpy.c @@ -54,7 +54,7 @@ static void async_memcpy_setup_testbench(memcpy_testbench_context_t *test_contex uint32_t mem_caps = test_context->src_in_psram ? MALLOC_CAP_SPIRAM | MALLOC_CAP_DMA | MALLOC_CAP_8BIT : MALLOC_CAP_INTERNAL | MALLOC_CAP_DMA | MALLOC_CAP_8BIT ; src_buf = heap_caps_aligned_calloc(test_context->align, 1, buffer_size, mem_caps); TEST_ASSERT_NOT_NULL(src_buf); - if(test_context->src_dst_same) { + if (test_context->src_dst_same) { dst_buf = src_buf; } else { mem_caps = test_context->dst_in_psram ? MALLOC_CAP_SPIRAM | MALLOC_CAP_DMA | MALLOC_CAP_8BIT : MALLOC_CAP_INTERNAL | MALLOC_CAP_DMA | MALLOC_CAP_8BIT ; @@ -409,7 +409,7 @@ static IRAM_ATTR bool test_weighted_arb_isr_cb(async_memcpy_handle_t mcp_hdl, as static void memcpy_weighted_arb_test(async_memcpy_handle_t driver[2], size_t burst_size, uint32_t buffer_size, bool buffer_in_psram) { - SemaphoreHandle_t sem[2] = {xSemaphoreCreateBinary(),xSemaphoreCreateBinary()}; + SemaphoreHandle_t sem[2] = {xSemaphoreCreateBinary(), xSemaphoreCreateBinary()}; int64_t elapse_us[2] = {0}; float throughput[2] = {0.0}; @@ -439,7 +439,7 @@ static void memcpy_weighted_arb_test(async_memcpy_handle_t driver[2], size_t bur elapse_us[1] = ctx[1].elapse_us; // wait for channel_0 done, keep channel_1 busy to do arbitration - while(xSemaphoreTake(sem[0], 0) == pdFALSE) { + while (xSemaphoreTake(sem[0], 0) == pdFALSE) { TEST_ESP_OK(esp_async_memcpy(driver[1], test_context.to_addr, test_context.from_addr, test_context.copy_size, test_weighted_arb_isr_cb, &ctx[1])); TEST_ASSERT_EQUAL(pdTRUE, xSemaphoreTake(sem[1], pdMS_TO_TICKS(1000))); } diff --git a/components/esp_hw_support/test_apps/dma/main/test_dw_gdma.c b/components/esp_driver_dma/test_apps/dma/main/test_dw_gdma.c similarity index 100% rename from components/esp_hw_support/test_apps/dma/main/test_dw_gdma.c rename to components/esp_driver_dma/test_apps/dma/main/test_dw_gdma.c diff --git a/components/esp_hw_support/test_apps/dma/main/test_gdma.c b/components/esp_driver_dma/test_apps/dma/main/test_gdma.c similarity index 100% rename from components/esp_hw_support/test_apps/dma/main/test_gdma.c rename to components/esp_driver_dma/test_apps/dma/main/test_gdma.c diff --git a/components/esp_hw_support/test_apps/dma/main/test_gdma_crc.c b/components/esp_driver_dma/test_apps/dma/main/test_gdma_crc.c similarity index 100% rename from components/esp_hw_support/test_apps/dma/main/test_gdma_crc.c rename to components/esp_driver_dma/test_apps/dma/main/test_gdma_crc.c diff --git a/components/esp_hw_support/test_apps/dma/main/test_gdma_etm.c b/components/esp_driver_dma/test_apps/dma/main/test_gdma_etm.c similarity index 100% rename from components/esp_hw_support/test_apps/dma/main/test_gdma_etm.c rename to components/esp_driver_dma/test_apps/dma/main/test_gdma_etm.c diff --git a/components/esp_hw_support/test_apps/dma/pytest_dma.py b/components/esp_driver_dma/test_apps/dma/pytest_dma.py similarity index 100% rename from components/esp_hw_support/test_apps/dma/pytest_dma.py rename to components/esp_driver_dma/test_apps/dma/pytest_dma.py diff --git a/components/esp_hw_support/test_apps/dma/sdkconfig.ci.ext_mem_encryption b/components/esp_driver_dma/test_apps/dma/sdkconfig.ci.ext_mem_encryption similarity index 100% rename from components/esp_hw_support/test_apps/dma/sdkconfig.ci.ext_mem_encryption rename to components/esp_driver_dma/test_apps/dma/sdkconfig.ci.ext_mem_encryption diff --git a/components/esp_hw_support/test_apps/dma/sdkconfig.ci.release b/components/esp_driver_dma/test_apps/dma/sdkconfig.ci.release similarity index 100% rename from components/esp_hw_support/test_apps/dma/sdkconfig.ci.release rename to components/esp_driver_dma/test_apps/dma/sdkconfig.ci.release diff --git a/components/esp_hw_support/test_apps/dma/sdkconfig.ci.weighted_arbitration b/components/esp_driver_dma/test_apps/dma/sdkconfig.ci.weighted_arbitration similarity index 100% rename from components/esp_hw_support/test_apps/dma/sdkconfig.ci.weighted_arbitration rename to components/esp_driver_dma/test_apps/dma/sdkconfig.ci.weighted_arbitration diff --git a/components/esp_hw_support/test_apps/dma/sdkconfig.defaults b/components/esp_driver_dma/test_apps/dma/sdkconfig.defaults similarity index 100% rename from components/esp_hw_support/test_apps/dma/sdkconfig.defaults rename to components/esp_driver_dma/test_apps/dma/sdkconfig.defaults diff --git a/components/esp_hw_support/test_apps/dma/sdkconfig.defaults.esp32c5 b/components/esp_driver_dma/test_apps/dma/sdkconfig.defaults.esp32c5 similarity index 100% rename from components/esp_hw_support/test_apps/dma/sdkconfig.defaults.esp32c5 rename to components/esp_driver_dma/test_apps/dma/sdkconfig.defaults.esp32c5 diff --git a/components/esp_hw_support/test_apps/dma/sdkconfig.defaults.esp32c61 b/components/esp_driver_dma/test_apps/dma/sdkconfig.defaults.esp32c61 similarity index 100% rename from components/esp_hw_support/test_apps/dma/sdkconfig.defaults.esp32c61 rename to components/esp_driver_dma/test_apps/dma/sdkconfig.defaults.esp32c61 diff --git a/components/esp_hw_support/test_apps/dma/sdkconfig.defaults.esp32p4 b/components/esp_driver_dma/test_apps/dma/sdkconfig.defaults.esp32p4 similarity index 100% rename from components/esp_hw_support/test_apps/dma/sdkconfig.defaults.esp32p4 rename to components/esp_driver_dma/test_apps/dma/sdkconfig.defaults.esp32p4 diff --git a/components/esp_hw_support/test_apps/dma/sdkconfig.defaults.esp32s3 b/components/esp_driver_dma/test_apps/dma/sdkconfig.defaults.esp32s3 similarity index 100% rename from components/esp_hw_support/test_apps/dma/sdkconfig.defaults.esp32s3 rename to components/esp_driver_dma/test_apps/dma/sdkconfig.defaults.esp32s3 diff --git a/components/esp_hw_support/test_apps/dma2d/CMakeLists.txt b/components/esp_driver_dma/test_apps/dma2d/CMakeLists.txt similarity index 65% rename from components/esp_hw_support/test_apps/dma2d/CMakeLists.txt rename to components/esp_driver_dma/test_apps/dma2d/CMakeLists.txt index 816c377320..54772008c8 100644 --- a/components/esp_hw_support/test_apps/dma2d/CMakeLists.txt +++ b/components/esp_driver_dma/test_apps/dma2d/CMakeLists.txt @@ -3,8 +3,7 @@ cmake_minimum_required(VERSION 3.22) include($ENV{IDF_PATH}/tools/cmake/project.cmake) -# "Trim" the build. Include the minimal set of components, main, and anything it depends on. We also depend on esp_psram -# as we set CONFIG_SPIRAM_... options. -set(COMPONENTS main esp_psram) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(dma2d_test) diff --git a/components/esp_hw_support/test_apps/dma2d/README.md b/components/esp_driver_dma/test_apps/dma2d/README.md similarity index 100% rename from components/esp_hw_support/test_apps/dma2d/README.md rename to components/esp_driver_dma/test_apps/dma2d/README.md diff --git a/components/esp_hw_support/test_apps/dma2d/main/CMakeLists.txt b/components/esp_driver_dma/test_apps/dma2d/main/CMakeLists.txt similarity index 81% rename from components/esp_hw_support/test_apps/dma2d/main/CMakeLists.txt rename to components/esp_driver_dma/test_apps/dma2d/main/CMakeLists.txt index 1edd6de51c..02fd540ce6 100644 --- a/components/esp_hw_support/test_apps/dma2d/main/CMakeLists.txt +++ b/components/esp_driver_dma/test_apps/dma2d/main/CMakeLists.txt @@ -6,5 +6,5 @@ set(srcs "test_app_main.c" # the component can be registered as WHOLE_ARCHIVE idf_component_register(SRCS ${srcs} INCLUDE_DIRS "." - PRIV_REQUIRES unity esp_mm + PRIV_REQUIRES unity esp_mm esp_psram esp_driver_dma WHOLE_ARCHIVE) diff --git a/components/esp_hw_support/test_apps/dma2d/main/dma2d_test_utils.c b/components/esp_driver_dma/test_apps/dma2d/main/dma2d_test_utils.c similarity index 100% rename from components/esp_hw_support/test_apps/dma2d/main/dma2d_test_utils.c rename to components/esp_driver_dma/test_apps/dma2d/main/dma2d_test_utils.c diff --git a/components/esp_hw_support/test_apps/dma2d/main/dma2d_test_utils.h b/components/esp_driver_dma/test_apps/dma2d/main/dma2d_test_utils.h similarity index 100% rename from components/esp_hw_support/test_apps/dma2d/main/dma2d_test_utils.h rename to components/esp_driver_dma/test_apps/dma2d/main/dma2d_test_utils.h diff --git a/components/esp_hw_support/test_apps/dma2d/main/test_app_main.c b/components/esp_driver_dma/test_apps/dma2d/main/test_app_main.c similarity index 100% rename from components/esp_hw_support/test_apps/dma2d/main/test_app_main.c rename to components/esp_driver_dma/test_apps/dma2d/main/test_app_main.c diff --git a/components/esp_hw_support/test_apps/dma2d/main/test_dma2d.c b/components/esp_driver_dma/test_apps/dma2d/main/test_dma2d.c similarity index 98% rename from components/esp_hw_support/test_apps/dma2d/main/test_dma2d.c rename to components/esp_driver_dma/test_apps/dma2d/main/test_dma2d.c index 89d20652cd..580f485c90 100644 --- a/components/esp_hw_support/test_apps/dma2d/main/test_dma2d.c +++ b/components/esp_driver_dma/test_apps/dma2d/main/test_dma2d.c @@ -173,28 +173,28 @@ static void rgb565_to_rgb888(uint16_t rgb565, void *__r, void *__g, void *__b) uint8_t *b = (uint8_t *)__b; uint32_t _rgb565 = rgb565; - uint8_t _b = (_rgb565>>8) & 0xF8; - uint8_t _g = (_rgb565>>3) & 0xFC; - uint8_t _r = (_rgb565<<3) & 0xF8; + uint8_t _b = (_rgb565 >> 8) & 0xF8; + uint8_t _g = (_rgb565 >> 3) & 0xFC; + uint8_t _r = (_rgb565 << 3) & 0xF8; // *r = (_r & 0x08) ? (_r | 0x1) : (_r); // *g = (_g & 0x04) ? (_g | 0x1) : (_g); // *b = (_b & 0x08) ? (_b | 0x1) : (_b); - *r = _r | ( (_r >>3) & 0x7); - *g = _g | ( (_g >>2) & 0x3); - *b = _b | ( (_b >>3) & 0x7); + *r = _r | ((_r >> 3) & 0x7); + *g = _g | ((_g >> 2) & 0x3); + *b = _b | ((_b >> 3) & 0x7); } static int rgb565_to_rgb888_and_cmp(void *_rgb565, void *__rgb888, int pix) { uint16_t *rgb565 = (uint16_t *)_rgb565; uint8_t *_rgb888 = (uint8_t *)__rgb888; - uint8_t _r,_g,_b; + uint8_t _r, _g, _b; for (int i = 0; i < pix; i++) { rgb565_to_rgb888(rgb565[i], &_r, &_g, &_b); if (_r != _rgb888[0] || _g != _rgb888[1] || _b != _rgb888[2]) { printf("idx %d - conv fail, %x:%x:%x, rgb565:%x, _rgb888:%x:%x:%x\r\n", - i, _r, _g, _b, rgb565[i], _rgb888[0], _rgb888[1] ,_rgb888[2]); + i, _r, _g, _b, rgb565[i], _rgb888[0], _rgb888[1], _rgb888[2]); return -1; } _rgb888 += 3; @@ -421,8 +421,8 @@ TEST_CASE("DMA2D_M2M_2D_basic", "[DMA2D]") static void rgb888_to_rgb565(uint8_t r, uint8_t g, uint8_t b, uint16_t *rgb565) { uint16_t _rgb565 = (b >> 3); - _rgb565 = (_rgb565 << 6) | (g >>2); - _rgb565 = (_rgb565 << 5) | (r >>3); + _rgb565 = (_rgb565 << 6) | (g >> 2); + _rgb565 = (_rgb565 << 5) | (r >> 3); *rgb565 = _rgb565; } diff --git a/components/esp_hw_support/test_apps/dma2d/pytest_dma2d.py b/components/esp_driver_dma/test_apps/dma2d/pytest_dma2d.py similarity index 100% rename from components/esp_hw_support/test_apps/dma2d/pytest_dma2d.py rename to components/esp_driver_dma/test_apps/dma2d/pytest_dma2d.py diff --git a/components/esp_hw_support/test_apps/dma2d/sdkconfig.ci.release b/components/esp_driver_dma/test_apps/dma2d/sdkconfig.ci.release similarity index 100% rename from components/esp_hw_support/test_apps/dma2d/sdkconfig.ci.release rename to components/esp_driver_dma/test_apps/dma2d/sdkconfig.ci.release diff --git a/components/esp_hw_support/test_apps/dma2d/sdkconfig.defaults b/components/esp_driver_dma/test_apps/dma2d/sdkconfig.defaults similarity index 100% rename from components/esp_hw_support/test_apps/dma2d/sdkconfig.defaults rename to components/esp_driver_dma/test_apps/dma2d/sdkconfig.defaults diff --git a/components/esp_hw_support/test_apps/dma2d/sdkconfig.defaults.esp32p4 b/components/esp_driver_dma/test_apps/dma2d/sdkconfig.defaults.esp32p4 similarity index 100% rename from components/esp_hw_support/test_apps/dma2d/sdkconfig.defaults.esp32p4 rename to components/esp_driver_dma/test_apps/dma2d/sdkconfig.defaults.esp32p4 diff --git a/components/esp_driver_i2s/CMakeLists.txt b/components/esp_driver_i2s/CMakeLists.txt index f55f579f05..a2c99d5c96 100644 --- a/components/esp_driver_i2s/CMakeLists.txt +++ b/components/esp_driver_i2s/CMakeLists.txt @@ -6,7 +6,7 @@ endif() set(srcs) set(include "include") -set(priv_requires esp_driver_gpio esp_pm esp_mm esp_hal_clock) +set(priv_requires esp_driver_gpio esp_driver_dma esp_pm esp_mm esp_hal_clock) if(${target} STREQUAL "esp32") # ADC on esp32 is routed to I2S0, I2S driver needs to operate ADC to ensure the I2S function. diff --git a/components/esp_driver_i3c/CMakeLists.txt b/components/esp_driver_i3c/CMakeLists.txt index 656e3d5dc5..24a8383158 100644 --- a/components/esp_driver_i3c/CMakeLists.txt +++ b/components/esp_driver_i3c/CMakeLists.txt @@ -12,7 +12,7 @@ endif() if(${target} STREQUAL "linux") set(priv_requires "") else() - set(priv_requires esp_driver_gpio esp_pm esp_mm) + set(priv_requires esp_driver_gpio esp_pm esp_mm esp_driver_dma) set(requires esp_hal_i3c) endif() diff --git a/components/esp_driver_i3c/linker.lf b/components/esp_driver_i3c/linker.lf index 7e5e3f030d..21fcd2518e 100644 --- a/components/esp_driver_i3c/linker.lf +++ b/components/esp_driver_i3c/linker.lf @@ -11,7 +11,7 @@ entries: i3c_master: handle_ibi_status_thld_int (noflash) [mapping:i3c_driver_gdma] -archive: libesp_hw_support.a +archive: libesp_driver_dma.a entries: if I3C_MASTER_ISR_HANDLER_IN_IRAM = y: gdma_link: gdma_link_mount_buffers (noflash) diff --git a/components/esp_driver_jpeg/CMakeLists.txt b/components/esp_driver_jpeg/CMakeLists.txt index 1cdab7607d..59ba4ecad3 100644 --- a/components/esp_driver_jpeg/CMakeLists.txt +++ b/components/esp_driver_jpeg/CMakeLists.txt @@ -27,7 +27,7 @@ set(requires esp_hal_jpeg) if(${target} STREQUAL "linux") set(priv_requires "") else() - set(priv_requires esp_mm esp_pm esp_psram) + set(priv_requires esp_mm esp_pm esp_psram esp_driver_dma) endif() idf_component_register(SRCS ${srcs} diff --git a/components/esp_driver_parlio/CMakeLists.txt b/components/esp_driver_parlio/CMakeLists.txt index 5bdc3d0c7e..196c033d61 100644 --- a/components/esp_driver_parlio/CMakeLists.txt +++ b/components/esp_driver_parlio/CMakeLists.txt @@ -15,7 +15,7 @@ endif() if(${target} STREQUAL "linux") set(priv_requires "") else() - set(priv_requires esp_pm esp_driver_gpio esp_mm esp_driver_bitscrambler) + set(priv_requires esp_pm esp_driver_gpio esp_mm esp_driver_bitscrambler esp_driver_dma) endif() idf_component_register(SRCS ${srcs} diff --git a/components/esp_driver_parlio/linker.lf b/components/esp_driver_parlio/linker.lf index 03b303a963..9cbf57ed74 100644 --- a/components/esp_driver_parlio/linker.lf +++ b/components/esp_driver_parlio/linker.lf @@ -17,7 +17,7 @@ entries: parlio_rx: parlio_rx_unit_receive_from_isr (noflash) [mapping:parlio_driver_gdma_link] -archive: libesp_hw_support.a +archive: libesp_driver_dma.a entries: if PARLIO_TX_ISR_HANDLER_IN_IRAM = y: gdma_link: gdma_link_mount_buffers (noflash) diff --git a/components/esp_driver_ppa/CMakeLists.txt b/components/esp_driver_ppa/CMakeLists.txt index 4b9ad27f9d..4e98be6b02 100644 --- a/components/esp_driver_ppa/CMakeLists.txt +++ b/components/esp_driver_ppa/CMakeLists.txt @@ -12,7 +12,7 @@ endif() if(${target} STREQUAL "linux") set(priv_requires "") else() - set(priv_requires esp_mm esp_pm) + set(priv_requires esp_mm esp_pm esp_driver_dma) endif() diff --git a/components/esp_driver_rmt/CMakeLists.txt b/components/esp_driver_rmt/CMakeLists.txt index 1789297160..07e0c3d46c 100644 --- a/components/esp_driver_rmt/CMakeLists.txt +++ b/components/esp_driver_rmt/CMakeLists.txt @@ -21,7 +21,7 @@ if(${target} STREQUAL "linux") set(priv_requires "") else() set(requires esp_hal_rmt) - set(priv_requires esp_pm esp_driver_gpio esp_driver_bitscrambler esp_mm) + set(priv_requires esp_pm esp_driver_gpio esp_driver_bitscrambler esp_mm esp_driver_dma) endif() idf_component_register(SRCS ${srcs} diff --git a/components/esp_driver_rmt/linker.lf b/components/esp_driver_rmt/linker.lf index 60a1ca32a2..c6f86efd7d 100644 --- a/components/esp_driver_rmt/linker.lf +++ b/components/esp_driver_rmt/linker.lf @@ -32,7 +32,7 @@ entries: rmt_rx: rmt_receive (noflash) [mapping:rmt_driver_gdma_link] -archive: libesp_hw_support.a +archive: libesp_driver_dma.a entries: if RMT_TX_ISR_HANDLER_IN_IRAM = y && SOC_RMT_SUPPORT_DMA = y: gdma_link: gdma_link_mount_buffers (noflash) diff --git a/components/esp_driver_spi/CMakeLists.txt b/components/esp_driver_spi/CMakeLists.txt index 88cd7386d0..36ceefdb81 100644 --- a/components/esp_driver_spi/CMakeLists.txt +++ b/components/esp_driver_spi/CMakeLists.txt @@ -26,7 +26,7 @@ endif() idf_component_register( SRCS ${srcs} INCLUDE_DIRS ${public_include} - REQUIRES esp_pm esp_hal_gpspi - PRIV_REQUIRES esp_timer esp_mm esp_driver_gpio spi_flash esp_psram #For CONFIG_SPIRAM_SPEED + REQUIRES esp_pm esp_hal_gpspi esp_driver_dma + PRIV_REQUIRES esp_timer esp_mm esp_driver_gpio spi_flash esp_psram LDFRAGMENTS "linker.lf" ) diff --git a/components/esp_driver_uart/CMakeLists.txt b/components/esp_driver_uart/CMakeLists.txt index a4d743e488..7af0ff0c71 100644 --- a/components/esp_driver_uart/CMakeLists.txt +++ b/components/esp_driver_uart/CMakeLists.txt @@ -12,7 +12,7 @@ endif() if(${target} STREQUAL "linux") set(priv_requires esp_ringbuf) else() - set(priv_requires esp_pm esp_driver_gpio esp_ringbuf esp_mm esp_psram) + set(priv_requires esp_pm esp_driver_gpio esp_driver_dma esp_ringbuf esp_mm esp_psram) endif() idf_component_register( diff --git a/components/esp_driver_uart/linker.lf b/components/esp_driver_uart/linker.lf index ba9dd53dea..96f83cc10d 100644 --- a/components/esp_driver_uart/linker.lf +++ b/components/esp_driver_uart/linker.lf @@ -19,7 +19,7 @@ entries: uhci: uhci_do_transmit (noflash) [mapping:uhci_driver_gdma_link] -archive: libesp_hw_support.a +archive: libesp_driver_dma.a entries: if UHCI_ISR_HANDLER_IN_IRAM = y: gdma_link: gdma_link_count_buffer_size_till_eof (noflash) diff --git a/components/esp_hal_ana_conv/CMakeLists.txt b/components/esp_hal_ana_conv/CMakeLists.txt index 26b0c8d2b3..de34f6d634 100644 --- a/components/esp_hal_ana_conv/CMakeLists.txt +++ b/components/esp_hal_ana_conv/CMakeLists.txt @@ -4,7 +4,7 @@ if(${target} STREQUAL "linux") return() # This component is not supported by the POSIX/Linux simulator endif() -set(requires soc hal) +set(requires soc hal esp_hal_dma) if(${target} STREQUAL "esp32") list(APPEND requires esp_hal_i2s) endif() diff --git a/components/esp_hal_gpspi/CMakeLists.txt b/components/esp_hal_gpspi/CMakeLists.txt index 99e19773ee..9dd01b7f89 100644 --- a/components/esp_hal_gpspi/CMakeLists.txt +++ b/components/esp_hal_gpspi/CMakeLists.txt @@ -24,6 +24,6 @@ endif() idf_component_register( SRCS ${srcs} INCLUDE_DIRS ${includes} - REQUIRES soc hal + REQUIRES soc hal esp_hal_dma PRIV_REQUIRES esp_hal_gpio ) diff --git a/components/esp_hal_security/test_apps/crypto/main/CMakeLists.txt b/components/esp_hal_security/test_apps/crypto/main/CMakeLists.txt index 9b3a118fe8..86bc4be2c7 100644 --- a/components/esp_hal_security/test_apps/crypto/main/CMakeLists.txt +++ b/components/esp_hal_security/test_apps/crypto/main/CMakeLists.txt @@ -77,7 +77,7 @@ if(CONFIG_SOC_FLASH_ENCRYPTION_XTS_AES) endif() idf_component_register(SRCS ${srcs} - PRIV_REQUIRES efuse mbedtls esp_security esp_mm bootloader_support spi_flash + PRIV_REQUIRES efuse mbedtls esp_security esp_mm bootloader_support spi_flash esp_driver_dma REQUIRES test_utils unity WHOLE_ARCHIVE PRIV_INCLUDE_DIRS "${priv_include_dirs}" diff --git a/components/esp_hw_support/CMakeLists.txt b/components/esp_hw_support/CMakeLists.txt index d57d4e5eda..81b0c77229 100644 --- a/components/esp_hw_support/CMakeLists.txt +++ b/components/esp_hw_support/CMakeLists.txt @@ -9,7 +9,7 @@ if(${target} STREQUAL "linux") return() endif() -set(requires esp_hal_dma esp_hal_gpio esp_hal_usb esp_hal_pmu) +set(requires esp_hal_gpio esp_hal_usb esp_hal_pmu) # only esp_hw_support/adc_share_hw_ctrl.c requires efuse component set(priv_requires efuse spi_flash bootloader_support esp_hal_wdt esp_hal_rtc_timer esp_hal_clock esp_hal_security) @@ -29,8 +29,6 @@ if(NOT non_os_build) "sar_tsens_ctrl.c" "port/${target}/io_mux.c" "port/${target}/esp_clk_tree.c" - "dma/esp_dma_utils.c" - "dma/gdma_link.c" "spi_bus_lock.c" "clk_utils.c") if(CONFIG_SOC_USB_OTG_SUPPORTED) @@ -88,19 +86,6 @@ if(NOT non_os_build) list(APPEND srcs "rtc_wdt.c") endif() - if(CONFIG_SOC_GDMA_SUPPORTED) - list(APPEND srcs "dma/gdma.c") - if(CONFIG_SOC_GDMA_SUPPORT_SLEEP_RETENTION AND CONFIG_SOC_PAU_SUPPORTED) - list(APPEND srcs "dma/gdma_sleep_retention.c") - endif() - if(CONFIG_SOC_GDMA_SUPPORT_ETM) - list(APPEND srcs "dma/gdma_etm.c") - endif() - if(CONFIG_SOC_GDMA_SUPPORT_CRC) - list(APPEND srcs "dma/gdma_crc.c") - endif() - endif() - if(CONFIG_SOC_GP_LDO_SUPPORTED) list(APPEND srcs "ldo/esp_ldo_regulator.c") endif() @@ -109,24 +94,6 @@ if(NOT non_os_build) list(APPEND srcs "debug_probe/debug_probe.c") endif() - if(CONFIG_SOC_ASYNC_MEMCPY_SUPPORTED) - list(APPEND srcs "dma/esp_async_memcpy.c") - if(CONFIG_SOC_GDMA_SUPPORTED) - list(APPEND srcs "dma/async_memcpy_gdma.c") - endif() # CONFIG_SOC_GDMA_SUPPORTED - if(CONFIG_SOC_CP_DMA_SUPPORTED) - list(APPEND srcs "dma/async_memcpy_cp_dma.c") - endif() # CONFIG_SOC_CP_DMA_SUPPORTED - endif() # CONFIG_SOC_ASYNC_MEMCPY_SUPPORTED - - if(CONFIG_SOC_DW_GDMA_SUPPORTED) - list(APPEND srcs "dma/dw_gdma.c") - endif() - - if(CONFIG_SOC_DMA2D_SUPPORTED) - list(APPEND srcs "dma/dma2d.c") - endif() - if(CONFIG_SOC_SYSTIMER_SUPPORTED) list(APPEND srcs "port/${target}/systimer.c") endif() @@ -203,7 +170,7 @@ else() endif() set(public_include_dirs "include" "include/soc" - "dma/include" "ldo/include" "debug_probe/include" "etm/include" + "ldo/include" "debug_probe/include" "etm/include" "mspi/mspi_timing_tuning/include" "mspi/mspi_timing_tuning/tuning_scheme_impl/include" "mspi/mspi_intr/include" "power_supply/include" "modem/include") @@ -230,7 +197,7 @@ idf_component_register(SRCS ${srcs} PRIV_INCLUDE_DIRS port/include include/esp_private REQUIRES ${requires} PRIV_REQUIRES "${priv_requires}" - LDFRAGMENTS linker.lf dma/linker.lf ldo/linker.lf mspi/linker.lf) + LDFRAGMENTS linker.lf ldo/linker.lf mspi/linker.lf) idf_build_get_property(target IDF_TARGET) add_subdirectory(port/${target}) diff --git a/components/esp_hw_support/Kconfig b/components/esp_hw_support/Kconfig index 50ab6162ef..349e09f50c 100644 --- a/components/esp_hw_support/Kconfig +++ b/components/esp_hw_support/Kconfig @@ -334,7 +334,6 @@ menu "Hardware Settings" so that these functions can be IRAM-safe and able to be called in the other IRAM interrupt context. endmenu - rsource "./dma/Kconfig.dma" rsource "./etm/Kconfig.etm" menu "Main XTAL Config" diff --git a/components/esp_hw_support/README.md b/components/esp_hw_support/README.md index 3082d1ab56..a0fc88dddf 100644 --- a/components/esp_hw_support/README.md +++ b/components/esp_hw_support/README.md @@ -76,17 +76,6 @@ classDiagram } ``` -## DMA Service - -With the increasing demand, the hardware design of DMA is changing along the way. At first, each peripheral has a dedicated DMA controller. Later, a centralized DMA controller is introduced, which is called `GDMA` in the software. - -There may be multiple GDMA instances on a chip, some is attached to the AHB bus and some is attached to the AXI bus. But their functionalities are almost the same. - -Some high-performance peripherals, such as MIPI, require DMA to provide more functions, such as hardware handshake mechanism, address growth mode, out-of-order transmission and so on. Therefore, a new DMA controller, called `DW_GDMA` was born. The prefix *DW* is taken from *DesignWare*. - -Please note that the specific DMA controller to be used for peripherals is determined by the specific chip. It is possible that, on chip A, SPI works with AHB GDMA, while on chip B, SPI works with AXI GDMA. - - ## MSPI Interrupt Logic - Chip Differences Analysis ### 1. Overview diff --git a/components/esp_hw_support/test_apps/.build-test-rules.yml b/components/esp_hw_support/test_apps/.build-test-rules.yml index b556ff2360..a4d157871a 100644 --- a/components/esp_hw_support/test_apps/.build-test-rules.yml +++ b/components/esp_hw_support/test_apps/.build-test-rules.yml @@ -1,22 +1,5 @@ # Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps -components/esp_hw_support/test_apps/dma: - disable: - - if: SOC_GDMA_SUPPORTED != 1 and SOC_CP_DMA_SUPPORTED != 1 - - if: CONFIG_NAME == "ext_mem_encryption" and SOC_FLASH_ENC_SUPPORTED != 1 - depends_filepatterns: - - components/esp_hw_support/dma/**/* - depends_components: - - esp_hal_dma - -components/esp_hw_support/test_apps/dma2d: - disable: - - if: SOC_DMA2D_SUPPORTED != 1 - depends_filepatterns: - - components/esp_hw_support/dma/**/* - depends_components: - - esp_hal_dma - components/esp_hw_support/test_apps/esp_hw_support_unity_tests: disable: - if: IDF_TARGET in ["esp32s31"] # TODO: [ESP32S31] IDF-14672 diff --git a/components/esp_lcd/CMakeLists.txt b/components/esp_lcd/CMakeLists.txt index ab6d1e18a7..795856ff2f 100644 --- a/components/esp_lcd/CMakeLists.txt +++ b/components/esp_lcd/CMakeLists.txt @@ -10,7 +10,7 @@ set(srcs "src/esp_lcd_common.c" "src/esp_lcd_panel_st7789.c" "src/esp_lcd_panel_ops.c") set(includes "include" "interface") -set(priv_requires "esp_mm" "esp_psram" "esp_pm" "esp_driver_i2s") +set(priv_requires "esp_mm" "esp_psram" "esp_pm" "esp_driver_i2s" "esp_driver_dma") set(public_requires "esp_driver_gpio" "esp_driver_i2c" "esp_driver_spi" "esp_driver_parlio" "esp_hal_lcd") if(CONFIG_SOC_DMA2D_SUPPORTED) diff --git a/components/esp_lcd/linker.lf b/components/esp_lcd/linker.lf index 1d3064c780..f3f63a8dc1 100644 --- a/components/esp_lcd/linker.lf +++ b/components/esp_lcd/linker.lf @@ -6,7 +6,7 @@ entries: esp_lcd_panel_dpi: mipi_dsi_bridge_isr_handler (noflash) [mapping:esp_lcd_dsi_dma] -archive: libesp_hw_support.a +archive: libesp_driver_dma.a entries: if LCD_DSI_ISR_HANDLER_IN_IRAM = y: # Control dw_gdma function placement granularly @@ -16,7 +16,7 @@ entries: dw_gdma: dw_gdma_channel_enable_ctrl (noflash) [mapping:esp_lcd_rgb_dma] -archive: libesp_hw_support.a +archive: libesp_driver_dma.a entries: if LCD_RGB_ISR_IRAM_SAFE = y: gdma: gdma_reset (noflash) diff --git a/components/esp_mm/CMakeLists.txt b/components/esp_mm/CMakeLists.txt index bf81e65185..7fed361905 100644 --- a/components/esp_mm/CMakeLists.txt +++ b/components/esp_mm/CMakeLists.txt @@ -7,7 +7,7 @@ endif() set(includes "include") # Note: requires spi_flash for cache_utils, will be refactored -set(priv_requires heap spi_flash) +set(priv_requires heap spi_flash esp_hal_dma) set(srcs) diff --git a/components/esp_mm/heap_align_hw.c b/components/esp_mm/heap_align_hw.c index 294fb5a2d7..bc0088b458 100644 --- a/components/esp_mm/heap_align_hw.c +++ b/components/esp_mm/heap_align_hw.c @@ -9,7 +9,6 @@ #include "sdkconfig.h" #include "esp_heap_caps.h" #include "esp_private/esp_cache_private.h" -#include "esp_private/gdma.h" #include "soc/soc_caps.h" #if SOC_HAS(GDMA) #include "hal/gdma_ll.h" diff --git a/components/esp_system/CMakeLists.txt b/components/esp_system/CMakeLists.txt index 4a6f079f3e..e484b0bd04 100644 --- a/components/esp_system/CMakeLists.txt +++ b/components/esp_system/CMakeLists.txt @@ -75,7 +75,8 @@ else() idf_component_register(SRCS "${srcs}" INCLUDE_DIRS include - PRIV_REQUIRES spi_flash esp_timer esp_mm esp_hal_mspi esp_hal_wdt esp_hal_uart esp_hal_clock + PRIV_REQUIRES spi_flash esp_timer esp_mm + esp_hal_mspi esp_hal_wdt esp_hal_uart esp_hal_clock esp_hal_dma # [refactor-todo] requirements due to init code, # should be removable once using component init functions # link-time registration is used. diff --git a/components/mbedtls/CMakeLists.txt b/components/mbedtls/CMakeLists.txt index 992c8c5dff..e75d155f17 100644 --- a/components/mbedtls/CMakeLists.txt +++ b/components/mbedtls/CMakeLists.txt @@ -4,8 +4,7 @@ idf_build_get_property(esp_tee_build ESP_TEE_BUILD) if(esp_tee_build) include(${COMPONENT_DIR}/esp_tee/esp_tee_mbedtls.cmake) -return() - + return() elseif(BOOTLOADER_BUILD) # TODO: IDF-11673 if(CONFIG_MBEDTLS_USE_CRYPTO_ROM_IMPL_BOOTLOADER) set(include_dirs "${COMPONENT_DIR}/mbedtls/include" @@ -15,14 +14,14 @@ elseif(BOOTLOADER_BUILD) # TODO: IDF-11673 idf_component_register(SRCS "${srcs}" INCLUDE_DIRS "${include_dirs}" - PRIV_REQUIRES hal) + PRIV_REQUIRES esp_hal_dma) return() endif() if(NOT ${IDF_TARGET} STREQUAL "linux") set(priv_requires soc esp_hw_support) if(NOT BOOTLOADER_BUILD) - list(APPEND priv_requires esp_pm) + list(APPEND priv_requires esp_pm esp_driver_dma) set(requires esp_security) endif() endif() @@ -325,6 +324,10 @@ if(AES_PERIPHERAL_TYPE STREQUAL "dma") target_sources(tfpsacrypto PRIVATE "${AES_DMA_SRCS}") endif() +if(CONFIG_SOC_SHA_GDMA OR CONFIG_SOC_AES_GDMA) + target_link_libraries(tfpsacrypto PRIVATE idf::esp_driver_dma) +endif() + if((SHA_PERIPHERAL_TYPE STREQUAL "core" AND CONFIG_SOC_SHA_SUPPORT_DMA) OR AES_PERIPHERAL_TYPE STREQUAL "dma") target_link_libraries(tfpsacrypto PRIVATE idf::esp_mm) target_link_libraries(builtin PRIVATE idf::esp_mm) diff --git a/components/mbedtls/esp_tee/esp_tee_mbedtls.cmake b/components/mbedtls/esp_tee/esp_tee_mbedtls.cmake index 74b9e0c84a..2bb902b16c 100644 --- a/components/mbedtls/esp_tee/esp_tee_mbedtls.cmake +++ b/components/mbedtls/esp_tee/esp_tee_mbedtls.cmake @@ -1,6 +1,6 @@ idf_component_get_property(heap_dir heap COMPONENT_DIR) -set(priv_requires esp_hw_support hal soc esp_hal_security) +set(priv_requires esp_hw_support esp_hal_security esp_hal_dma) set(include_dirs "${COMPONENT_DIR}/port/include" "${COMPONENT_DIR}/mbedtls/include" diff --git a/components/sdmmc/include/sd_protocol_types.h b/components/sdmmc/include/sd_protocol_types.h index b9bbdd6497..6269d11b20 100644 --- a/components/sdmmc/include/sd_protocol_types.h +++ b/components/sdmmc/include/sd_protocol_types.h @@ -27,7 +27,6 @@ #include #include "esp_err.h" #include "sd_pwr_ctrl.h" -#include "esp_dma_utils.h" #include "hal/sd_types.h" #ifdef __cplusplus diff --git a/docs/doxygen/Doxyfile b/docs/doxygen/Doxyfile index 0548a3fa02..95cede89b8 100644 --- a/docs/doxygen/Doxyfile +++ b/docs/doxygen/Doxyfile @@ -96,6 +96,7 @@ INPUT = \ $(PROJECT_PATH)/components/esp_driver_dac/include/driver/dac_cosine.h \ $(PROJECT_PATH)/components/esp_driver_dac/include/driver/dac_oneshot.h \ $(PROJECT_PATH)/components/esp_driver_dac/include/driver/dac_types.h \ + $(PROJECT_PATH)/components/esp_driver_dma/include/esp_async_memcpy.h \ $(PROJECT_PATH)/components/esp_driver_gpio/include/driver/dedic_gpio.h \ $(PROJECT_PATH)/components/esp_driver_gpio/include/driver/gpio.h \ $(PROJECT_PATH)/components/esp_driver_gpio/include/driver/gpio_etm.h \ @@ -197,7 +198,6 @@ INPUT = \ $(PROJECT_PATH)/components/esp_https_server/include/esp_https_server.h \ $(PROJECT_PATH)/components/esp_hw_support/etm/include/esp_etm.h \ $(PROJECT_PATH)/components/esp_hw_support/include/esp_clk_tree.h \ - $(PROJECT_PATH)/components/esp_hw_support/include/esp_async_memcpy.h \ $(PROJECT_PATH)/components/esp_hw_support/include/esp_chip_info.h \ $(PROJECT_PATH)/components/esp_hw_support/include/esp_cpu.h \ $(PROJECT_PATH)/components/esp_hw_support/include/esp_crc.h \ diff --git a/docs/en/migration-guides/release-6.x/6.0/peripherals.rst b/docs/en/migration-guides/release-6.x/6.0/peripherals.rst index a79972d8d1..1daa1f046d 100644 --- a/docs/en/migration-guides/release-6.x/6.0/peripherals.rst +++ b/docs/en/migration-guides/release-6.x/6.0/peripherals.rst @@ -224,9 +224,10 @@ The legacy timer group driver ``driver/timer.h`` is deprecated since version 5.0 The legacy RMT driver ``driver/rmt.h`` is deprecated since version 5.0 (see :ref:`deprecate_rmt_legacy_driver`). Starting from version 6.0, the legacy driver is completely removed. The new driver is placed in the :component:`esp_driver_rmt`, and the header file path is ``driver/rmt_tx.h``, ``driver/rmt_rx.h`` and ``driver/rmt_encoder.h``. -GDMA ----- +DMA Driver +---------- +- The DMA core driver has been moved out of the original ``esp_hw_support`` component and is now provided as a separate ``esp_driver_dma`` component. If you are using the ``esp_async_memcpy.h`` and ``esp_dma_utils.h`` drivers, please ensure that you add a dependency on the ``esp_driver_dma`` component in your project. - The ``GDMA_ISR_IRAM_SAFE`` Kconfig option has been removed due to potential risks. Now, the interrupt behavior of different DMA channels during Cache disabled periods are independent of each other. - ``gdma_new_channel`` is removed. When requesting a GDMA channel, use either ``gdma_new_ahb_channel`` or ``gdma_new_axi_channel`` according to the bus type. - The ``sram_trans_align`` and ``psram_trans_align`` members have been removed from :cpp:type:`async_memcpy_config_t`. Use :cpp:member:`async_memcpy_config_t::dma_burst_size` to set the DMA burst transfer size. diff --git a/docs/zh_CN/migration-guides/release-6.x/6.0/peripherals.rst b/docs/zh_CN/migration-guides/release-6.x/6.0/peripherals.rst index c3f0c84671..6b376eada5 100644 --- a/docs/zh_CN/migration-guides/release-6.x/6.0/peripherals.rst +++ b/docs/zh_CN/migration-guides/release-6.x/6.0/peripherals.rst @@ -224,9 +224,10 @@ I2C 主机驱动的 API 也有一些用法上的改动。 旧版的 RMT 驱动 ``driver/rmt.h`` 在 5.0 的版本中就已经被弃用(请参考 :ref:`deprecate_rmt_legacy_driver`)。从 6.0 版本开始,旧版驱动被完全移除。新驱动位于 :component:`esp_driver_rmt` 组件中,头文件引用路径为 ``driver/rmt_tx.h``, ``driver/rmt_rx.h`` 和 ``driver/rmt_encoder.h``。 -GDMA ----- +DMA 驱动 +-------- +- DMA 核心驱动程序现已从原来的 ``esp_hw_support`` 组件中移出,现作为单独的 ``esp_driver_dma`` 组件提供。如果你使用了 ``esp_async_memcpy.h`` 和 ``esp_dma_utils.h`` 驱动,请确保在项目中添加对 ``esp_driver_dma`` 组件的依赖。 - ``GDMA_ISR_IRAM_SAFE`` Kconfig 选项会带来不必要的风险,因此被移除。现在,不同的 GDMA 通道它们的中断在 Cache 关闭期间的行为可以互不影响。 - ``gdma_new_channel`` 已经被移除。现在当申请一个 GDMA 通道时,必须要根据实际使用的总线调用 ``gdma_new_ahb_channel`` 或 ``gdma_new_axi_channel`` 函数。 - :cpp:type:`async_memcpy_config_t` 中的 ``sram_trans_align`` 和 ``psram_trans_align`` 成员均已经被移除。请使用 :cpp:member:`async_memcpy_config_t::dma_burst_size` 来设置 DMA 的突发传输大小。 diff --git a/tools/test_apps/system/g1_components/CMakeLists.txt b/tools/test_apps/system/g1_components/CMakeLists.txt index b064ec362f..25fb1786e2 100644 --- a/tools/test_apps/system/g1_components/CMakeLists.txt +++ b/tools/test_apps/system/g1_components/CMakeLists.txt @@ -118,6 +118,9 @@ set(extra_components_which_shouldnt_be_included # esp_security is required by mbedtls and spi_flash esp_security + # esp_driver_dma is required by mbedtls + esp_driver_dma + # esp_usb_cdc_rom_console is used by the panic handler, will be conditional on cdc console option when # the new build-system is implemented esp_usb_cdc_rom_console