aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-10-21 11:45:18 +0100
committerBjorn Helgaas <bhelgaas@google.com>2021-11-04 14:34:23 -0500
commit5b1e8c00afc32df8b4cf39a5c6cc7378a924abb7 (patch)
tree076d00a786d55da6e5452b26d1bb1ab55069f9c7 /drivers/pci
parentPCI: kirin: Move the power-off code to a common routine (diff)
downloadlinux-dev-5b1e8c00afc32df8b4cf39a5c6cc7378a924abb7.tar.xz
linux-dev-5b1e8c00afc32df8b4cf39a5c6cc7378a924abb7.zip
PCI: kirin: Disable clkreq during poweroff sequence
The logic at kirin_pcie_gpio_request() enables some clkreq GPIO lines. Disable them during power-off. Link: https://lore.kernel.org/r/f403e590843de1a581cade2d534d34715706f54e.1634812676.git.mchehab+huawei@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Xiaowei Song <songxiaowei@hisilicon.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/controller/dwc/pcie-kirin.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/controller/dwc/pcie-kirin.c b/drivers/pci/controller/dwc/pcie-kirin.c
index 5ebdf1b4b8d5..1878c91a33a3 100644
--- a/drivers/pci/controller/dwc/pcie-kirin.c
+++ b/drivers/pci/controller/dwc/pcie-kirin.c
@@ -688,6 +688,9 @@ static int kirin_pcie_power_off(struct kirin_pcie *kirin_pcie)
if (kirin_pcie->type == PCIE_KIRIN_INTERNAL_PHY)
return hi3660_pcie_phy_power_off(kirin_pcie);
+ for (i = 0; i < kirin_pcie->n_gpio_clkreq; i++)
+ gpio_direction_output(kirin_pcie->gpio_id_clkreq[i], 1);
+
phy_power_off(kirin_pcie->phy);
phy_exit(kirin_pcie->phy);