diff options
author | Jaehoon Chung <jh80.chung@samsung.com> | 2017-01-16 01:31:37 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-02-08 14:39:59 -0500 |
commit | 2681c0e7ff70a6d41a81527f95f2edabafea4ace (patch) | |
tree | 56189688c9adcc554e3c85f05ef39c6181dcf546 | |
parent | e3538f402453beca2d83002910cfe13b43d8a95b (diff) |
PCI: exynos: Use the bitops BIT() macro to build bitmasks
Use the bitops BIT() macro to build bitmasks.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Jingoo Han <jingoohan1@gmail.com>
-rw-r--r-- | drivers/pci/host/pci-exynos.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/pci/host/pci-exynos.c b/drivers/pci/host/pci-exynos.c index 6255294f80aa..c5892c289efc 100644 --- a/drivers/pci/host/pci-exynos.c +++ b/drivers/pci/host/pci-exynos.c | |||
@@ -40,19 +40,19 @@ struct exynos_pcie { | |||
40 | 40 | ||
41 | /* PCIe ELBI registers */ | 41 | /* PCIe ELBI registers */ |
42 | #define PCIE_IRQ_PULSE 0x000 | 42 | #define PCIE_IRQ_PULSE 0x000 |
43 | #define IRQ_INTA_ASSERT (0x1 << 0) | 43 | #define IRQ_INTA_ASSERT BIT(0) |
44 | #define IRQ_INTB_ASSERT (0x1 << 2) | 44 | #define IRQ_INTB_ASSERT BIT(2) |
45 | #define IRQ_INTC_ASSERT (0x1 << 4) | 45 | #define IRQ_INTC_ASSERT BIT(4) |
46 | #define IRQ_INTD_ASSERT (0x1 << 6) | 46 | #define IRQ_INTD_ASSERT BIT(6) |
47 | #define PCIE_IRQ_LEVEL 0x004 | 47 | #define PCIE_IRQ_LEVEL 0x004 |
48 | #define PCIE_IRQ_SPECIAL 0x008 | 48 | #define PCIE_IRQ_SPECIAL 0x008 |
49 | #define PCIE_IRQ_EN_PULSE 0x00c | 49 | #define PCIE_IRQ_EN_PULSE 0x00c |
50 | #define PCIE_IRQ_EN_LEVEL 0x010 | 50 | #define PCIE_IRQ_EN_LEVEL 0x010 |
51 | #define IRQ_MSI_ENABLE (0x1 << 2) | 51 | #define IRQ_MSI_ENABLE BIT(2) |
52 | #define PCIE_IRQ_EN_SPECIAL 0x014 | 52 | #define PCIE_IRQ_EN_SPECIAL 0x014 |
53 | #define PCIE_PWR_RESET 0x018 | 53 | #define PCIE_PWR_RESET 0x018 |
54 | #define PCIE_CORE_RESET 0x01c | 54 | #define PCIE_CORE_RESET 0x01c |
55 | #define PCIE_CORE_RESET_ENABLE (0x1 << 0) | 55 | #define PCIE_CORE_RESET_ENABLE BIT(0) |
56 | #define PCIE_STICKY_RESET 0x020 | 56 | #define PCIE_STICKY_RESET 0x020 |
57 | #define PCIE_NONSTICKY_RESET 0x024 | 57 | #define PCIE_NONSTICKY_RESET 0x024 |
58 | #define PCIE_APP_INIT_RESET 0x028 | 58 | #define PCIE_APP_INIT_RESET 0x028 |
@@ -61,7 +61,7 @@ struct exynos_pcie { | |||
61 | #define PCIE_ELBI_LTSSM_ENABLE 0x1 | 61 | #define PCIE_ELBI_LTSSM_ENABLE 0x1 |
62 | #define PCIE_ELBI_SLV_AWMISC 0x11c | 62 | #define PCIE_ELBI_SLV_AWMISC 0x11c |
63 | #define PCIE_ELBI_SLV_ARMISC 0x120 | 63 | #define PCIE_ELBI_SLV_ARMISC 0x120 |
64 | #define PCIE_ELBI_SLV_DBI_ENABLE (0x1 << 21) | 64 | #define PCIE_ELBI_SLV_DBI_ENABLE BIT(21) |
65 | 65 | ||
66 | /* PCIe Purple registers */ | 66 | /* PCIe Purple registers */ |
67 | #define PCIE_PHY_GLOBAL_RESET 0x000 | 67 | #define PCIE_PHY_GLOBAL_RESET 0x000 |
@@ -79,27 +79,27 @@ struct exynos_pcie { | |||
79 | #define PCIE_PHY_DCC_FEEDBACK 0x014 | 79 | #define PCIE_PHY_DCC_FEEDBACK 0x014 |
80 | #define PCIE_PHY_PLL_DIV_1 0x05c | 80 | #define PCIE_PHY_PLL_DIV_1 0x05c |
81 | #define PCIE_PHY_COMMON_POWER 0x064 | 81 | #define PCIE_PHY_COMMON_POWER 0x064 |
82 | #define PCIE_PHY_COMMON_PD_CMN (0x1 << 3) | 82 | #define PCIE_PHY_COMMON_PD_CMN BIT(3) |
83 | #define PCIE_PHY_TRSV0_EMP_LVL 0x084 | 83 | #define PCIE_PHY_TRSV0_EMP_LVL 0x084 |
84 | #define PCIE_PHY_TRSV0_DRV_LVL 0x088 | 84 | #define PCIE_PHY_TRSV0_DRV_LVL 0x088 |
85 | #define PCIE_PHY_TRSV0_RXCDR 0x0ac | 85 | #define PCIE_PHY_TRSV0_RXCDR 0x0ac |
86 | #define PCIE_PHY_TRSV0_POWER 0x0c4 | 86 | #define PCIE_PHY_TRSV0_POWER 0x0c4 |
87 | #define PCIE_PHY_TRSV0_PD_TSV (0x1 << 7) | 87 | #define PCIE_PHY_TRSV0_PD_TSV BIT(7) |
88 | #define PCIE_PHY_TRSV0_LVCC 0x0dc | 88 | #define PCIE_PHY_TRSV0_LVCC 0x0dc |
89 | #define PCIE_PHY_TRSV1_EMP_LVL 0x144 | 89 | #define PCIE_PHY_TRSV1_EMP_LVL 0x144 |
90 | #define PCIE_PHY_TRSV1_RXCDR 0x16c | 90 | #define PCIE_PHY_TRSV1_RXCDR 0x16c |
91 | #define PCIE_PHY_TRSV1_POWER 0x184 | 91 | #define PCIE_PHY_TRSV1_POWER 0x184 |
92 | #define PCIE_PHY_TRSV1_PD_TSV (0x1 << 7) | 92 | #define PCIE_PHY_TRSV1_PD_TSV BIT(7) |
93 | #define PCIE_PHY_TRSV1_LVCC 0x19c | 93 | #define PCIE_PHY_TRSV1_LVCC 0x19c |
94 | #define PCIE_PHY_TRSV2_EMP_LVL 0x204 | 94 | #define PCIE_PHY_TRSV2_EMP_LVL 0x204 |
95 | #define PCIE_PHY_TRSV2_RXCDR 0x22c | 95 | #define PCIE_PHY_TRSV2_RXCDR 0x22c |
96 | #define PCIE_PHY_TRSV2_POWER 0x244 | 96 | #define PCIE_PHY_TRSV2_POWER 0x244 |
97 | #define PCIE_PHY_TRSV2_PD_TSV (0x1 << 7) | 97 | #define PCIE_PHY_TRSV2_PD_TSV BIT(7) |
98 | #define PCIE_PHY_TRSV2_LVCC 0x25c | 98 | #define PCIE_PHY_TRSV2_LVCC 0x25c |
99 | #define PCIE_PHY_TRSV3_EMP_LVL 0x2c4 | 99 | #define PCIE_PHY_TRSV3_EMP_LVL 0x2c4 |
100 | #define PCIE_PHY_TRSV3_RXCDR 0x2ec | 100 | #define PCIE_PHY_TRSV3_RXCDR 0x2ec |
101 | #define PCIE_PHY_TRSV3_POWER 0x304 | 101 | #define PCIE_PHY_TRSV3_POWER 0x304 |
102 | #define PCIE_PHY_TRSV3_PD_TSV (0x1 << 7) | 102 | #define PCIE_PHY_TRSV3_PD_TSV BIT(7) |
103 | #define PCIE_PHY_TRSV3_LVCC 0x31c | 103 | #define PCIE_PHY_TRSV3_LVCC 0x31c |
104 | 104 | ||
105 | static void exynos_pcie_writel(void __iomem *base, u32 val, u32 reg) | 105 | static void exynos_pcie_writel(void __iomem *base, u32 val, u32 reg) |