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:
parent
19e91ab9f2
commit
c7f8b30f53
1 changed files with 1 additions and 3 deletions
|
@ -18,8 +18,6 @@
|
||||||
#include "fsl_common.h"
|
#include "fsl_common.h"
|
||||||
#include "fsl_flash.h"
|
#include "fsl_flash.h"
|
||||||
|
|
||||||
#define CONFIG_FLASH_SIZE DT_FLASH_SIZE
|
|
||||||
|
|
||||||
struct flash_priv {
|
struct flash_priv {
|
||||||
flash_config_t config;
|
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)
|
#if defined(CONFIG_FLASH_PAGE_LAYOUT)
|
||||||
static const struct flash_pages_layout dev_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),
|
DT_INST_PROP(0, erase_block_size),
|
||||||
.pages_size = DT_INST_PROP(0, erase_block_size),
|
.pages_size = DT_INST_PROP(0, erase_block_size),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue