Skip to content

Commit 261de72

Browse files
kishonLorenzo Pieralisi
authored andcommitted
PCI: keystone: Cleanup macros defined in pci-keystone.c
No functional change. Cleanup macros defined in pci-keystone.c by removing unused macros, grouping the macros and aligning it properly. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
1 parent c0b8558 commit 261de72

File tree

1 file changed

+16
-25
lines changed

1 file changed

+16
-25
lines changed

drivers/pci/controller/dwc/pci-keystone.c

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,14 @@
2828

2929
#include "pcie-designware.h"
3030

31-
#define DRIVER_NAME "keystone-pcie"
32-
3331
#define PCIE_VENDORID_MASK 0xffff
3432
#define PCIE_DEVICEID_SHIFT 16
3533

36-
/* DEV_STAT_CTRL */
37-
#define PCIE_CAP_BASE 0x70
38-
39-
/* Application register defines */
40-
#define LTSSM_EN_VAL BIT(0)
41-
#define DBI_CS2 BIT(5)
42-
#define OB_XLAT_EN_VAL BIT(1)
43-
4434
/* Application registers */
4535
#define CMD_STATUS 0x004
36+
#define LTSSM_EN_VAL BIT(0)
37+
#define OB_XLAT_EN_VAL BIT(1)
38+
#define DBI_CS2 BIT(5)
4639

4740
#define CFG_SETUP 0x008
4841
#define CFG_BUS(x) (((x) & 0xff) << 16)
@@ -70,27 +63,25 @@
7063
#define IRQ_STATUS 0x184
7164
#define MSI_IRQ_OFFSET 4
7265

73-
/* Error IRQ bits */
74-
#define ERR_AER BIT(5) /* ECRC error */
75-
#define ERR_AXI BIT(4) /* AXI tag lookup fatal error */
76-
#define ERR_CORR BIT(3) /* Correctable error */
77-
#define ERR_NONFATAL BIT(2) /* Non-fatal error */
78-
#define ERR_FATAL BIT(1) /* Fatal error */
79-
#define ERR_SYS BIT(0) /* System (fatal, non-fatal, or correctable) */
80-
#define ERR_IRQ_ALL (ERR_AER | ERR_AXI | ERR_CORR | \
81-
ERR_NONFATAL | ERR_FATAL | ERR_SYS)
8266
#define ERR_IRQ_STATUS 0x1c4
8367
#define ERR_IRQ_ENABLE_SET 0x1c8
84-
#define ERR_IRQ_ENABLE_CLR 0x1cc
68+
#define ERR_AER BIT(5) /* ECRC error */
69+
#define ERR_AXI BIT(4) /* AXI tag lookup fatal error */
70+
#define ERR_CORR BIT(3) /* Correctable error */
71+
#define ERR_NONFATAL BIT(2) /* Non-fatal error */
72+
#define ERR_FATAL BIT(1) /* Fatal error */
73+
#define ERR_SYS BIT(0) /* System error */
74+
#define ERR_IRQ_ALL (ERR_AER | ERR_AXI | ERR_CORR | \
75+
ERR_NONFATAL | ERR_FATAL | ERR_SYS)
8576

8677
#define MAX_MSI_HOST_IRQS 8
8778
/* PCIE controller device IDs */
88-
#define PCIE_RC_K2HK 0xb008
89-
#define PCIE_RC_K2E 0xb009
90-
#define PCIE_RC_K2L 0xb00a
91-
#define PCIE_RC_K2G 0xb00b
79+
#define PCIE_RC_K2HK 0xb008
80+
#define PCIE_RC_K2E 0xb009
81+
#define PCIE_RC_K2L 0xb00a
82+
#define PCIE_RC_K2G 0xb00b
9283

93-
#define to_keystone_pcie(x) dev_get_drvdata((x)->dev)
84+
#define to_keystone_pcie(x) dev_get_drvdata((x)->dev)
9485

9586
struct keystone_pcie {
9687
struct dw_pcie *pci;

0 commit comments

Comments
 (0)