aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/pci_regs.h
diff options
context:
space:
mode:
authorSubbaraya Sundeep <sbhatta@marvell.com>2018-11-19 18:44:32 +0530
committerBjorn Helgaas <bhelgaas@google.com>2019-04-17 15:09:01 -0500
commit2dbce590117981196fe355efc0569bc6f949ae9b (patch)
tree95b8e72f1bf42629b3eca4c52bffc375affedd6f /include/uapi/linux/pci_regs.h
parentPCI: OF: Support "external-facing" property (diff)
downloadlinux-dev-2dbce590117981196fe355efc0569bc6f949ae9b.tar.xz
linux-dev-2dbce590117981196fe355efc0569bc6f949ae9b.zip
PCI: Assign bus numbers present in EA capability for bridges
The "Enhanced Allocation (EA) for Memory and I/O Resources" ECN, approved 23 October 2014, sec 6.9.1.2, specifies a second DW in the capability for type 1 (bridge) functions to describe fixed secondary and subordinate bus numbers. This ECN was included in the PCIe r4.0 spec, but sec 6.9.1.2 was omitted, presumably by mistake. Read fixed bus numbers from the EA capability for bridges. Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> [bhelgaas: add pci_ea_fixed_busnrs() return value] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'include/uapi/linux/pci_regs.h')
-rw-r--r--include/uapi/linux/pci_regs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h
index 5c98133f2c94..c51e0066de8b 100644
--- a/include/uapi/linux/pci_regs.h
+++ b/include/uapi/linux/pci_regs.h
@@ -372,6 +372,12 @@
#define PCI_EA_FIRST_ENT_BRIDGE 8 /* First EA Entry for Bridges */
#define PCI_EA_ES 0x00000007 /* Entry Size */
#define PCI_EA_BEI 0x000000f0 /* BAR Equivalent Indicator */
+
+/* EA fixed Secondary and Subordinate bus numbers for Bridge */
+#define PCI_EA_SEC_BUS_MASK 0xff
+#define PCI_EA_SUB_BUS_MASK 0xff00
+#define PCI_EA_SUB_BUS_SHIFT 8
+
/* 0-5 map to BARs 0-5 respectively */
#define PCI_EA_BEI_BAR0 0
#define PCI_EA_BEI_BAR5 5