Skip to content

Commit b92c645

Browse files
manuarguecarlescufi
authored andcommitted
s32: convert to hwmv2
SoC S32Z27 folder is renamed to S32Z270 to align with changes to `CONFIG_SOC_S32Z270`. Compatibility with hwmv1 is maintained until support is merged to main. Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
1 parent d45b14c commit b92c645

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+21
-24
lines changed

s32/CMakeLists.txt

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
1-
# Copyright 2022-2023 NXP
1+
# Copyright 2022-2024 NXP
22

33
# Set the SoC specific drivers and configuration to build
4-
if(${CONFIG_SOC} STREQUAL "s32z27")
4+
if(HWMv2)
55
set(SOC_BASE ${CONFIG_SOC})
6-
set(DRIVERS_BASE s32ze)
7-
elseif(${CONFIG_SOC} MATCHES "s32k3.*")
8-
set(SOC_BASE ${CONFIG_SOC})
9-
set(DRIVERS_BASE s32k3)
10-
elseif(${CONFIG_SOC} MATCHES "s32k1.*")
11-
set(SOC_BASE ${CONFIG_SOC})
12-
set(DRIVERS_BASE s32k1)
136
else()
14-
message(FATAL_ERROR "SoC ${CONFIG_SOC} not supported")
7+
if(${CONFIG_SOC} STREQUAL "s32z27")
8+
set(SOC_BASE "s32z270")
9+
else()
10+
set(SOC_BASE ${CONFIG_SOC})
11+
endif()
1512
endif()
1613

17-
add_subdirectory(drivers/${DRIVERS_BASE})
14+
add_subdirectory(drivers/${SOC_SERIES})
1815
add_subdirectory(soc/${SOC_BASE})
1916

2017
if(CONFIG_HAS_MCUX)
@@ -60,7 +57,7 @@ if(CONFIG_HAS_MCUX)
6057
set(MCUX_SDK_PROJECT_NAME ${ZEPHYR_CURRENT_LIBRARY})
6158

6259
# Translate the SoC name into the MCUX device
63-
string(TOUPPER ${CONFIG_SOC} MCUX_DEVICE)
60+
string(TOUPPER ${SOC_BASE} MCUX_DEVICE)
6461

6562
# This is normally done in mcux/hal_nxp.cmake, but we need to point to the
6663
# path on this directory instead

s32/mcux/devices/S32Z27/S32Z27_features.h renamed to s32/mcux/devices/S32Z270/S32Z270_features.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright 2023 NXP
2+
* Copyright 2023-2024 NXP
33
*
44
* SPDX-License-Identifier: BSD-3-Clause
55
*/
66

7-
#ifndef _S32Z27_FEATURES_H_
8-
#define _S32Z27_FEATURES_H_
7+
#ifndef _S32Z270_FEATURES_H_
8+
#define _S32Z270_FEATURES_H_
99

1010
/* SOC module features */
1111

@@ -41,4 +41,4 @@
4141
/* @brief Has ERRATA_051617. */
4242
#define FSL_FEATURE_I3C_HAS_ERRATA_051617 (1)
4343

44-
#endif /* _S32Z27_FEATURES_H_ */
44+
#endif /* _S32Z270_FEATURES_H_ */

s32/mcux/devices/S32Z27/S32Z27_glue_mcux.h renamed to s32/mcux/devices/S32Z270/S32Z270_glue_mcux.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright 2023 NXP
2+
* Copyright 2023-2024 NXP
33
*
44
* SPDX-License-Identifier: BSD-3-Clause
55
*/
66

7-
#ifndef _S32Z27_GLUE_MCUX_H_
8-
#define _S32Z27_GLUE_MCUX_H_
7+
#ifndef _S32Z270_GLUE_MCUX_H_
8+
#define _S32Z270_GLUE_MCUX_H_
99

1010
/* PIT - Peripheral instance base addresses */
1111
/** Peripheral PIT0 base address */
@@ -48,4 +48,4 @@
4848
#define I3C_IBIEXT2_EXT6(x) 0
4949
#define I3C_IBIEXT2_EXT7(x) 0
5050

51-
#endif /* _S32Z27_GLUE_MCUX_H_ */
51+
#endif /* _S32Z270_GLUE_MCUX_H_ */

s32/mcux/devices/S32Z27/fsl_device_registers.h renamed to s32/mcux/devices/S32Z270/fsl_device_registers.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023 NXP
2+
* Copyright 2023-2024 NXP
33
*
44
* SPDX-License-Identifier: BSD-3-Clause
55
*/
@@ -13,12 +13,12 @@
1313
* The CPU macro should be declared in the project or makefile.
1414
*/
1515

16-
#if defined(CPU_S32Z27)
16+
#if defined(CPU_S32Z270)
1717

1818
/* CMSIS-style register definitions */
1919
#include "S32Z2.h"
2020
/* CPU specific feature definitions */
21-
#include "S32Z27_features.h"
21+
#include "S32Z270_features.h"
2222

2323
/* Define the IRQ types for RTU sub-system */
2424
#define IRQn_Type RTU_IRQn_Type
@@ -28,7 +28,7 @@
2828
* In order to reuse RTD CMSIS-based headers for the MCUX drivers, is needed
2929
* to redefine the peripheral macros from IP_PERIPHERAL_n to PERIPHERALn.
3030
*/
31-
#include "S32Z27_glue_mcux.h"
31+
#include "S32Z270_glue_mcux.h"
3232

3333
/* Dummy implementations just to build mcux/mcux-sdk/drivers/common/fsl_common_arm.h */
3434
#define __GIC_PRESENT 0
File renamed without changes.

0 commit comments

Comments
 (0)