Skip to content

Commit e73f2ce

Browse files
Alexander KozhinovAlexander Kozhinov
authored andcommitted
soc: arm: st_stm32: stm32h7
add non-cached MPU region section by alias instead of label Signed-off-by: Alexander Kozhinov <[email protected]>
1 parent 1931067 commit e73f2ce

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

soc/arm/st_stm32/stm32h7/mpu_regions.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ static const struct arm_mpu_region mpu_regions[] = {
1212
REGION_FLASH_ATTR(REGION_FLASH_SIZE)),
1313
MPU_REGION_ENTRY("SRAM", CONFIG_SRAM_BASE_ADDRESS,
1414
REGION_RAM_ATTR(REGION_SRAM_SIZE)),
15-
#if DT_NODE_HAS_STATUS(DT_NODELABEL(sram3), okay) && \
15+
#if DT_NODE_HAS_STATUS(DT_ALIAS(sramnocache), okay) && \
1616
DT_NODE_HAS_STATUS(DT_NODELABEL(mac), okay)
17-
MPU_REGION_ENTRY("SRAM3_ETH_BUF",
18-
DT_REG_ADDR(DT_NODELABEL(sram3)),
17+
MPU_REGION_ENTRY("SRAM_NO_CACHE_ETH_BUF",
18+
DT_REG_ADDR(DT_ALIAS(sramnocache)),
1919
REGION_RAM_NOCACHE_ATTR(REGION_16K)),
20-
MPU_REGION_ENTRY("SRAM3_ETH_DESC",
21-
DT_REG_ADDR(DT_NODELABEL(sram3)),
20+
MPU_REGION_ENTRY("SRAM_NO_CACHE_ETH_DESC",
21+
DT_REG_ADDR(DT_ALIAS(sramnocache)),
2222
REGION_PPB_ATTR(REGION_256B)),
2323
#endif
2424
};

soc/arm/st_stm32/stm32h7/sections.ld

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
#if DT_NODE_HAS_STATUS(DT_NODELABEL(sram3), okay) && DT_NODE_HAS_STATUS(DT_NODELABEL(mac), okay)
7+
#if DT_NODE_HAS_STATUS(DT_ALIAS(sramnocache), okay) && DT_NODE_HAS_STATUS(DT_NODELABEL(mac), okay)
88

99
SECTION_DATA_PROLOGUE(eth_stm32,(NOLOAD),)
1010
{
11-
. = ABSOLUTE(DT_REG_ADDR(DT_NODELABEL(sram3)));
11+
. = ABSOLUTE(DT_REG_ADDR(DT_ALIAS(sramnocache)));
1212
*(.eth_stm32_desc)
13-
. = ABSOLUTE(DT_REG_ADDR(DT_NODELABEL(sram3))) + 256;
13+
. = ABSOLUTE(DT_REG_ADDR(DT_ALIAS(sramnocache))) + 256;
1414
*(.eth_stm32_buf)
15-
. = ABSOLUTE(DT_REG_ADDR(DT_NODELABEL(sram3))) + 16K;
16-
} GROUP_DATA_LINK_IN(SRAM3, SRAM3)
15+
. = ABSOLUTE(DT_REG_ADDR(DT_ALIAS(sramnocache))) + 16K;
16+
} GROUP_DATA_LINK_IN(sramnocache, sramnocache)
1717

1818
#endif

0 commit comments

Comments
 (0)