phy: rockchip-inno-usb2: amend sm work to support legacy SoC

This adds amend logic of sm work to compatibly support some legacy SoCs,
because _host_utmi_linestate_ and _host_utmi_hostdisconnect_ GRF status
bits which are required for host sm work were not introduced in these
SoCs.

Change-Id: Ib4f499f592618930ac5016a63b7a530674aa6005
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
This commit is contained in:
Frank Wang
2017-03-15 11:05:36 +08:00
committed by Huang, Tao
parent af6f2d70c0
commit 6f32ea684e

View File

@@ -916,6 +916,12 @@ static void rockchip_usb2phy_sm_work(struct work_struct *work)
unsigned int ul_mask, uhd_mask;
int ret;
if (!rport->port_cfg->utmi_ls.offset ||
!rport->port_cfg->utmi_hstdet.offset) {
dev_dbg(&rport->phy->dev, "some property may not be specified\n");
return;
}
mutex_lock(&rport->mutex);
ret = regmap_read(rphy->grf, rport->port_cfg->utmi_ls.offset, &ul);