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>
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);