diff options
author | Shridhar Rasal <srasal@nvidia.com> | 2012-04-11 16:24:47 +0530 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-04-24 07:37:54 -0700 |
commit | 515b4816d76e5bd196efae5b5f407a22fc33dc2a (patch) | |
tree | 103b3192f89ea9129e9ec45a7fa5e7a89d4152e6 | |
parent | a4a5e808b17a441456574a49afc2a62951d4c940 (diff) |
ARM: tegra: pcie: fix pcie resume issue
Its observed that PCIE all clocks enabled on resume.
Follow up resume and suspend only if any port added
bug 943712
Change-Id: I0644aad8a4994726451cda094f2607eb8398aadf
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/95836
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
-rw-r--r-- | arch/arm/mach-tegra/pcie.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/pcie.c b/arch/arm/mach-tegra/pcie.c index b98d4892b5ee..0a7319cfd56d 100644 --- a/arch/arm/mach-tegra/pcie.c +++ b/arch/arm/mach-tegra/pcie.c @@ -1201,9 +1201,13 @@ static int tegra_pci_probe(struct platform_device *pdev) static int tegra_pci_suspend(struct device *dev) { + int ret = 0; struct pci_dev *pdev = NULL; int i, size, ndev = 0; + if (!tegra_pcie.num_ports) + return ret; + for_each_pci_dev(pdev) { /* save state of pcie devices before powering off regulators */ pci_save_state(pdev); @@ -1243,10 +1247,12 @@ static int tegra_pci_resume_noirq(struct device *dev) static int tegra_pci_resume(struct device *dev) { - int ret; + int ret = 0; int i, size, ndev = 0; struct pci_dev *pdev = NULL; + if (!tegra_pcie.num_ports) + return ret; ret = tegra_pcie_power_on(); tegra_pcie_enable_controller(); tegra_pcie_setup_translations(); |