net: fsl_enetc: fix imdio register calculation
authorThomas Schaefer <thomas.schaefer@kontron.com>
Mon, 28 Apr 2025 09:59:46 +0000 (11:59 +0200)
committerFabio Estevam <festevam@gmail.com>
Mon, 12 May 2025 21:43:19 +0000 (18:43 -0300)
commit9373e5aecfc5baf94534e2e7cc2270a09fc349b4
tree8909f92956de0e8d33ed49827deced4ccb714b3a
parent0780b94afd010b66e146b740e4c7c7f33a869975
net: fsl_enetc: fix imdio register calculation

With commit cc4e8af2c552, fsl_enetc register accessors have been split to
handle different register offsets on different SoCs. However, for
internal MDIO register calculation, only ENETC_PM_IMDIO_BASE was fixed
without adding the SoC specific MAC register offset.

As a result, the network support for the Kontron SMARC-sAL28 and
probably other boards based on the LS1028A CPU is broken.

Add the SoC specific MAC register offset to calculation of imdio.priv to
fix this.

Fixes: cc4e8af2c552 ("net: fsl_enetc: Split register accessors")
Signed-off-by: Thomas Schaefer <thomas.schaefer@kontron.com>
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Reviewed-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # LS1028A
Tested-by: Tim Harvey <tharvey@gateworks.com> # imx95_19x19_evk
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Alice Guo <alice.guo@nxp.com>
drivers/net/fsl_enetc.c