summaryrefslogtreecommitdiff
path: root/include/dt-bindings
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-06-28 02:50:57 +0300
committerBin Meng <bmeng.cn@gmail.com>2021-07-15 14:49:50 +0300
commitf5cbb5c7cd24b5e674933bb381d854c02512d2d9 (patch)
tree00b101e293b3cff8ebf917787a4fccdea1ed5c7b /include/dt-bindings
parente58f3a7d9b7e5961ca7e362bffd01a134ad3b831 (diff)
downloadu-boot-f5cbb5c7cd24b5e674933bb381d854c02512d2d9.tar.xz
x86: pci: Allow binding of some devices before relocation
At present only bridge devices are bound before relocation, to save space in pre-relocation memory. In some cases we do actually want to bind a device, e.g. because it provides the console UART. Add a devicetree binding to support this. Use the PCI_VENDEV() macro to encode the cell value. This is present in U-Boot but not used, so move it to the binding header-file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'include/dt-bindings')
-rw-r--r--include/dt-bindings/pci/pci.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/dt-bindings/pci/pci.h b/include/dt-bindings/pci/pci.h
new file mode 100644
index 0000000000..e7290277b9
--- /dev/null
+++ b/include/dt-bindings/pci/pci.h
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * This header provides common constants for PCI bindings.
+ */
+
+#ifndef _DT_BINDINGS_PCI_PCI_H
+#define _DT_BINDINGS_PCI_PCI_H
+
+/* Encode a vendor and device ID into a single cell */
+#define PCI_VENDEV(v, d) (((v) << 16) | (d))
+
+#endif /* _DT_BINDINGS_PCI_PCI_H */