From 1ae8905600f1c33ad4f4666c09459e42c683852f Mon Sep 17 00:00:00 2001 From: Cong Nguyen Huu Date: Mon, 7 Oct 2024 14:34:27 +0700 Subject: [PATCH] s32: s32ze: patch SENT for integration with zephyr Remove 'u' suffix from macros that used with LISTIFY in shim-driver Get number of the used controller instances form device tree Signed-off-by: Cong Nguyen Huu --- s32/drivers/s32ze/BaseNXP/header/S32Z2_SRX.h | 4 ++-- s32/soc/s32z270/include/Srx_Ip_Defines.h | 10 ++-------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/s32/drivers/s32ze/BaseNXP/header/S32Z2_SRX.h b/s32/drivers/s32ze/BaseNXP/header/S32Z2_SRX.h index fe82049bf..0c381dcec 100644 --- a/s32/drivers/s32ze/BaseNXP/header/S32Z2_SRX.h +++ b/s32/drivers/s32ze/BaseNXP/header/S32Z2_SRX.h @@ -69,7 +69,7 @@ */ /** SRX - Size of Registers Arrays */ -#define SRX_CNL_COUNT 8u +#define SRX_CNL_COUNT 8 /** SRX - Register Layout Typedef */ typedef struct { @@ -111,7 +111,7 @@ typedef struct { } SRX_Type, *SRX_MemMapPtr; /** Number of instances of the SRX module. */ -#define SRX_INSTANCE_COUNT (2u) +#define SRX_INSTANCE_COUNT 2 /* SRX - Peripheral instance base addresses */ /** Peripheral SRX_0 base address */ diff --git a/s32/soc/s32z270/include/Srx_Ip_Defines.h b/s32/soc/s32z270/include/Srx_Ip_Defines.h index d61e4bfc4..6b4e3e8cd 100644 --- a/s32/soc/s32z270/include/Srx_Ip_Defines.h +++ b/s32/soc/s32z270/include/Srx_Ip_Defines.h @@ -28,6 +28,7 @@ extern "C"{ #include "Mcal.h" +#include /*================================================================================================== * SOURCE FILE VERSION INFORMATION @@ -126,14 +127,7 @@ extern "C"{ * @details Number of configured controllers as defined by user in configuration tool * */ -#define SRX_IP_INSTANCE_COUNT 1U -/* -* @brief Max number of configured channels -* @details Max number of configured channels as defined by user in configuration tool -* -*/ - -#define SRX_IP_CHANNEL_COUNT 1U +#define SRX_IP_INSTANCE_COUNT DT_NUM_INST_STATUS_OKAY(nxp_s32_sent) #define SRX_IP_ISR_PROCESS_ERROR_HANDLER_CTRL0_COMBINED