kernel/drivers/usb/phy/phy-mxs-usb.c
.. .. @@ -388,14 +388,8 @@ 388 388 389 389 static bool mxs_phy_is_otg_host(struct mxs_phy *mxs_phy) 390 390 { 391 - void __iomem *base = mxs_phy->phy.io_priv;392 - u32 phyctrl = readl(base + HW_USBPHY_CTRL);393 -394 - if (IS_ENABLED(CONFIG_USB_OTG) &&395 - !(phyctrl & BM_USBPHY_CTRL_OTG_ID_VALUE))396 - return true;397 -398 - return false;391 + return IS_ENABLED(CONFIG_USB_OTG) &&392 + mxs_phy->phy.last_event == USB_EVENT_ID;399 393 } 400 394 401 395 static void mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool on)