watchdog: nxp_s32: use instance-based DT macros
At present, many of the NXP S32 shim drivers do not make use of devicetree instance-based macros because the NXP S32 HAL relies on an index-based approach, requiring knowledge of the peripheral instance index during both compilation and runtime, and this index might not align with the devicetree instance index. The proposed solution in this patch eliminates this limitation by determining the peripheral instance index during compilation through macrobatics and defining the driver's ISR within the shim driver itself. Note that for some peripheral instances is needed to redefine the HAL macros of the peripheral base address, since the naming is not uniform for all instances. Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
This commit is contained in:
parent
0fdb50b869
commit
6744d6084d
2 changed files with 40 additions and 38 deletions
|
@ -18,4 +18,19 @@
|
|||
/* LINFlexD*/
|
||||
#define IP_LINFLEX_12_BASE IP_MSC_0_LIN_BASE
|
||||
|
||||
/* SWT */
|
||||
#define IP_SWT_0_BASE IP_CE_SWT_0_BASE
|
||||
#define IP_SWT_1_BASE IP_CE_SWT_1_BASE
|
||||
#define IP_SWT_2_BASE IP_RTU0__SWT_0_BASE
|
||||
#define IP_SWT_3_BASE IP_RTU0__SWT_1_BASE
|
||||
#define IP_SWT_4_BASE IP_RTU0__SWT_2_BASE
|
||||
#define IP_SWT_5_BASE IP_RTU0__SWT_3_BASE
|
||||
#define IP_SWT_6_BASE IP_RTU0__SWT_4_BASE
|
||||
#define IP_SWT_7_BASE IP_RTU1__SWT_0_BASE
|
||||
#define IP_SWT_8_BASE IP_RTU1__SWT_1_BASE
|
||||
#define IP_SWT_9_BASE IP_RTU1__SWT_2_BASE
|
||||
#define IP_SWT_10_BASE IP_RTU1__SWT_3_BASE
|
||||
#define IP_SWT_11_BASE IP_RTU1__SWT_4_BASE
|
||||
#define IP_SWT_12_BASE IP_SMU__SWT_BASE
|
||||
|
||||
#endif /* _NXP_S32_S32ZE_SOC_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue