soc: arm: nxp: cleanup in soc.h headers

A commit that organizes the soc.h header of NXP SoCs:
- removing redundant inclusions of sys/util.h
- removing inclusions of device.h and kernel_includes.h
- including the auto-generated DTS board header
- including the fsl_common.h header
- fixing minor style issues

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
Ioannis Glaropoulos 2019-09-22 19:24:34 +02:00 committed by Andrew Boie
commit 95c2968d32
10 changed files with 32 additions and 28 deletions

View file

@ -8,8 +8,8 @@
#include <device.h>
#include <drivers/uart.h>
#include <drivers/clock_control.h>
#include <fsl_lpuart.h>
#include <soc.h>
#include <fsl_lpuart.h>
struct mcux_lpuart_config {
LPUART_Type *base;

View file

@ -13,11 +13,8 @@
#include <fsl_common.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 __cplusplus
extern "C" {

View file

@ -30,9 +30,9 @@
#ifndef _ASMLANGUAGE
#include <fsl_common.h>
#include <device.h>
#include <sys/util.h>
#include <random/rand32.h>
/* Add include for DTS generated information */
#include <generated_dts_board.h>
#endif /* !_ASMLANGUAGE */

View file

@ -80,4 +80,4 @@ config WDOG_INIT
requires that the watchdog be configured during reset
handling.
endif # SOC_SERIES_KINETIS_KV5X
endif # SOC_SERIES_KINETIS_K8X

View file

@ -7,7 +7,7 @@
#ifndef _SOC__H_
#define _SOC__H_
#include <misc/util.h>
#include <sys/util.h>
#ifdef __cplusplus
extern "C" {
@ -17,11 +17,8 @@ extern "C" {
#include <fsl_common.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

@ -9,4 +9,13 @@
#include <sys/util.h>
#ifndef _ASMLANGUAGE
#include <fsl_common.h>
/* Add include for DTS generated information */
#include <generated_dts_board.h>
#endif /* !_ASMLANGUAGE */
#endif /* _SOC__H_ */

View file

@ -14,9 +14,9 @@
#ifndef _ASMLANGUAGE
#include <fsl_common.h>
#include <device.h>
#include <sys/util.h>
#include <random/rand32.h>
/* Add include for DTS generated information */
#include <generated_dts_board.h>
#endif /* !_ASMLANGUAGE */

View file

@ -25,9 +25,9 @@
#ifndef _ASMLANGUAGE
#include <fsl_common.h>
#include <device.h>
#include <sys/util.h>
#include <random/rand32.h>
/* Add include for DTS generated information */
#include <generated_dts_board.h>
#endif /* !_ASMLANGUAGE */

View file

@ -19,11 +19,9 @@
#include <sys/util.h>
#include <fsl_common.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 */
#define IOCON_PIO_DIGITAL_EN 0x80u

View file

@ -16,9 +16,12 @@
#define _SOC__H_
#ifndef _ASMLANGUAGE
#include <device.h>
#include <sys/util.h>
#include <fsl_common.h>
/* Add include for DTS generated information */
#include <generated_dts_board.h>
#endif /* !_ASMLANGUAGE */
#define IOCON_PIO_DIGITAL_EN 0x0100u /*!<@brief Enables digital function */