Skip to content

Commit cbd3310

Browse files
AndreHeinemans-NXPde-nordic
authored andcommitted
boot: zephyr: get base addres from dts for flexspi devices
Flexspi devices have their AHB address available in the dts which value is now assigned to FLASH_DEVICE_BASE Signed-off-by: Andre Heinemans <andre.heinemans@nxp.com>
1 parent 425e22b commit cbd3310

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

boot/zephyr/flash_map_extended.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ 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))
43+
#define FLASH_DEVICE_ID SPI_FLASH_0_ID
44+
#define FLASH_DEVICE_NODE DT_CHOSEN(zephyr_flash_controller)
45+
#define FLASH_DEVICE_BASE DT_REG_ADDR_BY_IDX(DT_PARENT(FLASH_DEVICE_NODE), 1)
46+
4247
#elif (!defined(CONFIG_XTENSA) && DT_HAS_CHOSEN(zephyr_flash_controller))
4348
#define FLASH_DEVICE_ID SOC_FLASH_0_ID
4449
#define FLASH_DEVICE_BASE CONFIG_FLASH_BASE_ADDRESS

0 commit comments

Comments
 (0)