drivers: flash: openisa rv32m1: Replace DT_FLASH define

Replace DT_FLASH_SIZE with new DT_INST_REG_SIZE 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:02:42 -05:00 committed by Kumar Gala
commit c7f8b30f53

View file

@ -18,8 +18,6 @@
#include "fsl_common.h"
#include "fsl_flash.h"
#define CONFIG_FLASH_SIZE DT_FLASH_SIZE
struct flash_priv {
flash_config_t config;
/*
@ -117,7 +115,7 @@ static int flash_mcux_write_protection(struct device *dev, bool enable)
#if defined(CONFIG_FLASH_PAGE_LAYOUT)
static const struct flash_pages_layout dev_layout = {
.pages_count = KB(CONFIG_FLASH_SIZE) /
.pages_count = DT_INST_REG_SIZE(0) /
DT_INST_PROP(0, erase_block_size),
.pages_size = DT_INST_PROP(0, erase_block_size),
};