drivers: flash: nxp mcux: Replace DT_FLASH define

Replace DT_FLASH_WRITE_BLOCK_SIZE with new DT_INST_NODE_HAS_PROP and
DT_INST_PROP macro as we phase out DT_FLASH define usage.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2020-04-08 10:01:34 -05:00 committed by Kumar Gala
commit 19e91ab9f2

View file

@ -142,8 +142,8 @@ static const struct flash_driver_api flash_mcux_api = {
#if defined(CONFIG_FLASH_PAGE_LAYOUT)
.page_layout = flash_mcux_pages_layout,
#endif
#ifdef DT_FLASH_WRITE_BLOCK_SIZE
.write_block_size = DT_FLASH_WRITE_BLOCK_SIZE,
#if DT_INST_NODE_HAS_PROP(0, write_block_size)
.write_block_size = DT_INST_PROP(0, write_block_size),
#else
.write_block_size = FSL_FEATURE_FLASH_PFLASH_BLOCK_WRITE_UNIT_SIZE,
#endif