]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
platform: t210: padctl: sata idle detector
authorTW Chiu <twchiu@nvidia.com>
Thu, 6 Aug 2015 07:43:09 +0000 (15:43 +0800)
committermobile promotions <svcmobile_promotions@nvidia.com>
Sat, 10 Oct 2015 10:14:00 +0000 (03:14 -0700)
Power down SATA idle detector to save power.

If there is no drive found during boot, SATA driver will be unloaded.
Since SATA driver is unloaded, there is no chance for it to program
registers to save power after LP0 cycle.

In this change, we power down SATA idle detector from PADCTL driver
as part of UPHY PLL initialization during early boot and resume.
Later, SATA driver can power up idle detector when necessary.

Bug 200126755

Change-Id: I26e74c7cccb0ac8d6d9a84ecbaad15ec23ba38c0
Signed-off-by: TW Chiu <twchiu@nvidia.com>
Reviewed-on: http://git-master/r/779675
(cherry picked from commit e9f60a963783b09b6a2543af0cd6540b5c532f1a)
Reviewed-on: http://git-master/r/811595
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ajay Gupta <ajayg@nvidia.com>
Tested-by: Ajay Gupta <ajayg@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
drivers/platform/tegra/tegra_usb_pad_ctrl.c

index 01740aa9431998cb94c3292b52b42537dc546cd2..8bffd4a97a817e2b78282c5d6a071d29a33c47a3 100644 (file)
@@ -1881,6 +1881,7 @@ int tegra_padctl_init_sata_pad(void)
                RX_TERM_EN | RX_TERM_OVRD,
                RX_TERM_EN | RX_TERM_OVRD);
        t210_padctl_force_sata_seq(false);
+       t210_padctl_enable_sata_idle_detector(true);
        spin_unlock_irqrestore(&xusb_padctl_lock, flags);
 #endif
 
@@ -2287,6 +2288,7 @@ tegra_padctl_enable_uphy_pll(struct platform_device *pdev)
                /* sata driver owns sata lane */
                t210_sata_uphy_pll_init(false);
                usb3_lane_out_of_iddq(SATA_S0);
+               t210_padctl_enable_sata_idle_detector(false);
                t210_padctl_force_sata_seq(true);
        }