From 3530f1617c5fc42636f5a647af19e28ad5746f19 Mon Sep 17 00:00:00 2001 From: Venu Byravarasu Date: Thu, 3 May 2012 15:51:00 +0530 Subject: ARM: tegra: Enable TXFILLTUNING for all USB interfaces As per recommendation from ASIC team, Setting TXFILLTUNNING to 0x10 for all USB interfaces. bug 974507 Change-Id: Id2ee26927e56bf500a0fed2a414b74ffab157403 Signed-off-by: Venu Byravarasu Reviewed-on: http://git-master/r/99629 Reviewed-by: Simone Willett Tested-by: Simone Willett --- arch/arm/mach-tegra/usb_phy.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c index c3ce57a95574..8c36159e085a 100644 --- a/arch/arm/mach-tegra/usb_phy.c +++ b/arch/arm/mach-tegra/usb_phy.c @@ -1726,7 +1726,7 @@ static int uhsic_phy_preresume(struct tegra_usb_phy *phy, bool remote_wakeup) return 0; } -static int uhsic_phy_postresume(struct tegra_usb_phy *phy, bool is_dpd) +static int usb_phy_set_tx_fill_tuning(struct tegra_usb_phy *phy, bool is_dpd) { unsigned long val; void __iomem *base = phy->regs; @@ -2404,11 +2404,7 @@ static int uhsic_phy_power_on(struct tegra_usb_phy *phy, bool is_dpd) val |= HOSTPC1_DEVLC_PSPD(HOSTPC1_DEVLC_PSPD_HIGH_SPEED); writel(val, base + HOSTPC1_DEVLC); #endif - val = readl(base + USB_TXFILLTUNING); - if ((val & USB_FIFO_TXFILL_MASK) != USB_FIFO_TXFILL_THRES(0x10)) { - val = USB_FIFO_TXFILL_THRES(0x10); - writel(val, base + USB_TXFILLTUNING); - } + usb_phy_set_tx_fill_tuning(phy, is_dpd); val = readl(base + USB_PORTSC1); val &= ~(USB_PORTSC1_WKOC | USB_PORTSC1_WKDS | USB_PORTSC1_WKCN); @@ -2766,11 +2762,14 @@ void tegra_usb_phy_postresume(struct tegra_usb_phy *phy, bool is_dpd) utmi_phy_postresume, NULL, NULL, - uhsic_phy_postresume, + NULL, }; - if (postresume[phy->usb_phy_type]) - postresume[phy->usb_phy_type](phy, is_dpd); + usb_phy_set_tx_fill_tuning(phy, is_dpd); + + // If Phy type is utmi, call its post resume + if (phy->usb_phy_type == 0) + utmi_phy_postresume(phy, is_dpd); } void tegra_ehci_pre_reset(struct tegra_usb_phy *phy, bool is_dpd) -- cgit v1.2.3