Skip to content

Commit 7334364

Browse files
marcanMani-Sadhasivam
authored andcommitted
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: 1e33888 ("PCI: apple: Add initial hardware bring-up") Signed-off-by: Hector Martin <[email protected]> Signed-off-by: Alyssa Rosenzweig <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Signed-off-by: Manivannan Sadhasivam <[email protected]> Tested-by: Janne Grunau <[email protected]> Reviewed-by: Rob Herring (Arm) <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent de9637c commit 7334364

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pci/controller/pcie-apple.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ static int apple_pcie_setup_port(struct apple_pcie *pcie,
562562
rmw_set(PORT_APPCLK_EN, port->base + PORT_APPCLK);
563563

564564
/* Assert PERST# before setting up the clock */
565-
gpiod_set_value(reset, 1);
565+
gpiod_set_value_cansleep(reset, 1);
566566

567567
ret = apple_pcie_setup_refclk(pcie, port);
568568
if (ret < 0)
@@ -573,7 +573,7 @@ static int apple_pcie_setup_port(struct apple_pcie *pcie,
573573

574574
/* Deassert PERST# */
575575
rmw_set(PORT_PERST_OFF, port->base + PORT_PERST);
576-
gpiod_set_value(reset, 0);
576+
gpiod_set_value_cansleep(reset, 0);
577577

578578
/* Wait for 100ms after PERST# deassertion (PCIe r5.0, 6.6.1) */
579579
msleep(100);

0 commit comments

Comments
 (0)