merge the define of PCI_CFG_SPACE_SIZE
PATCH 1/1 merge the define of PCI_CFG_SPACE_SIZE
Subject: pci: merge define of PCI_CFG_SPACE_SIZE From: "Zhang, Yanmin" <[email protected]>
3 files define PCI_CFG_SPACE_SIZE. Move the define to file pci_regs.h.
Signed-off-by: Zhang Yanmin <[email protected]>
---
drivers/pci/pcie/aer/aerdrv_core.c +0 -1
@@ -28,7 +28,6 @@static int forceload;module_param (forceload, bool,0 ); -#define PCI_CFG_SPACE_SIZE (0x100)int pci_find_aer_capability (struct pci_dev *dev) {int pos;
drivers/pci/pcie/portdrv.h +0 -1
@@ -25,7 +25,6 @@#define PCIE_CAPABILITIES_REG 0x2#define PCIE_SLOT_CAPABILITIES_REG 0x14#define PCIE_PORT_DEVICE_MAXSERVICES 4 -#define PCI_CFG_SPACE_SIZE 256#define get_descriptor_id (type, service) (((type - 4) << 4) | service)
drivers/pci/probe.c +0 -2
@@ -14,8 +14,6 @@#define CARDBUS_LATENCY_TIMER 176/* secondary latency timer */ #define CARDBUS_RESERVE_BUSNR 3 -#define PCI_CFG_SPACE_SIZE 256 -#define PCI_CFG_SPACE_EXP_SIZE 4096/* Ugh. Need to stop exporting this to modules. */ LIST_HEAD (pci_root_buses);
include/linux/pci_regs.h +4 -0
@@ -421,6 +421,10 @@#define PCI_EXP_RTSTA 32/* Root Status */ /* Extended Capabilities (PCI-X 2.0 and Express) */ +/* pci space size & Ext cap start offset */ +#define PCI_CFG_SPACE_SIZE (256) +#define PCI_CFG_SPACE_EXP_SIZE (4096)/* pci ext space size */ +#define PCI_EXT_CAP_ID (header) (header & 0x0000ffff)#define PCI_EXT_CAP_VER (header) ((header >> 16) & 0xf)#define PCI_EXT_CAP_NEXT (header) ((header >> 20) & 0xffc)
Jesse Barnes
AppliedQuoted 7 lines · Yanmin
Subject: pci: merge define of
PCI_CFG_SPACE_SIZEFrom: "Zhang, Yanmin" <[email protected]>3 files define
PCI_CFG_SPACE_SIZE. Move the define to filepci_regs.h.Signed-off-by: Zhang Yanmin <[email protected]>
Applied to linux-next, thanks for a nice cleanup.
Now we just need to pull some of the other silliness out of the PCIe feature drivers (for instance making a generic pcie_find_capability).
Jesse