flash: dts: replace DT_FLASH_{ERASE,WRITE}_BLOCK_SIZE with new macros
Replace: DT_FLASH_ERASE_BLOCK_SIZE -> DT_PROP(DT_CHOSEN(zephyr_flash), erase_block_size) DT_FLASH_WRITE_BLOCK_SIZE -> DT_PROP(DT_CHOSEN(zephyr_flash), write_block_size) As this allows us to phase out the old generator. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
673b1da46d
commit
8101a0f661
4 changed files with 15 additions and 8 deletions
|
@ -31,9 +31,12 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
|||
#define FLASH_AREA_IMAGE_SECONDARY DT_FLASH_AREA_IMAGE_1_ID
|
||||
#endif /* CONFIG_TRUSTED_EXECUTION_NONSECURE */
|
||||
|
||||
BUILD_ASSERT((CONFIG_IMG_BLOCK_BUF_SIZE % DT_FLASH_WRITE_BLOCK_SIZE == 0),
|
||||
#define FLASH_WRITE_BLOCK_SIZE \
|
||||
DT_PROP(DT_CHOSEN(zephyr_flash), write_block_size)
|
||||
|
||||
BUILD_ASSERT((CONFIG_IMG_BLOCK_BUF_SIZE % FLASH_WRITE_BLOCK_SIZE == 0),
|
||||
"CONFIG_IMG_BLOCK_BUF_SIZE is not a multiple of "
|
||||
"DT_FLASH_WRITE_BLOCK_SIZE");
|
||||
"FLASH_WRITE_BLOCK_SIZE");
|
||||
|
||||
static bool flash_verify(const struct flash_area *fa, off_t offset,
|
||||
u8_t *data, size_t len)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue