soc: arm: do not include kernel headers in soc.h

We shall not include core kernel headers in soc.h
header of ARM SoCs. We should try to only include
the vendor headers and auto-generated board header
from DTS. This commit implements this policy for
the SoCs, whose builds have shown to fail due to
header inclusion cycles.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
Ioannis Glaropoulos 2019-09-24 21:42:10 +02:00 committed by Anas Nashif
commit affddef4cf
6 changed files with 24 additions and 30 deletions

View file

@ -12,6 +12,8 @@
#ifndef _ARM_BEETLE_SOC_H_
#define _ARM_BEETLE_SOC_H_
#include <sys/util.h>
#ifndef _ASMLANGUAGE
#include "CMSDK_BEETLE.h"
#endif
@ -93,11 +95,8 @@
#ifndef _ASMLANGUAGE
/* ARM CMSIS definitions must be included before kernel_includes.h.
* Therefore, it is essential to include kernel_includes.h after including
* core SOC-specific headers.
*/
#include <kernel_includes.h>
/* Add include for DTS generated information */
#include <generated_dts_board.h>
#include "soc_pins.h"
#include "soc_power.h"

View file

@ -13,6 +13,8 @@
#ifndef _ATMEL_SAME70_SOC_H_
#define _ATMEL_SAME70_SOC_H_
#include <sys/util.h>
#ifndef _ASMLANGUAGE
#define DONT_USE_CMSIS_INIT
@ -64,11 +66,8 @@
#include "../common/soc_pmc.h"
#include "../common/soc_gpio.h"
/* ARM CMSIS definitions must be included before kernel_includes.h.
* Therefore, it is essential to include kernel_includes.h after including
* core SOC-specific headers.
*/
#include <kernel_includes.h>
/* Add include for DTS generated information */
#include <generated_dts_board.h>
#endif /* _ASMLANGUAGE */

View file

@ -18,15 +18,14 @@
#ifndef _STM32F4_SOC_H_
#define _STM32F4_SOC_H_
#include <sys/util.h>
#ifndef _ASMLANGUAGE
#include <stm32f4xx.h>
/* ARM CMSIS definitions must be included before kernel_includes.h.
* Therefore, it is essential to include kernel_includes.h after including
* core SOC-specific headers.
*/
#include <kernel_includes.h>
/* Add include for DTS generated information */
#include <generated_dts_board.h>
#ifdef CONFIG_EXTI_STM32
#include <stm32f4xx_ll_exti.h>

View file

@ -17,15 +17,14 @@
#ifndef _STM32F7_SOC_H_
#define _STM32F7_SOC_H_
#include <sys/util.h>
#ifndef _ASMLANGUAGE
#include <stm32f7xx.h>
/* ARM CMSIS definitions must be included before kernel_includes.h.
* Therefore, it is essential to include kernel_includes.h after including
* core SOC-specific headers.
*/
#include <kernel_includes.h>
/* Add include for DTS generated information */
#include <generated_dts_board.h>
#ifdef CONFIG_EXTI_STM32
#include <stm32f7xx_ll_exti.h>

View file

@ -19,16 +19,15 @@
#ifndef _STM32L4X_SOC_H_
#define _STM32L4X_SOC_H_
#include <sys/util.h>
#ifndef _ASMLANGUAGE
#include <autoconf.h>
#include <stm32l4xx.h>
/* ARM CMSIS definitions must be included before kernel_includes.h.
* Therefore, it is essential to include kernel_includes.h after including
* core SOC-specific headers.
*/
#include <kernel_includes.h>
/* Add include for DTS generated information */
#include <generated_dts_board.h>
#ifdef CONFIG_EXTI_STM32
#include <stm32l4xx_ll_exti.h>

View file

@ -17,15 +17,14 @@
#ifndef _STM32WBX_SOC_H_
#define _STM32WBX_SOC_H_
#include <sys/util.h>
#ifndef _ASMLANGUAGE
#include <stm32wbxx.h>
/* ARM CMSIS definitions must be included before kernel_includes.h.
* Therefore, it is essential to include kernel_includes.h after including
* core SOC-specific headers.
*/
#include <kernel_includes.h>
/* Add include for DTS generated information */
#include <generated_dts_board.h>
#ifdef CONFIG_GPIO_STM32
#include <stm32wbxx_ll_gpio.h>