Move PCI configuration space size macros (PCI_CFG_SPACE_SIZE and PCI_CFG_SPACE_EXP_SIZE) from drivers/pci/pci.h to include/uapi/linux/pci_regs.h so they can be used by more drivers and eliminate duplicate definitions. [bhelgaas: Expand comment to include PCI-X details] Signed-off-by: Wang Sheng-Hui <shhuiw@foxmail.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Showing the changes to include/uapi/linux (1 of 3 files). Show all
Unified · Split
| @@ -22,6 +22,14 @@ · 21 unmodified lines | ||
| 22 | 22 | #ifndef LINUX_PCI_REGS_H |
| 23 | 23 | #define LINUX_PCI_REGS_H |
| 24 | 24 | |
| 25 | +/* | |
| 26 | + * Conventional PCI and PCI-X Mode 1 devices have 256 bytes of | |
| 27 | + * configuration space. PCI-X Mode 2 and PCIe devices have 4096 bytes of | |
| 28 | + * configuration space. | |
| 29 | + */ | |
| 30 | +#define PCI_CFG_SPACE_SIZE 256 | |
| 31 | +#define PCI_CFG_SPACE_EXP_SIZE 4096 | |
| 32 | + | |
| 25 | 33 | /* |
| 26 | 34 | * Under PCI, each device has 256 bytes of configuration address space, |
| 27 | 35 | * of which the first 64 bytes are standardized as follows: |