Skip to content

Commit f90eee8

Browse files
committed
boot: zephyr: flash_map: stm32: Use nor parent reg address
Avoids issues when multiple xspi nodes are enabled Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
1 parent 67bc009 commit f90eee8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

boot/zephyr/flash_map_extended.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ BOOT_LOG_MODULE_DECLARE(mcuboot);
2424
/* MEMORY MAPPED for XiP on external NOR flash takes the sspi-nor or ospi-nor or qspi-nor device */
2525
#define FLASH_DEVICE_ID SPI_FLASH_0_ID
2626
#if DT_NODE_HAS_STATUS(DT_INST(0, st_stm32_xspi_nor), okay)
27+
#define DT_DRV_COMPAT st_stm32_xspi_nor
2728
#define FLASH_DEVICE_NODE DT_INST(0, st_stm32_xspi_nor)
28-
#define FLASH_DEVICE_BASE DT_REG_ADDR_BY_IDX(DT_INST(0, st_stm32_xspi),1)
29+
#define FLASH_DEVICE_BASE DT_REG_ADDR_BY_IDX(DT_INST_PARENT(0), 1)
2930
#elif DT_NODE_HAS_STATUS(DT_INST(0, st_stm32_ospi_nor), okay)
3031
#define FLASH_DEVICE_NODE DT_INST(0, st_stm32_ospi_nor)
3132
#define FLASH_DEVICE_BASE DT_REG_ADDR(DT_INST(0, st_stm32_ospi_nor))

0 commit comments

Comments
 (0)