Skip to content

Commit 9e43650

Browse files
boot: zephyr: fix getting base address for certain boards
This fixes the build for boards who have have a flexspi controller but having different controller assigned to zephyr,flash-controller in the DTS. Signed-off-by: Andre Heinemans <[email protected]>
1 parent 084643f commit 9e43650

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
@@ -39,7 +39,8 @@ BOOT_LOG_MODULE_DECLARE(mcuboot);
3939
#error "FLASH_DEVICE_NODE could not be determined"
4040
#endif
4141

42-
#elif (DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nxp_imx_flexspi)) && DT_HAS_CHOSEN(zephyr_flash_controller))
42+
#elif (DT_NODE_HAS_COMPAT(DT_PARENT(DT_CHOSEN(zephyr_flash_controller)), \
43+
nxp_imx_flexspi))
4344
#define FLASH_DEVICE_ID SPI_FLASH_0_ID
4445
#define FLASH_DEVICE_NODE DT_CHOSEN(zephyr_flash_controller)
4546
#define FLASH_DEVICE_BASE DT_REG_ADDR_BY_IDX(DT_PARENT(FLASH_DEVICE_NODE), 1)

0 commit comments

Comments
 (0)