diff --git a/drivers/ethernet/eth_stm32_hal.c b/drivers/ethernet/eth_stm32_hal.c index 75b48daff5b7b1a..5d51a11f3dfe19c 100644 --- a/drivers/ethernet/eth_stm32_hal.c +++ b/drivers/ethernet/eth_stm32_hal.c @@ -80,8 +80,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME); DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay) #define __eth_stm32_desc __dtcm_noinit_section #define __eth_stm32_buf __dtcm_noinit_section -#elif defined(CONFIG_SOC_SERIES_STM32H7X) && \ - DT_NODE_HAS_STATUS(DT_NODELABEL(sram3), okay) +#elif defined(CONFIG_SOC_SERIES_STM32H7X) #define __eth_stm32_desc __attribute__((section(".eth_stm32_desc"))) #define __eth_stm32_buf __attribute__((section(".eth_stm32_buf"))) #elif defined(CONFIG_NOCACHE_MEMORY) diff --git a/soc/arm/st_stm32/stm32h7/mpu_regions.c b/soc/arm/st_stm32/stm32h7/mpu_regions.c index 5b81c1669917b33..f9195dab5288853 100644 --- a/soc/arm/st_stm32/stm32h7/mpu_regions.c +++ b/soc/arm/st_stm32/stm32h7/mpu_regions.c @@ -13,13 +13,12 @@ static const struct arm_mpu_region mpu_regions[] = { REGION_FLASH_ATTR(REGION_FLASH_SIZE)), MPU_REGION_ENTRY("SRAM", CONFIG_SRAM_BASE_ADDRESS, REGION_RAM_ATTR(REGION_SRAM_SIZE)), -#if DT_NODE_HAS_STATUS(DT_NODELABEL(sram3), okay) && \ - DT_NODE_HAS_STATUS(DT_NODELABEL(mac), okay) - MPU_REGION_ENTRY("SRAM3_ETH_BUF", - DT_REG_ADDR(DT_NODELABEL(sram3)), +#if DT_NODE_HAS_STATUS(DT_NODELABEL(mac), okay) + MPU_REGION_ENTRY("SRAM2_ETH_BUF", + DT_REG_ADDR(DT_NODELABEL(sram2)), REGION_RAM_NOCACHE_ATTR(REGION_16K)), - MPU_REGION_ENTRY("SRAM3_ETH_DESC", - DT_REG_ADDR(DT_NODELABEL(sram3)), + MPU_REGION_ENTRY("SRAM2_ETH_DESC", + DT_REG_ADDR(DT_NODELABEL(sram2)), REGION_PPB_ATTR(REGION_256B)), #endif diff --git a/soc/arm/st_stm32/stm32h7/sections.ld b/soc/arm/st_stm32/stm32h7/sections.ld index 7dc220498802201..7b8743fa9552275 100644 --- a/soc/arm/st_stm32/stm32h7/sections.ld +++ b/soc/arm/st_stm32/stm32h7/sections.ld @@ -4,15 +4,15 @@ * SPDX-License-Identifier: Apache-2.0 */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(sram3), okay) && DT_NODE_HAS_STATUS(DT_NODELABEL(mac), okay) +#if DT_NODE_HAS_STATUS(DT_NODELABEL(mac), okay) SECTION_DATA_PROLOGUE(eth_stm32,(NOLOAD),) { - . = ABSOLUTE(DT_REG_ADDR(DT_NODELABEL(sram3))); + . = ABSOLUTE(DT_REG_ADDR(DT_NODELABEL(sram2))); *(.eth_stm32_desc) - . = ABSOLUTE(DT_REG_ADDR(DT_NODELABEL(sram3))) + 256; + . = ABSOLUTE(DT_REG_ADDR(DT_NODELABEL(sram2))) + 256; *(.eth_stm32_buf) - . = ABSOLUTE(DT_REG_ADDR(DT_NODELABEL(sram3))) + 16K; -} GROUP_DATA_LINK_IN(LINKER_DT_NODE_REGION_NAME(DT_NODELABEL(sram3)), LINKER_DT_NODE_REGION_NAME(DT_NODELABEL(sram3))) + . = ABSOLUTE(DT_REG_ADDR(DT_NODELABEL(sram2))) + 16K; +} GROUP_DATA_LINK_IN(LINKER_DT_NODE_REGION_NAME(DT_NODELABEL(sram2)), LINKER_DT_NODE_REGION_NAME(DT_NODELABEL(sram2))) #endif