flash: soc_flash_mcux: Convert FLASH_ERASE_BLOCK_SIZE to DT_

Convert generic FLASH_ERASE_BLOCK_SIZE to driver specific generated
define DT_SOC_NV_FLASH_0_ERASE_BLOCK_SIZE.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2019-02-08 12:19:50 -06:00 committed by Kumar Gala
parent f6c7e9a997
commit 590b5a08a2
1 changed files with 2 additions and 2 deletions

View File

@ -113,8 +113,8 @@ 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) / FLASH_ERASE_BLOCK_SIZE,
.pages_size = FLASH_ERASE_BLOCK_SIZE,
.pages_count = KB(CONFIG_FLASH_SIZE) / DT_SOC_NV_FLASH_0_ERASE_BLOCK_SIZE,
.pages_size = DT_SOC_NV_FLASH_0_ERASE_BLOCK_SIZE,
};
static void flash_mcux_pages_layout(struct device *dev,