Commit accd5f5c authored by Russell King (Oracle)'s avatar Russell King (Oracle) Committed by David S. Miller
Browse files

net: pcs: xpcs: move definition of struct dw_xpcs to private header



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: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f042365a
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -123,6 +123,24 @@
#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);
+1 −17
Original line number Diff line number Diff line
@@ -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);