Skip to content

Commit

Permalink
s32: s32ze: patch SENT for integration with zephyr
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
congnguyenhuu committed Oct 21, 2024
1 parent 942c9d6 commit 3d0ce64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
4 changes: 2 additions & 2 deletions s32/drivers/s32ze/BaseNXP/header/S32Z2_SRX.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 */
Expand Down
11 changes: 3 additions & 8 deletions s32/soc/s32z270/include/Srx_Ip_Defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ extern "C"{

#include "Mcal.h"

#define DT_DRV_COMPAT nxp_s32_sent_controller
#include <zephyr/devicetree.h>

/*==================================================================================================
* SOURCE FILE VERSION INFORMATION
Expand Down Expand Up @@ -126,14 +128,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(DT_DRV_COMPAT)

#define SRX_IP_ISR_PROCESS_ERROR_HANDLER_CTRL0_COMBINED

Expand Down

0 comments on commit 3d0ce64

Please sign in to comment.