summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorPrashant Gaikwad <pgaikwad@nvidia.com>2011-03-24 13:05:50 +0530
committerVarun Colbert <vcolbert@nvidia.com>2011-03-28 23:49:54 -0700
commitbc77c5269f8c9616cc84be57245d3a993e65bc94 (patch)
treeb8140e84499b8f1e690dc0b2a9f8f89990605165 /arch
parent66fa9abefccdc75f6feb283ac60acacd257dcc99 (diff)
ARM: tegra: whistler: power down usb3 on suspend
To turn off usb3 and usb3.emc clock, tegra-ehci.2 should be powered off when bus is supended. Enable power_down_on_bus_suspend for usb3 (tegra-ehci.2). Also added the platform data structure which is used when USB suspends. Bug 807237 Change-Id: I9e975daeb2283bd811b2e32acda78b6fa0d9f2b4 Reviewed-on: http://git-master/r/24089 Tested-by: Prashant Gaikwad <pgaikwad@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/board-whistler.c21
-rw-r--r--arch/arm/mach-tegra/board-whistler.h4
2 files changed, 23 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/board-whistler.c b/arch/arm/mach-tegra/board-whistler.c
index de0ef59445fe..290fb32f009c 100644
--- a/arch/arm/mach-tegra/board-whistler.c
+++ b/arch/arm/mach-tegra/board-whistler.c
@@ -430,12 +430,27 @@ static int __init whistler_scroll_init(void)
return 0;
}
+static struct usb_phy_plat_data tegra_usb_phy_pdata[] = {
+ [0] = {
+ .instance = 0,
+ .vbus_irq = MAX8907C_INT_BASE + MAX8907C_IRQ_VCHG_DC_R,
+ .vbus_gpio = TEGRA_GPIO_PN6,
+ },
+ [1] = {
+ .instance = 1,
+ .vbus_gpio = -1,
+ },
+ [2] = {
+ .instance = 2,
+ .vbus_gpio = -1,
+ },
+};
static struct tegra_ehci_platform_data tegra_ehci_pdata[] = {
[0] = {
.phy_config = &utmi_phy_config[0],
.operating_mode = TEGRA_USB_HOST,
- .power_down_on_bus_suspend = 0,
+ .power_down_on_bus_suspend = 1,
},
[1] = {
.phy_config = &ulpi_phy_config,
@@ -445,7 +460,7 @@ static struct tegra_ehci_platform_data tegra_ehci_pdata[] = {
[2] = {
.phy_config = &utmi_phy_config[1],
.operating_mode = TEGRA_USB_HOST,
- .power_down_on_bus_suspend = 0,
+ .power_down_on_bus_suspend = 1,
},
};
@@ -504,6 +519,8 @@ static struct tegra_otg_platform_data tegra_otg_pdata = {
static void whistler_usb_init(void)
{
+ tegra_usb_phy_init(tegra_usb_phy_pdata, ARRAY_SIZE(tegra_usb_phy_pdata));
+
tegra_otg_device.dev.platform_data = &tegra_otg_pdata;
platform_device_register(&tegra_otg_device);
diff --git a/arch/arm/mach-tegra/board-whistler.h b/arch/arm/mach-tegra/board-whistler.h
index adaa98e1029b..c8d2f7b87d69 100644
--- a/arch/arm/mach-tegra/board-whistler.h
+++ b/arch/arm/mach-tegra/board-whistler.h
@@ -26,4 +26,8 @@ int whistler_sensors_init(void);
int whistler_baseband_init(void);
int whistler_emc_init(void);
+/* Interrupt numbers from external peripherals */
+#define MAX8907C_INT_BASE TEGRA_NR_IRQS
+#define MAX8907C_INT_END (MAX8907C_INT_BASE + 32)
+
#endif