Skip to content

Commit 8762051

Browse files
Marc Zyngierbjorn-helgaas
authored andcommitted
PCI: apple: Fix PERST# polarity
Now that PERST# is properly defined as active-low in the device tree, fix the driver to correctly drive the line independently of the implied polarity. Suggested-by: Pali Rohár <[email protected]> Fixes: 1e33888 ("PCI: apple: Add initial hardware bring-up") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Zyngier <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Luca Ceresoli <[email protected]>
1 parent 5b970df commit 8762051

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
@@ -540,7 +540,7 @@ static int apple_pcie_setup_port(struct apple_pcie *pcie,
540540
rmw_set(PORT_APPCLK_EN, port->base + PORT_APPCLK);
541541

542542
/* Assert PERST# before setting up the clock */
543-
gpiod_set_value(reset, 0);
543+
gpiod_set_value(reset, 1);
544544

545545
ret = apple_pcie_setup_refclk(pcie, port);
546546
if (ret < 0)
@@ -551,7 +551,7 @@ static int apple_pcie_setup_port(struct apple_pcie *pcie,
551551

552552
/* Deassert PERST# */
553553
rmw_set(PORT_PERST_OFF, port->base + PORT_PERST);
554-
gpiod_set_value(reset, 1);
554+
gpiod_set_value(reset, 0);
555555

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

0 commit comments

Comments
 (0)