diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index db1be3705b814a95b5573ab692994133ac41a7f7..f1c3247f42385b06160707d4f40095cd0ce2f2bc 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -708,6 +708,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #if defined(CONFIG_STM32F7_DCACHE_ON) && defined(CONFIG_STM32F7_ICACHE_ON) stm32f7_cache_sync_range(images.os.load, images.os.load + images.os.image_len); + stm32f7_envm_as_dev(); #endif boot_fn(0, argc, argv, &images); diff --git a/cpu/arm_cortexm3/envm.h b/cpu/arm_cortexm3/envm.h index 6783c229d1a23085591c57e09033df36431f5274..91cd266145312c8a9f64f598251f862f254c7a92 100644 --- a/cpu/arm_cortexm3/envm.h +++ b/cpu/arm_cortexm3/envm.h @@ -64,9 +64,4 @@ unsigned int void envm_config(u32 wait_states); #endif /* CONFIG_SYS_STM32 */ -#if defined(CONFIG_STM32F7_DCACHE_ON) || defined(CONFIG_STM32F7_ICACHE_ON) -void stm32f7_envm_as_dev(void); -void stm32f7_envm_as_mem(void); -#endif - #endif /* __ENVM_H__ */ diff --git a/cpu/arm_cortexm3/stm32/envm.c b/cpu/arm_cortexm3/stm32/envm.c index 3e00406a3f86fafcf8e6ba16720ce3f7bf059161..11087d4d7496e3623dd5745cc13548072b8f9588 100644 --- a/cpu/arm_cortexm3/stm32/envm.c +++ b/cpu/arm_cortexm3/stm32/envm.c @@ -23,6 +23,8 @@ #include #include +#include + #include "envm.h" /* diff --git a/include/asm-arm/cache.h b/include/asm-arm/cache.h index 3ef74b9874d4dbbac110ce500047ed20a4c5d4d5..f6fdb271bd71abf54ef5c72f4e026f5dd2b42d75 100644 --- a/include/asm-arm/cache.h +++ b/include/asm-arm/cache.h @@ -34,6 +34,9 @@ * a memory region, and will be executed. */ void stm32f7_cache_sync_range(u32 s, u32 e); + +void stm32f7_envm_as_dev(void); +void stm32f7_envm_as_mem(void); #endif /*