1 From 25d15dee34a1a40d5fd71636a205e3211f09fd1d Mon Sep 17 00:00:00 2001
2 From: Daniel Golle <daniel@makrotopia.org>
3 Date: Mon, 3 Apr 2023 02:18:28 +0100
4 Subject: [PATCH 10/16] net: dsa: mt7530: move p5_intf_modes() function to
7 In preparation of splitting mt7530.c into a driver for MDIO-connected
8 as well as MDIO-accessed built-in switches on one hand and MMIO-accessed
9 built-in switches move the p5_inft_modes() function from mt7530.h to
10 mt7530.c. The function is only needed there and will trigger a compiler
11 warning about a defined but unused function otherwise when including
12 mt7530.h in the to-be-introduced bus-specific drivers.
14 Signed-off-by: Daniel Golle <daniel@makrotopia.org>
15 Reviewed-by: Andrew Lunn <andrew@lunn.ch>
16 Signed-off-by: David S. Miller <davem@davemloft.net>
18 drivers/net/dsa/mt7530.c | 18 ++++++++++++++++++
19 drivers/net/dsa/mt7530.h | 18 ------------------
20 2 files changed, 18 insertions(+), 18 deletions(-)
22 --- a/drivers/net/dsa/mt7530.c
23 +++ b/drivers/net/dsa/mt7530.c
24 @@ -950,6 +950,24 @@ mt7530_set_ageing_time(struct dsa_switch
28 +static const char *p5_intf_modes(unsigned int p5_interface)
30 + switch (p5_interface) {
33 + case P5_INTF_SEL_PHY_P0:
35 + case P5_INTF_SEL_PHY_P4:
37 + case P5_INTF_SEL_GMAC5:
39 + case P5_INTF_SEL_GMAC5_SGMII:
40 + return "GMAC5_SGMII";
46 static void mt7530_setup_port5(struct dsa_switch *ds, phy_interface_t interface)
48 struct mt7530_priv *priv = ds->priv;
49 --- a/drivers/net/dsa/mt7530.h
50 +++ b/drivers/net/dsa/mt7530.h
51 @@ -682,24 +682,6 @@ enum p5_interface_select {
52 P5_INTF_SEL_GMAC5_SGMII,
55 -static const char *p5_intf_modes(unsigned int p5_interface)
57 - switch (p5_interface) {
60 - case P5_INTF_SEL_PHY_P0:
62 - case P5_INTF_SEL_PHY_P4:
64 - case P5_INTF_SEL_GMAC5:
66 - case P5_INTF_SEL_GMAC5_SGMII:
67 - return "GMAC5_SGMII";