drivers: mdio: nxp_s32_netc: 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:
Manuel Argüelles 2023-10-05 14:51:26 +07:00 committed by Carles Cufí
commit b3f950c648
2 changed files with 30 additions and 18 deletions

View file

@ -48,4 +48,7 @@
#define IP_STM_11_BASE IP_SMU__STM_0_BASE
#define IP_STM_12_BASE IP_SMU__STM_2_BASE
/* NETC */
#define IP_NETC_EMDIO_0_BASE IP_NETC__EMDIO_BASE_BASE
#endif /* _NXP_S32_S32ZE_SOC_H_ */