drivers : flash: update way to get flash size
The LL_GetFlashSize function has been removed for this new HAL H7RS release. Retrieves the value now from the devicetree using the DT_REG_SIZE macro. Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
This commit is contained in:
parent
e3b4711597
commit
0e41b07309
@ -45,7 +45,7 @@ LOG_MODULE_REGISTER(LOG_DOMAIN);
|
||||
#define REAL_FLASH_SIZE_KB (KB(STM32H7_M4_FLASH_SIZE * 2))
|
||||
#endif
|
||||
#else
|
||||
#define REAL_FLASH_SIZE_KB KB(LL_GetFlashSize())
|
||||
#define REAL_FLASH_SIZE_KB DT_REG_SIZE(DT_INST(0, st_stm32_nv_flash))
|
||||
#endif
|
||||
#define SECTOR_PER_BANK ((REAL_FLASH_SIZE_KB / FLASH_SECTOR_SIZE) / 2)
|
||||
#if defined(DUAL_BANK)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user