u-boot/include/dt-bindings/pci/pci.h
Simon Glass f5cbb5c7cd 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>
2021-07-15 19:49:50 +08:00

13 lines
307 B
C

/* 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 */