usb: udc: tegra: skip vbus status checkup.
Harry Hong [Mon, 18 Mar 2013 01:43:58 +0000 (10:43 +0900)]
Skipping vbus status if pmu vbus detection
is used.

bug 1254946

Change-Id: I01f54bd127cd4d7d021816899c1ecd29b139701d
Signed-off-by: Harry Hong <hhong@nvidia.com>
Reviewed-on: http://git-master/r/210260
Reviewed-by: Mrutyunjay Sawant <msawant@nvidia.com>
Tested-by: Mrutyunjay Sawant <msawant@nvidia.com>

drivers/usb/gadget/tegra_udc.c

index 7b51ed1..0e3e7a7 100644 (file)
@@ -120,7 +120,9 @@ static inline bool vbus_enabled(struct tegra_udc *udc)
 {
        bool status = false;
 #ifdef CONFIG_TEGRA_SILICON_PLATFORM
-       status = (udc_readl(udc, VBUS_WAKEUP_REG_OFFSET) & USB_SYS_VBUS_STATUS);
+       if (!udc->support_pmu_vbus)
+               status = (udc_readl(udc, VBUS_WAKEUP_REG_OFFSET)
+                                                       & USB_SYS_VBUS_STATUS);
 #else
        /* On FPGA VBUS is detected through VBUS A Session instead of VBUS
         * status.*/