amd-xgbe: reorganize the code of XPCS access
authorRaju Rangoju <Raju.Rangoju@amd.com>
Fri, 9 May 2025 15:53:21 +0000 (21:23 +0530)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 13 May 2025 11:29:40 +0000 (13:29 +0200)
commit2d4407160f601876a88376b3789ce2f59df21f4b
tree6b641d64d85056e49a27c6d0c01a4ff5fdcf5810
parent42bd96cb9ef444f209c3cda63e60b171a308ebd7
amd-xgbe: reorganize the code of XPCS access

The xgbe_{read/write}_mmd_regs_v* functions have common code which can
be moved to helper functions. Add new helper functions to calculate the
mmd_address for v1/v2 of xpcs access.

Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250509155325.720499-2-Raju.Rangoju@amd.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/amd/xgbe/xgbe-dev.c