summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2011-01-06 18:12:28 -0800
committerColin Cross <ccross@android.com>2011-01-06 18:12:28 -0800
commitab3fe23e4a9bad1a04cf40393fc65ece67b68723 (patch)
treeaa4487774ba10ad0d63a9029e3e7708b23f58808 /drivers
parent3051b1526aca9dc9262028a5dd443d1083364b95 (diff)
parentc32a73b4fce0ac2825e3d52460ea9e767edadc6b (diff)
Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/ehci-tegra.c15
-rw-r--r--drivers/video/tegra/dc/dc.c15
2 files changed, 13 insertions, 17 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 21c58dfb9035..262bbb01228b 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -35,7 +35,6 @@
struct tegra_ehci_context {
bool valid;
u32 command;
- u32 intr_enable;
u32 frame_list;
u32 async_next;
u32 txfilltunning;
@@ -215,9 +214,6 @@ static void tegra_ehci_restart(struct usb_hcd *hcd)
/* flush posted writes */
ehci_readl(ehci, &ehci->regs->command);
up_write(&ehci_cf_port_reset_rwsem);
-
- /* Turn On Interrupts */
- ehci_writel(ehci, INTR_MASK, &ehci->regs->intr_enable);
}
static int tegra_usb_suspend(struct usb_hcd *hcd)
@@ -237,7 +233,6 @@ static int tegra_usb_suspend(struct usb_hcd *hcd)
context->valid = false;
} else {
context->command = readl(&hw->command);
- context->intr_enable = readl(&hw->intr_enable);
context->frame_list = readl(&hw->frame_list);
context->async_next = readl(&hw->async_next);
context->txfilltunning = readl(&hw->reserved[2]);
@@ -264,8 +259,12 @@ static int tegra_usb_resume(struct usb_hcd *hcd)
set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
tegra_ehci_power_up(ehci_to_hcd(tegra->ehci));
- if (!context->valid)
+ if (!context->valid) {
+ /* Wait for the phy to detect new devices
+ * before we restart the controller */
+ msleep(10);
goto restart;
+ }
/* Restore register context */
writel(TEGRA_USB_USBMODE_HOST, &hw->reserved[19]);
@@ -333,10 +332,6 @@ static int tegra_usb_resume(struct usb_hcd *hcd)
}
}
- /* Restore interrupt register */
- writel(context->intr_enable, &hw->intr_enable);
- udelay(10);
-
return 0;
restart:
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index 946d3da7dc2c..2819a93d8442 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -1041,6 +1041,7 @@ static int tegra_dc_probe(struct nvhost_device *ndev)
void __iomem *base;
int irq;
int i;
+ unsigned long emc_clk_rate;
if (!ndev->dev.platform_data) {
dev_err(&ndev->dev, "no platform data\n");
@@ -1097,13 +1098,6 @@ static int tegra_dc_probe(struct nvhost_device *ndev)
goto err_put_clk;
}
- /*
- * The emc is a shared clock, it will be set to the highest
- * requested rate from any user. Set the rate to ULONG_MAX to
- * always request the max rate whenever this request is enabled
- */
- clk_set_rate(emc_clk, ULONG_MAX);
-
dc->clk = clk;
dc->emc_clk = emc_clk;
dc->base_res = base_res;
@@ -1112,6 +1106,13 @@ static int tegra_dc_probe(struct nvhost_device *ndev)
dc->ndev = ndev;
dc->pdata = ndev->dev.platform_data;
+ /*
+ * The emc is a shared clock, it will be set based on
+ * the requirements for each user on the bus.
+ */
+ emc_clk_rate = dc->pdata->emc_clk_rate;
+ clk_set_rate(emc_clk, emc_clk_rate ? emc_clk_rate : ULONG_MAX);
+
if (dc->pdata->flags & TEGRA_DC_FLAG_ENABLED)
dc->enabled = true;