summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTim Wawrzynczak <twawrzynczak@chromium.org>2020-11-05 14:38:51 -0700
committerPatrick Georgi <pgeorgi@google.com>2020-11-09 07:37:57 +0000
commit8a1ad138225e5a31d75cd77b9d7f183f3ab6d39c (patch)
tree01e84b019eea3089f0c5de58626624bd0dd34e87 /src/include
parent3d4513e7c8e27dbb9c6b941c4eb4144d38ff5cee (diff)
downloadcoreboot-8a1ad138225e5a31d75cd77b9d7f183f3ab6d39c.tar.xz
device: Move pci_dev_is_wake_source function
Move this function to pci_ops.c, which is already included in the smm build. This is required to use this function in elog functionality, which is called from SMM. Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Change-Id: Ie5583c04366c9a16bc1b00a6892d39eeafe5da49 Reviewed-on: https://review.coreboot.org/c/coreboot/+/47260 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/device/pci.h9
-rw-r--r--src/include/device/pci_ops.h8
2 files changed, 8 insertions, 9 deletions
diff --git a/src/include/device/pci.h b/src/include/device/pci.h
index 777f030355..045eec1aa6 100644
--- a/src/include/device/pci.h
+++ b/src/include/device/pci.h
@@ -79,15 +79,6 @@ void pci_bus_enable_resources(struct device *dev);
void pci_bus_reset(struct bus *bus);
struct device *pci_probe_dev(struct device *dev, struct bus *bus,
unsigned int devfn);
-
-/*
- * Determine if the given PCI device is the source of wake from sleep by checking PME_STATUS and
- * PME_ENABLE bits in PM control and status register.
- *
- * Returns true if PCI device is wake source, false otherwise.
- */
-bool pci_dev_is_wake_source(const struct device *dev);
-
void do_pci_scan_bridge(struct device *dev,
void (*do_scan_bus)(struct bus *bus,
unsigned int min_devfn, unsigned int max_devfn));
diff --git a/src/include/device/pci_ops.h b/src/include/device/pci_ops.h
index cdf02d6a56..7fe7d429e2 100644
--- a/src/include/device/pci_ops.h
+++ b/src/include/device/pci_ops.h
@@ -209,4 +209,12 @@ u16 pci_find_capability(const struct device *dev, u16 cap)
return pci_s_find_capability(PCI_BDF(dev), cap);
}
+/*
+ * Determine if the given PCI device is the source of wake from sleep by checking PME_STATUS and
+ * PME_ENABLE bits in PM control and status register.
+ *
+ * Returns true if PCI device is wake source, false otherwise.
+ */
+bool pci_dev_is_wake_source(const struct device *dev);
+
#endif /* PCI_OPS_H */