pci: Move some PCIe register offset definitions to a common header 19/231519/7
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Tue, 12 May 2020 18:47:10 +0000 (20:47 +0200)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Sat, 23 May 2020 05:38:32 +0000 (14:38 +0900)
Some PCI Express register offsets are currently defined in multiple
drivers, move them to a common header to avoid re-definitions and
as a pre-requisite for adding new PCIe driver.
While at it replace some spaces with tabs.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I2e06710f8ff1195b66cee7dc8d16af26cc6c6a60

drivers/pci/pci-rcar-gen3.c
drivers/pci/pcie_intel_fpga.c
include/pci.h

index 30eff67..393f1c9 100644 (file)
 #define RCAR_PCI_MAX_RESOURCES 4
 #define MAX_NR_INBOUND_MAPS    6
 
-#define PCI_EXP_FLAGS          2               /* Capabilities register */
-#define PCI_EXP_FLAGS_TYPE     0x00f0          /* Device/Port type */
-#define PCI_EXP_TYPE_ROOT_PORT 0x4             /* Root Port */
-#define PCI_EXP_LNKCAP         12              /* Link Capabilities */
-#define PCI_EXP_LNKCAP_DLLLARC 0x00100000      /* Data Link Layer Link Active Reporting Capable */
-#define PCI_EXP_SLTCAP         20              /* Slot Capabilities */
-#define PCI_EXP_SLTCAP_PSN     0xfff80000      /* Physical Slot Number */
-
 enum {
        RCAR_PCI_ACCESS_READ,
        RCAR_PCI_ACCESS_WRITE,
index a1f6e95..23719fb 100644 (file)
@@ -64,9 +64,6 @@
 #define IS_ROOT_PORT(pcie, bdf)                                \
                ((PCI_BUS(bdf) == pcie->first_busno) ? true : false)
 
-#define PCI_EXP_LNKSTA         18      /* Link Status */
-#define PCI_EXP_LNKSTA_DLLLA   0x2000  /* Data Link Layer Link Active */
-
 /**
  * struct intel_fpga_pcie - Intel FPGA PCIe controller state
  * @bus: Pointer to the PCI bus
index 0a85475..d54d3ba 100644 (file)
 #define  PCI_EA_FIELD_MASK     0xfffffffc      /* For Base & Max Offset */
 
 /* PCI Express capabilities */
+#define PCI_EXP_FLAGS          2       /* Capabilities register */
+#define  PCI_EXP_FLAGS_TYPE    0x00f0  /* Device/Port type */
+#define  PCI_EXP_TYPE_ROOT_PORT 0x4    /* Root Port */
 #define PCI_EXP_DEVCAP         4       /* Device capabilities */
-#define  PCI_EXP_DEVCAP_FLR     0x10000000 /* Function Level Reset */
+#define  PCI_EXP_DEVCAP_FLR    0x10000000 /* Function Level Reset */
 #define PCI_EXP_DEVCTL         8       /* Device Control */
-#define  PCI_EXP_DEVCTL_BCR_FLR 0x8000  /* Bridge Configuration Retry / FLR */
+#define  PCI_EXP_DEVCTL_BCR_FLR        0x8000  /* Bridge Configuration Retry / FLR */
+#define PCI_EXP_LNKCAP         12      /* Link Capabilities */
+#define  PCI_EXP_LNKCAP_DLLLARC        0x00100000 /* Data Link Layer Link Active Reporting Capable */
+#define PCI_EXP_LNKSTA         18      /* Link Status */
+#define  PCI_EXP_LNKSTA_DLLLA  0x2000  /* Data Link Layer Link Active */
+#define PCI_EXP_SLTCAP         20      /* Slot Capabilities */
+#define  PCI_EXP_SLTCAP_PSN    0xfff80000 /* Physical Slot Number */
 
 /* Include the ID list */