Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: xpcs: rearrange register definitions

Place register number definitions immediately above their field
definitions and order by register number.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/E1tjblS-00448F-8v@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Russell King (Oracle) and committed by
Jakub Kicinski
1dd1bf50 0784d83d

+8 -17
+8 -17
drivers/net/pcs/pcs-xpcs.h
··· 55 55 /* Clause 37 Defines */ 56 56 /* VR MII MMD registers offsets */ 57 57 #define DW_VR_MII_DIG_CTRL1 0x8000 58 - #define DW_VR_MII_AN_CTRL 0x8001 59 - #define DW_VR_MII_AN_INTR_STS 0x8002 60 - /* EEE Mode Control Register */ 61 - #define DW_VR_MII_EEE_MCTRL0 0x8006 62 - #define DW_VR_MII_EEE_MCTRL1 0x800b 63 - #define DW_VR_MII_DIG_CTRL2 0x80e1 64 - 65 - /* VR_MII_DIG_CTRL1 */ 66 58 #define DW_VR_MII_DIG_CTRL1_MAC_AUTO_SW BIT(9) 67 59 #define DW_VR_MII_DIG_CTRL1_2G5_EN BIT(2) 68 60 #define DW_VR_MII_DIG_CTRL1_PHY_MODE_CTRL BIT(0) 69 61 70 - /* VR_MII_DIG_CTRL2 */ 71 - #define DW_VR_MII_DIG_CTRL2_TX_POL_INV BIT(4) 72 - #define DW_VR_MII_DIG_CTRL2_RX_POL_INV BIT(0) 73 - 74 - /* VR_MII_AN_CTRL */ 62 + #define DW_VR_MII_AN_CTRL 0x8001 75 63 #define DW_VR_MII_AN_CTRL_8BIT BIT(8) 76 64 #define DW_VR_MII_TX_CONFIG_MASK BIT(3) 77 65 #define DW_VR_MII_TX_CONFIG_PHY_SIDE_SGMII 0x1 ··· 69 81 #define DW_VR_MII_PCS_MODE_C37_SGMII 0x2 70 82 #define DW_VR_MII_AN_INTR_EN BIT(0) 71 83 72 - /* VR_MII_AN_INTR_STS */ 84 + #define DW_VR_MII_AN_INTR_STS 0x8002 73 85 #define DW_VR_MII_AN_STS_C37_ANCMPLT_INTR BIT(0) 74 86 #define DW_VR_MII_AN_STS_C37_ANSGM_FD BIT(1) 75 87 #define DW_VR_MII_AN_STS_C37_ANSGM_SP GENMASK(3, 2) ··· 78 90 #define DW_VR_MII_C37_ANSGM_SP_1000 0x2 79 91 #define DW_VR_MII_C37_ANSGM_SP_LNKSTS BIT(4) 80 92 81 - /* VR MII EEE Control 0 defines */ 93 + #define DW_VR_MII_EEE_MCTRL0 0x8006 82 94 #define DW_VR_MII_EEE_LTX_EN BIT(0) /* LPI Tx Enable */ 83 95 #define DW_VR_MII_EEE_LRX_EN BIT(1) /* LPI Rx Enable */ 84 96 #define DW_VR_MII_EEE_TX_QUIET_EN BIT(2) /* Tx Quiet Enable */ 85 97 #define DW_VR_MII_EEE_RX_QUIET_EN BIT(3) /* Rx Quiet Enable */ 86 98 #define DW_VR_MII_EEE_TX_EN_CTRL BIT(4) /* Tx Control Enable */ 87 99 #define DW_VR_MII_EEE_RX_EN_CTRL BIT(7) /* Rx Control Enable */ 88 - 89 100 #define DW_VR_MII_EEE_MULT_FACT_100NS GENMASK(11, 8) 90 101 91 - /* VR MII EEE Control 1 defines */ 102 + #define DW_VR_MII_EEE_MCTRL1 0x800b 92 103 #define DW_VR_MII_EEE_TRN_LPI BIT(0) /* Transparent Mode Enable */ 104 + 105 + #define DW_VR_MII_DIG_CTRL2 0x80e1 106 + #define DW_VR_MII_DIG_CTRL2_TX_POL_INV BIT(4) 107 + #define DW_VR_MII_DIG_CTRL2_RX_POL_INV BIT(0) 93 108 94 109 #define DW_XPCS_INFO_DECLARE(_name, _pcs, _pma) \ 95 110 static const struct dw_xpcs_info _name = { .pcs = _pcs, .pma = _pma }