diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-02-19 15:02:40 -0500 |
---|---|---|
committer | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2019-03-01 05:55:32 -0500 |
commit | 0e11faa48b07a063289d65363015a3d51ca4c337 (patch) | |
tree | 5657e3467bbff8029085eca39bd69678ca2b20b8 /drivers/pci/controller/dwc/pcie-designware.h | |
parent | 689e349a1a6c495bace83489753ab1c15696f869 (diff) |
PCI: dwc: Make use of BIT() in constant definitions
Avoid using explicit left shifts and convert various definitions to
use BIT() instead. No functional change intended.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
[lorenzo.pieralisi@arm.com: fixed PORT_LOGIC_SPEED_CHANGE redefinition]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Chris Healy <cphealy@gmail.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Leonard Crestez <leonard.crestez@nxp.com>
Cc: "A.s. Dong" <aisheng.dong@nxp.com>
Cc: Richard Zhu <hongxing.zhu@nxp.com>
Cc: linux-imx@nxp.com
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Diffstat (limited to 'drivers/pci/controller/dwc/pcie-designware.h')
-rw-r--r-- | drivers/pci/controller/dwc/pcie-designware.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/pci/controller/dwc/pcie-designware.h b/drivers/pci/controller/dwc/pcie-designware.h index 279000255ad1..070382869685 100644 --- a/drivers/pci/controller/dwc/pcie-designware.h +++ b/drivers/pci/controller/dwc/pcie-designware.h | |||
@@ -41,7 +41,7 @@ | |||
41 | #define PORT_LOGIC_LTSSM_STATE_L0 0x11 | 41 | #define PORT_LOGIC_LTSSM_STATE_L0 0x11 |
42 | 42 | ||
43 | #define PCIE_LINK_WIDTH_SPEED_CONTROL 0x80C | 43 | #define PCIE_LINK_WIDTH_SPEED_CONTROL 0x80C |
44 | #define PORT_LOGIC_SPEED_CHANGE (0x1 << 17) | 44 | #define PORT_LOGIC_SPEED_CHANGE BIT(17) |
45 | #define PORT_LOGIC_LINK_WIDTH_MASK (0x1f << 8) | 45 | #define PORT_LOGIC_LINK_WIDTH_MASK (0x1f << 8) |
46 | #define PORT_LOGIC_LINK_WIDTH_1_LANES (0x1 << 8) | 46 | #define PORT_LOGIC_LINK_WIDTH_1_LANES (0x1 << 8) |
47 | #define PORT_LOGIC_LINK_WIDTH_2_LANES (0x2 << 8) | 47 | #define PORT_LOGIC_LINK_WIDTH_2_LANES (0x2 << 8) |
@@ -55,8 +55,8 @@ | |||
55 | #define PCIE_MSI_INTR0_STATUS 0x830 | 55 | #define PCIE_MSI_INTR0_STATUS 0x830 |
56 | 56 | ||
57 | #define PCIE_ATU_VIEWPORT 0x900 | 57 | #define PCIE_ATU_VIEWPORT 0x900 |
58 | #define PCIE_ATU_REGION_INBOUND (0x1 << 31) | 58 | #define PCIE_ATU_REGION_INBOUND BIT(31) |
59 | #define PCIE_ATU_REGION_OUTBOUND (0x0 << 31) | 59 | #define PCIE_ATU_REGION_OUTBOUND 0 |
60 | #define PCIE_ATU_REGION_INDEX2 (0x2 << 0) | 60 | #define PCIE_ATU_REGION_INDEX2 (0x2 << 0) |
61 | #define PCIE_ATU_REGION_INDEX1 (0x1 << 0) | 61 | #define PCIE_ATU_REGION_INDEX1 (0x1 << 0) |
62 | #define PCIE_ATU_REGION_INDEX0 (0x0 << 0) | 62 | #define PCIE_ATU_REGION_INDEX0 (0x0 << 0) |
@@ -66,8 +66,8 @@ | |||
66 | #define PCIE_ATU_TYPE_CFG0 (0x4 << 0) | 66 | #define PCIE_ATU_TYPE_CFG0 (0x4 << 0) |
67 | #define PCIE_ATU_TYPE_CFG1 (0x5 << 0) | 67 | #define PCIE_ATU_TYPE_CFG1 (0x5 << 0) |
68 | #define PCIE_ATU_CR2 0x908 | 68 | #define PCIE_ATU_CR2 0x908 |
69 | #define PCIE_ATU_ENABLE (0x1 << 31) | 69 | #define PCIE_ATU_ENABLE BIT(31) |
70 | #define PCIE_ATU_BAR_MODE_ENABLE (0x1 << 30) | 70 | #define PCIE_ATU_BAR_MODE_ENABLE BIT(30) |
71 | #define PCIE_ATU_LOWER_BASE 0x90C | 71 | #define PCIE_ATU_LOWER_BASE 0x90C |
72 | #define PCIE_ATU_UPPER_BASE 0x910 | 72 | #define PCIE_ATU_UPPER_BASE 0x910 |
73 | #define PCIE_ATU_LIMIT 0x914 | 73 | #define PCIE_ATU_LIMIT 0x914 |
@@ -78,7 +78,7 @@ | |||
78 | #define PCIE_ATU_UPPER_TARGET 0x91C | 78 | #define PCIE_ATU_UPPER_TARGET 0x91C |
79 | 79 | ||
80 | #define PCIE_MISC_CONTROL_1_OFF 0x8BC | 80 | #define PCIE_MISC_CONTROL_1_OFF 0x8BC |
81 | #define PCIE_DBI_RO_WR_EN (0x1 << 0) | 81 | #define PCIE_DBI_RO_WR_EN BIT(0) |
82 | 82 | ||
83 | /* | 83 | /* |
84 | * iATU Unroll-specific register definitions | 84 | * iATU Unroll-specific register definitions |
@@ -105,7 +105,7 @@ | |||
105 | ((region) << 9) | 105 | ((region) << 9) |
106 | 106 | ||
107 | #define PCIE_GET_ATU_INB_UNR_REG_OFFSET(region) \ | 107 | #define PCIE_GET_ATU_INB_UNR_REG_OFFSET(region) \ |
108 | (((region) << 9) | (0x1 << 8)) | 108 | (((region) << 9) | BIT(8)) |
109 | 109 | ||
110 | #define MAX_MSI_IRQS 256 | 110 | #define MAX_MSI_IRQS 256 |
111 | #define MAX_MSI_IRQS_PER_CTRL 32 | 111 | #define MAX_MSI_IRQS_PER_CTRL 32 |