Skip to content

Commit 95c2968

Browse files
ioannisgandrewboie
authored andcommitted
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 <[email protected]>
1 parent 48fa076 commit 95c2968

File tree

10 files changed

+32
-28
lines changed

10 files changed

+32
-28
lines changed

drivers/serial/uart_mcux_lpuart.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
#include <device.h>
99
#include <drivers/uart.h>
1010
#include <drivers/clock_control.h>
11-
#include <fsl_lpuart.h>
1211
#include <soc.h>
12+
#include <fsl_lpuart.h>
1313

1414
struct mcux_lpuart_config {
1515
LPUART_Type *base;

soc/arm/nxp_imx/rt/soc.h

+2-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@
1313

1414
#include <fsl_common.h>
1515

16-
/* ARM CMSIS definitions must be included before kernel_includes.h.
17-
* Therefore, it is essential to include kernel_includes.h after including
18-
* core SOC-specific headers.
19-
*/
20-
#include <kernel_includes.h>
16+
/* Add include for DTS generated information */
17+
#include <generated_dts_board.h>
2118

2219
#ifdef __cplusplus
2320
extern "C" {

soc/arm/nxp_kinetis/k6x/soc.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
#ifndef _ASMLANGUAGE
3131

3232
#include <fsl_common.h>
33-
#include <device.h>
34-
#include <sys/util.h>
35-
#include <random/rand32.h>
33+
34+
/* Add include for DTS generated information */
35+
#include <generated_dts_board.h>
3636

3737
#endif /* !_ASMLANGUAGE */
3838

soc/arm/nxp_kinetis/k8x/Kconfig.soc

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,4 @@ config WDOG_INIT
8080
requires that the watchdog be configured during reset
8181
handling.
8282

83-
endif # SOC_SERIES_KINETIS_KV5X
83+
endif # SOC_SERIES_KINETIS_K8X

soc/arm/nxp_kinetis/k8x/soc.h

+3-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#ifndef _SOC__H_
88
#define _SOC__H_
99

10-
#include <misc/util.h>
10+
#include <sys/util.h>
1111

1212
#ifdef __cplusplus
1313
extern "C" {
@@ -17,11 +17,8 @@ extern "C" {
1717

1818
#include <fsl_common.h>
1919

20-
/* ARM CMSIS definitions must be included before kernel_includes.h.
21-
* Therefore, it is essential to include kernel_includes.h after including
22-
* core SOC-specific headers.
23-
*/
24-
#include <kernel_includes.h>
20+
/* Add include for DTS generated information */
21+
#include <generated_dts_board.h>
2522

2623
#endif /* !_ASMLANGUAGE */
2724

soc/arm/nxp_kinetis/ke1xf/soc.h

+9
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,13 @@
99

1010
#include <sys/util.h>
1111

12+
#ifndef _ASMLANGUAGE
13+
14+
#include <fsl_common.h>
15+
16+
/* Add include for DTS generated information */
17+
#include <generated_dts_board.h>
18+
19+
#endif /* !_ASMLANGUAGE */
20+
1221
#endif /* _SOC__H_ */

soc/arm/nxp_kinetis/kl2x/soc.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
#ifndef _ASMLANGUAGE
1515

1616
#include <fsl_common.h>
17-
#include <device.h>
18-
#include <sys/util.h>
19-
#include <random/rand32.h>
17+
18+
/* Add include for DTS generated information */
19+
#include <generated_dts_board.h>
2020

2121
#endif /* !_ASMLANGUAGE */
2222

soc/arm/nxp_kinetis/kwx/soc.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
#ifndef _ASMLANGUAGE
2626

2727
#include <fsl_common.h>
28-
#include <device.h>
29-
#include <sys/util.h>
30-
#include <random/rand32.h>
28+
29+
/* Add include for DTS generated information */
30+
#include <generated_dts_board.h>
3131

3232
#endif /* !_ASMLANGUAGE */
3333

soc/arm/nxp_lpc/lpc54xxx/soc.h

+3-5
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,9 @@
1919
#include <sys/util.h>
2020
#include <fsl_common.h>
2121

22-
/* ARM CMSIS definitions must be included before kernel_includes.h.
23-
* Therefore, it is essential to include kernel_includes.h after including
24-
* core SOC-specific headers.
25-
*/
26-
#include <kernel_includes.h>
22+
/* Add include for DTS generated information */
23+
#include <generated_dts_board.h>
24+
2725
#endif /* !_ASMLANGUAGE */
2826

2927
#define IOCON_PIO_DIGITAL_EN 0x80u

soc/arm/nxp_lpc/lpc55xxx/soc.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@
1616
#define _SOC__H_
1717

1818
#ifndef _ASMLANGUAGE
19-
#include <device.h>
2019
#include <sys/util.h>
2120
#include <fsl_common.h>
21+
22+
/* Add include for DTS generated information */
23+
#include <generated_dts_board.h>
24+
2225
#endif /* !_ASMLANGUAGE */
2326

2427
#define IOCON_PIO_DIGITAL_EN 0x0100u /*!<@brief Enables digital function */

0 commit comments

Comments
 (0)