phy: uniphier-pcie: Fix updating phy parameters
authorKunihiko Hayashi <hayashi.kunihiko@socionext.com>
Mon, 7 Jun 2021 03:50:42 +0000 (12:50 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:56:47 +0000 (16:56 +0200)
commit6398fc0e57ec4cbe0e1907d65bd7c5ae578fa5b7
tree548eddcac4e54e6a2537f0308297a513766c9c8d
parenta4b7c0af613f54c0ee0adb9a6e803244ab341ebd
phy: uniphier-pcie: Fix updating phy parameters

[ Upstream commit 4a90bbb478dbf18ecdec9dcf8eb708e319d24264 ]

The current driver uses a value from register TEST_O as the original
value for register TEST_I, though, the value is overwritten by "param",
so there is a bug that the original value isn't no longer used.

The value of TEST_O[7:0] should be masked with "mask", replaced with
"param", and placed in the bitfield TESTI_DAT_MASK as new TEST_I value.

Fixes: c6d9b1324159 ("phy: socionext: add PCIe PHY driver support")
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Link: https://lore.kernel.org/r/1623037842-19363-1-git-send-email-hayashi.kunihiko@socionext.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/phy/socionext/phy-uniphier-pcie.c