zephyr: convert DT_JEDEC_SPI_NOR_0_LABEL to new dt macros
As the DT define DT_JEDEC_SPI_NOR_0_LABEL is intended to be deprecated move to the new macro style to determine for DT_JEDEC_SPI_NOR_0_LABEL Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
32b61f333b
commit
9a5b95158e
|
@ -25,11 +25,15 @@
|
|||
|
||||
#endif /* !defined(MCUBOOT_TARGET_CONFIG) */
|
||||
|
||||
#if DT_NODE_HAS_PROP(DT_INST(0, jedec_spi_nor), label)
|
||||
#define JEDEC_SPI_NOR_0_LABEL DT_LABEL(DT_INST(0, jedec_spi_nor))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Sanity check the target support.
|
||||
*/
|
||||
#if (!defined(CONFIG_XTENSA) && !defined(DT_CHOSEN_ZEPHYR_FLASH_CONTROLLER_LABEL)) || \
|
||||
(defined(CONFIG_XTENSA) && !defined(DT_JEDEC_SPI_NOR_0_LABEL)) || \
|
||||
(defined(CONFIG_XTENSA) && !defined(JEDEC_SPI_NOR_0_LABEL)) || \
|
||||
!defined(FLASH_ALIGN) || \
|
||||
!defined(DT_FLASH_AREA_IMAGE_0_OFFSET) || \
|
||||
!defined(DT_FLASH_AREA_IMAGE_0_SIZE) || \
|
||||
|
|
|
@ -284,9 +284,9 @@ void main(void)
|
|||
while (1)
|
||||
;
|
||||
}
|
||||
#elif (defined(CONFIG_XTENSA) && defined(DT_JEDEC_SPI_NOR_0_LABEL))
|
||||
if (!flash_device_get_binding(DT_JEDEC_SPI_NOR_0_LABEL)) {
|
||||
BOOT_LOG_ERR("Flash device %s not found", DT_JEDEC_SPI_NOR_0_LABEL);
|
||||
#elif (defined(CONFIG_XTENSA) && defined(JEDEC_SPI_NOR_0_LABEL))
|
||||
if (!flash_device_get_binding(JEDEC_SPI_NOR_0_LABEL)) {
|
||||
BOOT_LOG_ERR("Flash device %s not found", JEDEC_SPI_NOR_0_LABEL);
|
||||
while (1)
|
||||
;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue