mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-07-25 20:37:02 +08:00
42 lines
1.4 KiB
Diff
42 lines
1.4 KiB
Diff
From b86825a0013059fc20d720e140abbc8dbf1ec8f1 Mon Sep 17 00:00:00 2001
|
|
From: Hector Martin <marcan@marcan.st>
|
|
Date: Mon, 2 May 2022 21:22:46 +0900
|
|
Subject: [PATCH 162/171] PCI: apple: Use gpiod_set_value_cansleep in probe
|
|
flow
|
|
|
|
We're allowed to sleep here, so tell the GPIO core by using
|
|
gpiod_set_value_cansleep instead of gpiod_set_value.
|
|
|
|
Fixes: 1e33888fbe44 ("PCI: apple: Add initial hardware bring-up")
|
|
Acked-by: Marc Zyngier <maz@kernel.org>
|
|
Signed-off-by: Hector Martin <marcan@marcan.st>
|
|
---
|
|
drivers/pci/controller/pcie-apple.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/drivers/pci/controller/pcie-apple.c b/drivers/pci/controller/pcie-apple.c
|
|
index a2c3c207a04b..e6c34a0875b3 100644
|
|
--- a/drivers/pci/controller/pcie-apple.c
|
|
+++ b/drivers/pci/controller/pcie-apple.c
|
|
@@ -541,7 +541,7 @@ static int apple_pcie_setup_port(struct apple_pcie *pcie,
|
|
rmw_set(PORT_APPCLK_EN, port->base + PORT_APPCLK);
|
|
|
|
/* Assert PERST# before setting up the clock */
|
|
- gpiod_set_value(reset, 1);
|
|
+ gpiod_set_value_cansleep(reset, 1);
|
|
|
|
ret = apple_pcie_setup_refclk(pcie, port);
|
|
if (ret < 0)
|
|
@@ -552,7 +552,7 @@ static int apple_pcie_setup_port(struct apple_pcie *pcie,
|
|
|
|
/* Deassert PERST# */
|
|
rmw_set(PORT_PERST_OFF, port->base + PORT_PERST);
|
|
- gpiod_set_value(reset, 0);
|
|
+ gpiod_set_value_cansleep(reset, 0);
|
|
|
|
/* Wait for 100ms after PERST# deassertion (PCIe r5.0, 6.6.1) */
|
|
msleep(100);
|
|
--
|
|
2.34.1
|
|
|