diff mbox series

[V7,3/4] PCI: Unify ACPI and DT 'preserve config' support

Message ID 20240508174138.3630283-4-vidyas@nvidia.com
State Accepted
Commit 1e6922482cd429e568537f8f6cf159765b5d176f
Headers show
Series PCI: Add support for preserving boot configuration | expand

Commit Message

Vidya Sagar May 8, 2024, 5:41 p.m. UTC
Unify the 'preserve config' support across ACPI and device-tree
boot flows.

Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
---
 drivers/pci/probe.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index ee086d029450..2c232c22d6af 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -894,6 +894,9 @@  static bool pci_preserve_config(struct pci_host_bridge *host_bridge)
 	if (pci_acpi_preserve_config(host_bridge))
 		return true;
 
+	if (host_bridge->dev.parent && host_bridge->dev.parent->of_node)
+		return of_pci_preserve_config(host_bridge->dev.parent->of_node);
+
 	return false;
 }