Message ID | 1499185483-29303-1-git-send-email-patrice.chotard@st.com |
---|---|
State | Accepted |
Commit | c5c1756c68bd9ba6f6e72e642340c483b754bd8b |
Delegated to: | Tom Rini |
Headers | show |
On Tue, Jul 04, 2017 at 06:24:43PM +0200, Patrice Chotard wrote: > From: Patrice Chotard <patrice.chotard@st.com> > > To set wait state, a hard coded value is used instead of using > latency parameter. stm32_flash_latency_cfg() is currently used > in arch/arm/mach-stm32/stm32f4/clock.c and in > drivers/clk/clk_stm32f7.c with, in both case, "5" as parameter. > > Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Applied to u-boot/master, thanks!
diff --git a/drivers/mtd/stm32_flash.c b/drivers/mtd/stm32_flash.c index e16b6cd..472499d 100644 --- a/drivers/mtd/stm32_flash.c +++ b/drivers/mtd/stm32_flash.c @@ -17,7 +17,7 @@ flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; void stm32_flash_latency_cfg(int latency) { /* 5 wait states, Prefetch enabled, D-Cache enabled, I-Cache enabled */ - writel(FLASH_ACR_WS(5) | FLASH_ACR_PRFTEN | FLASH_ACR_ICEN + writel(FLASH_ACR_WS(latency) | FLASH_ACR_PRFTEN | FLASH_ACR_ICEN | FLASH_ACR_DCEN, &STM32_FLASH->acr); }