Skip to content

Commit 2a0dc34

Browse files
andredvinodkoul
authored andcommitted
phy: exynos5-usbdrd: uniform order of register bit macros
Most of the macros are ordered high -> low, but there are some outliers. Order them all uniformly from high to low. This will allow adding additional register (field) definitions in a consistent way. While at it, also remove some extra empty lines to group register bit field definitions together with the relevant register. This makes the registers easier to distinguish visually. No functional change. Signed-off-by: André Draszik <[email protected]> Reviewed-by: Peter Griffin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 2f2f5c1 commit 2a0dc34

File tree

1 file changed

+15
-29
lines changed

1 file changed

+15
-29
lines changed

drivers/phy/samsung/phy-exynos5-usbdrd.c

Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -35,54 +35,43 @@
3535

3636
/* Exynos5: USB 3.0 DRD PHY registers */
3737
#define EXYNOS5_DRD_LINKSYSTEM 0x04
38-
38+
#define LINKSYSTEM_XHCI_VERSION_CONTROL BIT(27)
3939
#define LINKSYSTEM_FLADJ_MASK (0x3f << 1)
4040
#define LINKSYSTEM_FLADJ(_x) ((_x) << 1)
41-
#define LINKSYSTEM_XHCI_VERSION_CONTROL BIT(27)
4241

4342
#define EXYNOS5_DRD_PHYUTMI 0x08
44-
4543
#define PHYUTMI_OTGDISABLE BIT(6)
4644
#define PHYUTMI_FORCESUSPEND BIT(1)
4745
#define PHYUTMI_FORCESLEEP BIT(0)
4846

4947
#define EXYNOS5_DRD_PHYPIPE 0x0c
5048

5149
#define EXYNOS5_DRD_PHYCLKRST 0x10
52-
5350
#define PHYCLKRST_EN_UTMISUSPEND BIT(31)
54-
5551
#define PHYCLKRST_SSC_REFCLKSEL_MASK (0xff << 23)
5652
#define PHYCLKRST_SSC_REFCLKSEL(_x) ((_x) << 23)
57-
5853
#define PHYCLKRST_SSC_RANGE_MASK (0x03 << 21)
5954
#define PHYCLKRST_SSC_RANGE(_x) ((_x) << 21)
60-
6155
#define PHYCLKRST_SSC_EN BIT(20)
6256
#define PHYCLKRST_REF_SSP_EN BIT(19)
6357
#define PHYCLKRST_REF_CLKDIV2 BIT(18)
64-
6558
#define PHYCLKRST_MPLL_MULTIPLIER_MASK (0x7f << 11)
6659
#define PHYCLKRST_MPLL_MULTIPLIER_100MHZ_REF (0x19 << 11)
6760
#define PHYCLKRST_MPLL_MULTIPLIER_50M_REF (0x32 << 11)
6861
#define PHYCLKRST_MPLL_MULTIPLIER_24MHZ_REF (0x68 << 11)
6962
#define PHYCLKRST_MPLL_MULTIPLIER_20MHZ_REF (0x7d << 11)
7063
#define PHYCLKRST_MPLL_MULTIPLIER_19200KHZ_REF (0x02 << 11)
71-
72-
#define PHYCLKRST_FSEL_UTMI_MASK (0x7 << 5)
7364
#define PHYCLKRST_FSEL_PIPE_MASK (0x7 << 8)
65+
#define PHYCLKRST_FSEL_UTMI_MASK (0x7 << 5)
7466
#define PHYCLKRST_FSEL(_x) ((_x) << 5)
7567
#define PHYCLKRST_FSEL_PAD_100MHZ (0x27 << 5)
7668
#define PHYCLKRST_FSEL_PAD_24MHZ (0x2a << 5)
7769
#define PHYCLKRST_FSEL_PAD_20MHZ (0x31 << 5)
7870
#define PHYCLKRST_FSEL_PAD_19_2MHZ (0x38 << 5)
79-
8071
#define PHYCLKRST_RETENABLEN BIT(4)
81-
8272
#define PHYCLKRST_REFCLKSEL_MASK (0x03 << 2)
8373
#define PHYCLKRST_REFCLKSEL_PAD_REFCLK (0x2 << 2)
8474
#define PHYCLKRST_REFCLKSEL_EXT_REFCLK (0x3 << 2)
85-
8675
#define PHYCLKRST_PORTRESET BIT(1)
8776
#define PHYCLKRST_COMMONONN BIT(0)
8877

