phy: sun4i-usb: change PHYCTL register clearing code
authorIcenowy Zheng <icenowy@aosc.xyz>
Sat, 25 Mar 2017 14:50:09 +0000 (22:50 +0800)
committerKishon Vijay Abraham I <kishon@ti.com>
Mon, 10 Apr 2017 11:12:57 +0000 (16:42 +0530)
commitd699c1d0860aa8b3031d56ec861e6c2f2e37df95
treea95a2630b1256a7bf6fa4f150978b035892e2165
parenta0b1910e857897ae6c420fa0ece52c87d7cff373
phy: sun4i-usb: change PHYCTL register clearing code

It seems that all SoCs with the PHYCTL register offset as 0x10 need the
PHYCTL register to be cleared before it's written.

Change PHYCTL register clearing code to judge whether clearing is needed
based on the PHYCTL offset.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/phy-sun4i-usb.c