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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Feb 2022 11:56:22 +0000 (12:56 +0100)
commit541ec7bfeed36a74b47ea8b440da0591ea05d555
tree443eaaa01ccc2254d8d4706eaef9d8d0786d11d1
parent58c42f415b81832db9991b3a133eeebbc050fb36
phy: xilinx: zynqmp: Fix bus width setting for SGMII

[ Upstream commit 37291f60d0822f191748c2a54ce63b0bc669020f ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/phy/xilinx/phy-zynqmp.c