@@ -100,30 +89,27 @@
10089
#define PHYREG1_CR_ACK BIT(0)
10190

10291
#define EXYNOS5_DRD_PHYPARAM0 0x1c
103-
10492
#define PHYPARAM0_REF_USE_PAD BIT(31)
10593
#define PHYPARAM0_REF_LOSLEVEL_MASK (0x1f << 26)
10694
#define PHYPARAM0_REF_LOSLEVEL (0x9 << 26)
10795

10896
#define EXYNOS5_DRD_PHYPARAM1 0x20
109-
11097
#define PHYPARAM1_PCS_TXDEEMPH_MASK (0x1f << 0)
11198
#define PHYPARAM1_PCS_TXDEEMPH (0x1c)
11299

113100
#define EXYNOS5_DRD_PHYTERM 0x24
114101

115102
#define EXYNOS5_DRD_PHYTEST 0x28
116-
117103
#define PHYTEST_POWERDOWN_SSP BIT(3)
118104
#define PHYTEST_POWERDOWN_HSP BIT(2)
119105

120106
#define EXYNOS5_DRD_PHYADP 0x2c
121107

122108
#define EXYNOS5_DRD_PHYUTMICLKSEL 0x30
123-
124109
#define PHYUTMICLKSEL_UTMI_CLKSEL BIT(2)
125110

126111
#define EXYNOS5_DRD_PHYRESUME 0x34
112+
127113
#define EXYNOS5_DRD_LINKPORT 0x44
128114

129115
/* USB 3.0 DRD PHY SS Function Control Reg; accessed by CR_PORT */
@@ -147,28 +133,28 @@
147133

148134
/* Exynos850: USB DRD PHY registers */
149135
#define EXYNOS850_DRD_LINKCTRL 0x04
150-
#define LINKCTRL_BUS_FILTER_BYPASS(_x) ((_x) << 4)
151136
#define LINKCTRL_FORCE_QACT BIT(8)
137+
#define LINKCTRL_BUS_FILTER_BYPASS(_x) ((_x) << 4)
152138

153139
#define EXYNOS850_DRD_CLKRST 0x20
154-
#define CLKRST_LINK_SW_RST BIT(0)
155-
#define CLKRST_PORT_RST BIT(1)
156140
#define CLKRST_PHY_SW_RST BIT(3)
141+
#define CLKRST_PORT_RST BIT(1)
142+
#define CLKRST_LINK_SW_RST BIT(0)
157143

158144
#define EXYNOS850_DRD_UTMI 0x50
159-
#define UTMI_FORCE_SLEEP BIT(0)
160-
#define UTMI_FORCE_SUSPEND BIT(1)
161-
#define UTMI_DM_PULLDOWN BIT(2)
162-
#define UTMI_DP_PULLDOWN BIT(3)
163-
#define UTMI_FORCE_BVALID BIT(4)
164145
#define UTMI_FORCE_VBUSVALID BIT(5)
146+
#define UTMI_FORCE_BVALID BIT(4)
147+
#define UTMI_DP_PULLDOWN BIT(3)
148+
#define UTMI_DM_PULLDOWN BIT(2)
149+
#define UTMI_FORCE_SUSPEND BIT(1)
150+
#define UTMI_FORCE_SLEEP BIT(0)
165151

166152
#define EXYNOS850_DRD_HSP 0x54
167-
#define HSP_COMMONONN BIT(8)
168-
#define HSP_EN_UTMISUSPEND BIT(9)
169-
#define HSP_VBUSVLDEXT BIT(12)
170-
#define HSP_VBUSVLDEXTSEL BIT(13)
171153
#define HSP_FSV_OUT_EN BIT(24)
154+
#define HSP_VBUSVLDEXTSEL BIT(13)
155+
#define HSP_VBUSVLDEXT BIT(12)
156+
#define HSP_EN_UTMISUSPEND BIT(9)
157+
#define HSP_COMMONONN BIT(8)
172158

173159
#define EXYNOS850_DRD_HSP_TEST 0x5c
174160
#define HSP_TEST_SIDDQ BIT(24)

0 commit comments

Comments
 (0)