diff options
author | Benoit Goby <benoit@android.com> | 2010-09-13 17:43:44 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2010-10-06 16:28:36 -0700 |
commit | 70cdef2fc20df6de9143b7516ea0eb388db96fb9 (patch) | |
tree | 0d56a0d8bbdfe944832d793259187a752d9e26e0 /arch/arm/mach-tegra/usb_phy.c | |
parent | 1ada8fb6713b6b7d75c530e8d2980a241a660ea2 (diff) |
[ARM] tegra: usb_phy: Reset the ulpi phy on power off
Put the ulpi phy in reset on power off to save power in lp0.
Change-Id: I7d7441c1029b170ff24da7274d8404b4bcf1d9e9
Signed-off-by: Benoit Goby <benoit@android.com>
Diffstat (limited to 'arch/arm/mach-tegra/usb_phy.c')
-rw-r--r-- | arch/arm/mach-tegra/usb_phy.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c index 7785b1ee41ec..3e145f1bee1b 100644 --- a/arch/arm/mach-tegra/usb_phy.c +++ b/arch/arm/mach-tegra/usb_phy.c @@ -556,27 +556,7 @@ static void ulpi_phy_power_off(struct tegra_usb_phy *phy) { unsigned long val; void __iomem *base = phy->regs; - - /* Programming the ULPI register function control */ - ulpi_viewport_write(phy, 0x04, 0x4D); - - /* Resetting the ULPI register IndicatorPassThru */ - ulpi_viewport_write(phy, 0x09, 0x40); - - /* USB Interrupt Rising - making sure vbus comparator and id are off */ - ulpi_viewport_write(phy, 0x0D, 0x00); - - /* USB Interrupt Falling */ - ulpi_viewport_write(phy, 0x10, 0x00); - - /* Carkit Control */ - ulpi_viewport_write(phy, 0x19, 0x00); - - /* Disabling ID float Rise/Fall (Carkit Enable) */ - ulpi_viewport_write(phy, 0x1D, 0x00); - - /* USB I/O and power */ - ulpi_viewport_write(phy, 0x39, 0x00); + struct tegra_ulpi_config *config = phy->config; /* Clear WKCN/WKDS/WKOC wake-on events that can cause the USB * Controller to immediately bring the ULPI PHY out of low power @@ -585,6 +565,7 @@ static void ulpi_phy_power_off(struct tegra_usb_phy *phy) val &= ~(USB_PORTSC1_WKOC | USB_PORTSC1_WKDS | USB_PORTSC1_WKCN); writel(val, base + USB_PORTSC1); + gpio_direction_output(config->reset_gpio, 0); clk_disable(phy->clk); } |