phy: xilinx: zynqmp: Fix bus width setting for SGMII
authorRobert Hancock <robert.hancock@calian.com>
Wed, 26 Jan 2022 00:16:00 +0000 (18:16 -0600)
committerVinod Koul <vkoul@kernel.org>
Thu, 27 Jan 2022 05:25:26 +0000 (10:55 +0530)
commit37291f60d0822f191748c2a54ce63b0bc669020f
tree94abbc6125252394c246784454cef8f4f6003faa
parent29afbd769ca338fa14cbfbbc824f7dc457ed7f2e
phy: xilinx: zynqmp: Fix bus width setting for SGMII

TX_PROT_BUS_WIDTH and RX_PROT_BUS_WIDTH are single registers with
separate bit fields for each lane. The code in xpsgtr_phy_init_sgmii was
not preserving the existing register value for other lanes, so enabling
the PHY in SGMII mode on one lane zeroed out the settings for all other
lanes, causing other PS-GTR peripherals such as USB3 to malfunction.

Use xpsgtr_clr_set to only manipulate the desired bits in the register.

Fixes: 4a33bea00314 ("phy: zynqmp: Add PHY driver for the Xilinx ZynqMP Gigabit Transceiver")
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/20220126001600.1592218-1-robert.hancock@calian.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/xilinx/phy-zynqmp.c