soc: stm32h7: Add support for Cortex-M4 core

Add support for C-M4 core on STM32H7 series.
It is enabled in Dual core context with 2 alternatives boot methods:
* Boot CM4 CM7: Both core boot at reset, then CM4 enters Stop mode.
CM7 performs system configuration then finally wakes up CM4
* Boot CM7, CM4 Gated: Only CM7 boots at reset. Once done with
system configuration it triggers (requires option byte update)

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2019-07-01 14:26:13 +02:00 committed by Anas Nashif
commit 141b6500c9
5 changed files with 178 additions and 0 deletions

View file

@ -17,6 +17,23 @@
*/
#include <kernel_includes.h>
#ifdef CONFIG_STM32H7_DUAL_CORE
#define LL_HSEM_ID_0 (0U) /* HW semaphore 0 */
#define LL_HSEM_MASK_0 (1 << LL_HSEM_ID_0)
#include <stm32h7xx_ll_hsem.h>
#ifdef CONFIG_CPU_CORTEX_M4
#include <stm32h7xx_ll_bus.h>
#include <stm32h7xx_ll_pwr.h>
#include <stm32h7xx_ll_cortex.h>
#endif /* CONFIG_CPU_CORTEX_M4 */
#endif /* CONFIG_STM32H7_DUAL_CORE */
#ifdef CONFIG_CLOCK_CONTROL_STM32_CUBE
#include <stm32h7xx_ll_bus.h>
#include <stm32h7xx_ll_rcc.h>