]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
net: pcs: xpcs: move definition of struct dw_xpcs to private header
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Fri, 4 Oct 2024 10:21:01 +0000 (11:21 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Oct 2024 11:13:11 +0000 (12:13 +0100)
There should be no reason for anything outside the XPCS code to know
the contents of struct dw_xpcs - this is a private structure to XPCS.
Move the definition to the private pcs-xpcs.h header, leaving a
declaration in the global pcs/pcs-xpcs.h

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/pcs/pcs-xpcs.h
include/linux/pcs/pcs-xpcs.h

index fa05adfae22048c0e95a705c74b3ee786a79b89d..1b546eae8280c67aff8c59512a74e2c7f3ec5f46 100644 (file)
 #define DW_XPCS_INFO_DECLARE(_name, _pcs, _pma)                                \
        static const struct dw_xpcs_info _name = { .pcs = _pcs, .pma = _pma }
 
+struct dw_xpcs_desc;
+
+enum dw_xpcs_clock {
+       DW_XPCS_CORE_CLK,
+       DW_XPCS_PAD_CLK,
+       DW_XPCS_NUM_CLKS,
+};
+
+struct dw_xpcs {
+       struct dw_xpcs_info info;
+       const struct dw_xpcs_desc *desc;
+       struct mdio_device *mdiodev;
+       struct clk_bulk_data clks[DW_XPCS_NUM_CLKS];
+       struct phylink_pcs pcs;
+       phy_interface_t interface;
+       bool need_reset;
+};
+
 int xpcs_read(struct dw_xpcs *xpcs, int dev, u32 reg);
 int xpcs_write(struct dw_xpcs *xpcs, int dev, u32 reg, u16 val);
 int xpcs_read_vpcs(struct dw_xpcs *xpcs, int reg);
index 868515f3cc88e9ad990b91ca580966deb8fcdf14..b5b5d17998b828d8105084efb9149beba5106771 100644 (file)
@@ -21,8 +21,6 @@
 #define DW_AN_C37_1000BASEX            4
 #define DW_10GBASER                    5
 
-struct dw_xpcs_desc;
-
 enum dw_xpcs_pcs_id {
        DW_XPCS_ID_NATIVE = 0,
        NXP_SJA1105_XPCS_ID = 0x00000010,
@@ -48,21 +46,7 @@ struct dw_xpcs_info {
        u32 pma;
 };
 
-enum dw_xpcs_clock {
-       DW_XPCS_CORE_CLK,
-       DW_XPCS_PAD_CLK,
-       DW_XPCS_NUM_CLKS,
-};
-
-struct dw_xpcs {
-       struct dw_xpcs_info info;
-       const struct dw_xpcs_desc *desc;
-       struct mdio_device *mdiodev;
-       struct clk_bulk_data clks[DW_XPCS_NUM_CLKS];
-       struct phylink_pcs pcs;
-       phy_interface_t interface;
-       bool need_reset;
-};
+struct dw_xpcs;
 
 struct phylink_pcs *xpcs_to_phylink_pcs(struct dw_xpcs *xpcs);
 int xpcs_get_an_mode(struct dw_xpcs *xpcs, phy_interface_t interface);