From: Benoit Goby Date: Fri, 3 Dec 2010 22:59:55 +0000 (-0800) Subject: Revert "usb: host: tegra: Remove programing PTC bits based on bus speed." X-Git-Tag: firefly_0821_release~9833^2~93^2~9 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cd1bc934046a7edac3db25fb59327f14958dcd83;p=firefly-linux-kernel-4.4.55.git Revert "usb: host: tegra: Remove programing PTC bits based on bus speed." This reverts commit 91e80b79243c1b6341c1a8d6e8e5e872b837bfea. This is needed to resume usb from lp0 --- diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index 5cdad2531ba1..b02eabb5a61d 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -286,6 +286,18 @@ static int tegra_usb_resume(struct usb_hcd *hcd) writel(val, &hw->port_status[0]); udelay(10); + /* Program the field PTC in PORTSC based on the saved speed mode */ + val = readl(&hw->port_status[0]); + val &= ~(TEGRA_USB_PORTSC1_PTC(~0)); + if (context->port_speed == TEGRA_USB_PHY_PORT_HIGH) + val |= TEGRA_USB_PORTSC1_PTC(5); + else if (context->port_speed == TEGRA_USB_PHY_PORT_SPEED_FULL) + val |= TEGRA_USB_PORTSC1_PTC(6); + else if (context->port_speed == TEGRA_USB_PHY_PORT_SPEED_LOW) + val |= TEGRA_USB_PORTSC1_PTC(7); + writel(val, &hw->port_status[0]); + udelay(10); + /* Disable test mode by setting PTC field to NORMAL_OP */ val = readl(&hw->port_status[0]); val &= ~(TEGRA_USB_PORTSC1_PTC(~0));