From db750dc1a00c896275289f0a2e88341200a4d6b6 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 | 15 ++++++ .../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 | 7 ++- .../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 .../test_apps/dma/sdkconfig.ci.release | 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 .../dma/sdkconfig.weighted_arbitration | 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_dma/CMakeLists.txt | 3 -- components/esp_hal_gpspi/CMakeLists.txt | 2 +- components/esp_hw_support/CMakeLists.txt | 39 ++------------- components/esp_hw_support/Kconfig | 1 - components/esp_hw_support/README.md | 10 ---- .../test_apps/.build-test-rules.yml | 18 ------- components/esp_lcd/CMakeLists.txt | 2 +- components/esp_lcd/linker.lf | 4 +- components/esp_mm/CMakeLists.txt | 2 +- components/esp_system/CMakeLists.txt | 3 +- .../hal/test_apps/crypto/main/CMakeLists.txt | 2 +- components/mbedtls/CMakeLists.txt | 9 ++-- .../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 ++ 90 files changed, 137 insertions(+), 135 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.release (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/dma/sdkconfig.weighted_arbitration (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..edd974d115 --- /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 bootloader_support + 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..5087696a4c --- /dev/null +++ b/components/esp_driver_dma/test_apps/.build-test-rules.yml @@ -0,0 +1,15 @@ +# 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 + 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 a9728b1b24..2e4e5f570c 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 @@ -52,7 +52,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 ; @@ -239,7 +239,6 @@ TEST_CASE("memory copy with dest address unaligned", "[async mcp]") }; [[maybe_unused]] async_memcpy_handle_t driver = NULL; - #if SOC_CP_DMA_SUPPORTED printf("Testing memcpy by CP DMA\r\n"); TEST_ESP_OK(esp_async_memcpy_install_cpdma(&driver_config, &driver)); @@ -402,7 +401,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}; @@ -432,7 +431,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.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.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/dma/sdkconfig.weighted_arbitration b/components/esp_driver_dma/test_apps/dma/sdkconfig.weighted_arbitration similarity index 100% rename from components/esp_hw_support/test_apps/dma/sdkconfig.weighted_arbitration rename to components/esp_driver_dma/test_apps/dma/sdkconfig.weighted_arbitration 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 be49a9d72f..5a9c789b8d 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) +set(priv_requires esp_driver_gpio esp_driver_dma esp_pm esp_mm) 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 2d0caf3272..564cbb2403 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) endif() idf_component_register(SRCS ${srcs} diff --git a/components/esp_driver_i3c/linker.lf b/components/esp_driver_i3c/linker.lf index 236b269d46..d10dd072eb 100644 --- a/components/esp_driver_i3c/linker.lf +++ b/components/esp_driver_i3c/linker.lf @@ -10,7 +10,7 @@ entries: i3c_master: handle_rx_data_buf_threshold_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 f11b56696d..4e8c7a8a84 100644 --- a/components/esp_driver_jpeg/CMakeLists.txt +++ b/components/esp_driver_jpeg/CMakeLists.txt @@ -26,7 +26,7 @@ endif() 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 a5dbf62783..d9c7324429 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 e5886231de..6f42f11161 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_dma/CMakeLists.txt b/components/esp_hal_dma/CMakeLists.txt index c1b259b7ef..2c2b7d6524 100644 --- a/components/esp_hal_dma/CMakeLists.txt +++ b/components/esp_hal_dma/CMakeLists.txt @@ -1,7 +1,4 @@ idf_build_get_property(target IDF_TARGET) -if(${target} STREQUAL "linux") - return() # This component is not supported by the POSIX/Linux simulator -endif() set(srcs) set(public_include "include") 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_hw_support/CMakeLists.txt b/components/esp_hw_support/CMakeLists.txt index 3c3b651681..006eaeeb93 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) @@ -32,8 +32,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) @@ -92,19 +90,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() @@ -113,24 +98,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() @@ -202,7 +169,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_timing_tuning/include" "mspi_timing_tuning/tuning_scheme_impl/include" "power_supply/include" "modem/include") @@ -228,7 +195,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_timing_tuning/linker.lf) + LDFRAGMENTS linker.lf ldo/linker.lf mspi_timing_tuning/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 55b269df09..88dc164eea 100644 --- a/components/esp_hw_support/Kconfig +++ b/components/esp_hw_support/Kconfig @@ -257,7 +257,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 5a95217589..20892026c4 100644 --- a/components/esp_hw_support/README.md +++ b/components/esp_hw_support/README.md @@ -75,13 +75,3 @@ classDiagram class gptimer_etm_task_t { } ``` - -## 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. 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 f7d56155f5..f4e675dbd8 100644 --- a/components/esp_hw_support/test_apps/.build-test-rules.yml +++ b/components/esp_hw_support/test_apps/.build-test-rules.yml @@ -1,23 +1,5 @@ # Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps -components/esp_hw_support/test_apps/dma: - disable: - - if: IDF_TARGET in ["esp32"] - temporary: false - reason: No general DMA controller on ESP32 - 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/host_test_linux: enable: - if: IDF_TARGET == "linux" 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_system/CMakeLists.txt b/components/esp_system/CMakeLists.txt index 9a6a268680..480e7b7222 100644 --- a/components/esp_system/CMakeLists.txt +++ b/components/esp_system/CMakeLists.txt @@ -71,7 +71,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 + PRIV_REQUIRES spi_flash esp_timer esp_mm + esp_hal_mspi esp_hal_wdt esp_hal_uart 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/hal/test_apps/crypto/main/CMakeLists.txt b/components/hal/test_apps/crypto/main/CMakeLists.txt index 9b3a118fe8..86bc4be2c7 100644 --- a/components/hal/test_apps/crypto/main/CMakeLists.txt +++ b/components/hal/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/mbedtls/CMakeLists.txt b/components/mbedtls/CMakeLists.txt index c7bdf9d6e7..46ad204fc2 100644 --- a/components/mbedtls/CMakeLists.txt +++ b/components/mbedtls/CMakeLists.txt @@ -5,7 +5,6 @@ idf_build_get_property(esp_tee_build ESP_TEE_BUILD) if(esp_tee_build) include(${COMPONENT_DIR}/esp_tee/esp_tee_mbedtls.cmake) 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() @@ -321,6 +320,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 4641b77120..7a77cb7a14 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) +set(priv_requires esp_hw_support 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 0704882e74..c882ce7eee 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 cc965e365e..6656ae651f 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 \ @@ -189,7 +190,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 3ddc8eb0ea..65a7634469 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 95cc756378..1616812998 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 d902b0184f..aa83667ddd 100644 --- a/tools/test_apps/system/g1_components/CMakeLists.txt +++ b/tools/test_apps/system/g1_components/CMakeLists.txt @@ -115,6 +115,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