usb: tegra: otg: add delay for register update
Rakesh Bodla [Wed, 7 Sep 2011 10:30:31 +0000 (15:30 +0530)]
Added delay to make sure register is updated.

Bug 864005

Reviewed-on: http://git-master/r/51086
(cherry picked from commit 284f428041a15300ea65eb9ff76942a65e6628dd)
Change-Id: I4b0fa8e60664b9bf523fa6675bc1847e98703a55
Reviewed-on: http://git-master/r/54645
Reviewed-by: Rakesh Bodla <rbodla@nvidia.com>
Tested-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

Rebase-Id: R74770436a88b36850eca20115ce6258c953213e3

drivers/usb/otg/tegra-otg.c

index 5404b96..2545aa7 100644 (file)
@@ -223,6 +223,8 @@ static int tegra_otg_set_peripheral(struct otg_transceiver *otg,
        val |= (USB_VBUS_INT_EN | USB_VBUS_WAKEUP_EN);
        val |= (USB_ID_INT_EN | USB_ID_PIN_WAKEUP_EN);
        otg_writel(tegra, val, USB_PHY_WAKEUP);
+       /* Add delay to make sure register is updated */
+       udelay(1);
        clk_disable(tegra->clk);
 
        if ((val & USB_ID_STATUS) && (val & USB_VBUS_STATUS)) {