]> git.ipfire.org Git - thirdparty/linux.git/commit
phy: lynx-28g: add support for big endian register maps
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 10 Jun 2026 15:19:47 +0000 (18:19 +0300)
committerVinod Koul <vkoul@kernel.org>
Thu, 11 Jun 2026 07:09:47 +0000 (12:39 +0530)
commitc6c1d7dfd59b181b96b0909b63e140b0aa61ac59
treec456f89962a80a3b293fbee24af0180cbd42b696
parent719a2da392349db052532db89637622a71d14d49
phy: lynx-28g: add support for big endian register maps

Some 10G Lynx SerDes blocks are big endian and require byte swapping
because the CPUs are little endian armv8 (LS1046A). Parse the
"big-endian" device tree property, and modify the base lynx_read() and
lynx_write() accessors to test this property before issuing either the
ioread32() or ioread32be() variants (as per
Documentation/driver-api/device-io.rst).

All other accessors - lynx_rmw(), lynx_lane_read(), lynx_lane_write(),
lynx_lane_rmw(), lynx_pll_read() - need to go through these endian-aware
helpers.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20260610151952.2141019-12-vladimir.oltean@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/freescale/phy-fsl-lynx-core.c
drivers/phy/freescale/phy-fsl-lynx-core.h