From eed678612b22958401be4159904977108b1af93a Mon Sep 17 00:00:00 2001 From: Erwan Gouriou Date: Wed, 19 Oct 2016 14:44:02 +0200 Subject: [PATCH] clock_control: have FLASH_BASE compatible with ST CMSIS files In ST CMSIS files, FLASH_BASE does not mean base address of FLASH register Instead FLASH_R_BASE is used. stm32f1 clock control driver is updated to be compatible with this naming. Change-Id: Ic4fb49c60c392e15fd12c69266baf4c686bd343b Signed-off-by: Erwan Gouriou --- arch/arm/soc/st_stm32/stm32f1/soc.h | 2 +- drivers/clock_control/stm32f10x_clock.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/soc/st_stm32/stm32f1/soc.h b/arch/arm/soc/st_stm32/stm32f1/soc.h index 5ffd2f14f66..e009c2d3b4f 100644 --- a/arch/arm/soc/st_stm32/stm32f1/soc.h +++ b/arch/arm/soc/st_stm32/stm32f1/soc.h @@ -65,7 +65,7 @@ #define IWDG_BASE (APB1PERIPH_BASE + 0x3000) /* FLASH */ -#define FLASH_BASE (AHBPERIPH_BASE + 0x2000) +#define FLASH_R_BASE (AHBPERIPH_BASE + 0x2000) #ifndef _ASMLANGUAGE diff --git a/drivers/clock_control/stm32f10x_clock.c b/drivers/clock_control/stm32f10x_clock.c index 4535de4ad20..8e09bf3ef0e 100644 --- a/drivers/clock_control/stm32f10x_clock.c +++ b/drivers/clock_control/stm32f10x_clock.c @@ -205,7 +205,7 @@ static const struct clock_control_driver_api stm32f10x_clock_control_api = { static inline void __setup_flash(void) { volatile struct stm32f10x_flash *flash = - (struct stm32f10x_flash *)(FLASH_BASE); + (struct stm32f10x_flash *)(FLASH_R_BASE); if (CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC <= 24000000) { flash->acr.bit.latency = STM32F10X_FLASH_LATENCY_0;