summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2015-09-26 23:32:08 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2015-09-26 23:32:08 +0200
commit995e5cb4b2e6b96af4b63c8ebc3f4f6c6e5c8d0d (patch)
treebfbcfdd422158ed6bca1d77f5450e0626e31eb0a /arch
parent6728b56768d42f741c7139ff78d5e1cb6e22da7b (diff)
apalis/colibri_t30: usb: fix performance regression
Unfortunately that utmi_phy_remotewake_detected() function gets called one too many times even quite continuously during data transfers and putting an mdelay() in there has a rather adverse effect on the overall system performance including of course degrading USB transfer speeds. Moving the system lock-up avoidance hack further down into the if clause improves the performance again as this typically is only ever evaluated once upon actually plugging something in behind a hub. This fixes a performance regression introduced by the following commit: apalis/colibri_t30: usb: fix low-speed issue hack 629b91fa046df5213ed3312d2e2b8683e6bdd70c
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/tegra3_usb_phy.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/tegra3_usb_phy.c b/arch/arm/mach-tegra/tegra3_usb_phy.c
index 0ab61758addd..f1a1e0874946 100644
--- a/arch/arm/mach-tegra/tegra3_usb_phy.c
+++ b/arch/arm/mach-tegra/tegra3_usb_phy.c
@@ -755,12 +755,15 @@ bool utmi_phy_remotewake_detected(struct tegra_usb_phy *phy)
unsigned int inst = phy->inst;
u32 val;
- /* Hack: avoid system lock-up condition upon device hot-plugging */
- mdelay(4);
-
DBG("%s(%d) inst:[%d]\n", __func__, __LINE__, phy->inst);
val = readl(base + UTMIP_PMC_WAKEUP0);
if (val & EVENT_INT_ENB) {
+ /*
+ * Hack: avoid system lock-up condition upon device hot-plugging
+ * behind a hub
+ */
+ mdelay(4);
+
val = readl(pmc_base + UTMIP_UHSIC_STATUS);
if (UTMIP_WAKE_ALARM(inst) & val) {
val = readl(pmc_base + PMC_SLEEP_CFG);