PCI: tegra: Add power management support
authorManikanta Maddireddy <mmaddireddy@nvidia.com>
Wed, 28 Feb 2018 10:00:34 +0000 (15:30 +0530)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Mon, 19 Mar 2018 09:37:46 +0000 (09:37 +0000)
commitda76ba50963b81413ffd3613f84ee9e592220b3d
tree165dd961ba46d473b56f46493e2778c0d3ea5264
parent662b94c3195654c225174c680094555c0d750d41
PCI: tegra: Add power management support

Tegra186 powergate driver is implemented as power domain driver, power
partition ungate/gate are registered as power_on/power_off callback
functions. There are no direct functions to power gate/ungate host
controller in Tegra186. Host controller driver should add "power-domains"
property in device tree and implement runtime suspend and resume
callback functons. Power gate and ungate is taken care by power domain
driver when host controller driver calls pm_runtime_put_sync and
pm_runtime_get_sync respectively.

Register suspend_noirq & resume_noirq callback functions to allow PCIe to
come up after resume from RAM. Both runtime and noirq pm ops share same
callback functions.

Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
[lorenzo.pieralisi@arm.com: squashed patch to fix compilation]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
drivers/pci/host/pci-tegra.c