Skip to content

Commit 8167efa

Browse files
decsnykartben
authored andcommitted
soc: nxp: imxrt7xx: Split soc code files
Instead of one soc.c with all the code, split into files for each area of concern. Signed-off-by: Declan Snyder <[email protected]>
1 parent 6cb2bf5 commit 8167efa

File tree

3 files changed

+36
-34
lines changed

3 files changed

+36
-34
lines changed

soc/nxp/imxrt/imxrt7xx/cm33/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ zephyr_compile_definitions(FSL_SDK_DRIVER_QUICK_ACCESS_ENABLE)
1111

1212
zephyr_include_directories(.)
1313

14-
zephyr_sources(soc.c)
14+
zephyr_sources(init.c)
15+
16+
zephyr_sources_ifdef(CONFIG_MIPI_DSI display_if.c)
1517

1618
if(CONFIG_FLASH_MCUX_XSPI_XIP)
1719
zephyr_sources(flash_clock_setup.c)

soc/nxp/imxrt/imxrt7xx/cm33/soc.c renamed to soc/nxp/imxrt/imxrt7xx/cm33/display_if.c

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,11 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
/**
8-
* @file
9-
* @brief System/hardware module for NXP RT7XX platform
10-
*
11-
* This module provides routines to initialize and support board-level
12-
* hardware for the RT7XX platforms.
13-
*/
14-
15-
#include <zephyr/init.h>
167
#include <zephyr/devicetree.h>
17-
#include <zephyr/linker/sections.h>
18-
#include <zephyr/cache.h>
19-
#include <soc.h>
8+
#include <zephyr/autoconf.h>
209
#include "fsl_power.h"
2110
#include "fsl_clock.h"
2211

23-
void soc_early_init_hook(void)
24-
{
25-
/* Enable data cache */
26-
sys_cache_data_enable();
27-
28-
__ISB();
29-
__DSB();
30-
}
31-
32-
#ifdef CONFIG_SOC_RESET_HOOK
33-
34-
void soc_reset_hook(void)
35-
{
36-
SystemInit();
37-
}
38-
39-
#endif /* CONFIG_SOC_RESET_HOOK */
40-
41-
#ifdef CONFIG_MIPI_DSI
4212
/* Weak so board can override this function */
4313
void __weak imxrt_pre_init_display_interface(void)
4414
{
@@ -105,5 +75,3 @@ void __weak imxrt_deinit_display_interface(void)
10575
/* Remove clock from DPHY */
10676
CLOCK_AttachClk(kNONE_to_MIPI_DSI_HOST_PHY);
10777
}
108-
109-
#endif

soc/nxp/imxrt/imxrt7xx/cm33/init.c

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Copyright 2024,2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/**
8+
* @file
9+
* @brief System/hardware module for NXP RT7XX platform
10+
*
11+
* This module provides routines to initialize and support board-level
12+
* hardware for the RT7XX platforms.
13+
*/
14+
15+
#include <zephyr/init.h>
16+
#include <zephyr/autoconf.h>
17+
#include <zephyr/cache.h>
18+
#include <soc.h>
19+
20+
void soc_early_init_hook(void)
21+
{
22+
/* Enable data cache */
23+
sys_cache_data_enable();
24+
25+
__ISB();
26+
__DSB();
27+
}
28+
29+
void soc_reset_hook(void)
30+
{
31+
SystemInit();
32+
}

0 commit comments

Comments
 (0)