summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2011-05-10 19:20:23 -0700
committerColin Cross <ccross@android.com>2011-05-10 19:20:23 -0700
commit5e1a8946bde3db838501b3372c60a8771a82c574 (patch)
tree2b31f4bf5cb6d9774578989b819813cfaf48c137 /drivers
parent734779ea0f1af6eb7ac747d8780a361afa956e4c (diff)
parent789333436de3878b2ea878d4c2c030af7ed481ce (diff)
Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/fsl_tegra_udc.c2
-rw-r--r--drivers/usb/host/ehci-tegra.c30
-rw-r--r--drivers/video/tegra/dc/dc.c5
3 files changed, 15 insertions, 22 deletions
diff --git a/drivers/usb/gadget/fsl_tegra_udc.c b/drivers/usb/gadget/fsl_tegra_udc.c
index 14e62f40a50a..24867cd60909 100644
--- a/drivers/usb/gadget/fsl_tegra_udc.c
+++ b/drivers/usb/gadget/fsl_tegra_udc.c
@@ -42,7 +42,7 @@ int fsl_udc_clk_init(struct platform_device *pdev)
}
clk_enable(emc_clk);
- clk_set_rate(emc_clk, 400000000);
+ clk_set_rate(emc_clk, 300000000);
/* we have to remap the registers ourselves as fsl_udc does not
* export them for us.
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 8acf0c4366f7..9738b994f391 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -94,9 +94,12 @@ static int tegra_ehci_hub_control(
else if (typeReq == GetPortStatus) {
temp = ehci_readl(ehci, status_reg);
- if (tegra->port_resuming && !(temp & PORT_SUSPEND)) {
+ if (tegra->port_resuming && !(temp & PORT_SUSPEND) &&
+ time_after_eq(jiffies, ehci->reset_done[wIndex-1])) {
/* Resume completed, re-enable disconnect detection */
tegra->port_resuming = 0;
+ clear_bit((wIndex & 0xff) - 1, &ehci->suspended_ports);
+ ehci->reset_done[wIndex-1] = 0;
tegra_usb_phy_postresume(tegra->phy);
}
}
@@ -142,11 +145,11 @@ static int tegra_ehci_hub_control(
if (!(temp & PORT_SUSPEND))
goto done;
+ tegra->port_resuming = 1;
+
/* Disable disconnect detection during port resume */
tegra_usb_phy_preresume(tegra->phy);
- ehci->reset_done[wIndex-1] = jiffies + msecs_to_jiffies(25);
-
ehci_dbg(ehci, "%s:USBSTS = 0x%x", __func__,
ehci_readl(ehci, &ehci->regs->status));
usbsts_reg = ehci_readl(ehci, &ehci->regs->status);
@@ -168,22 +171,11 @@ static int tegra_ehci_hub_control(
udelay(20);
temp &= ~(PORT_RWC_BITS | PORT_WAKE_BITS);
- /* start resume signalling */
+ /* start resume signaling */
ehci_writel(ehci, temp | PORT_RESUME, status_reg);
- spin_unlock_irqrestore(&ehci->lock, flags);
- msleep(20);
- spin_lock_irqsave(&ehci->lock, flags);
-
- /* Poll until the controller clears RESUME and SUSPEND */
- if (handshake(ehci, status_reg, PORT_RESUME, 0, 2000))
- pr_err("%s: timeout waiting for RESUME\n", __func__);
- if (handshake(ehci, status_reg, PORT_SUSPEND, 0, 2000))
- pr_err("%s: timeout waiting for SUSPEND\n", __func__);
-
- ehci->reset_done[wIndex-1] = 0;
-
- tegra->port_resuming = 1;
+ ehci->reset_done[wIndex-1] = jiffies + msecs_to_jiffies(25);
+ /* whoever resumes must GetPortStatus to complete it!! */
goto done;
}
@@ -402,8 +394,6 @@ static int tegra_ehci_bus_resume(struct usb_hcd *hcd)
tegra->bus_suspended = 0;
}
- tegra_usb_phy_preresume(tegra->phy);
- tegra->port_resuming = 1;
return ehci_bus_resume(hcd);
}
#endif
@@ -574,7 +564,7 @@ static int tegra_ehci_probe(struct platform_device *pdev)
}
clk_enable(tegra->emc_clk);
- clk_set_rate(tegra->emc_clk, 400000000);
+ clk_set_rate(tegra->emc_clk, 300000000);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index f39fb40e3ccd..4549670fdff5 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -1044,7 +1044,6 @@ static bool _tegra_dc_enable(struct tegra_dc *dc)
dc->out->enable();
tegra_dc_setup_clk(dc, dc->clk);
- tegra_periph_reset_assert(dc->clk);
clk_enable(dc->clk);
clk_enable(dc->emc_clk);
tegra_periph_reset_deassert(dc->clk);
@@ -1122,6 +1121,10 @@ static void tegra_dc_reset_worker(struct work_struct *work)
if (dc->enabled && !dc->suspended) {
_tegra_dc_disable(dc);
+ /* A necessary wait. */
+ msleep(100);
+ tegra_periph_reset_assert(dc->clk);
+
/* _tegra_dc_enable deasserts reset */
_tegra_dc_enable(dc);
}