felix.c (c8005511f38757ef071b34c0a98cf3d8a1c920a7) felix.c (1dc6a2a02320dab136c5f2e94b39dbb85f9e698c)
1// SPDX-License-Identifier: GPL-2.0
2/* Copyright 2019-2021 NXP
3 *
4 * This is an umbrella module for all network switches that are
5 * register-compatible with Ocelot and that perform I/O to their host CPU
6 * through an NPI (Node Processor Interface) Ethernet port.
7 */
8#include <uapi/linux/if_bridge.h>

--- 1061 unchanged lines hidden (view full) ---

1070 return pcs;
1071}
1072
1073static void felix_phylink_mac_link_down(struct dsa_switch *ds, int port,
1074 unsigned int link_an_mode,
1075 phy_interface_t interface)
1076{
1077 struct ocelot *ocelot = ds->priv;
1// SPDX-License-Identifier: GPL-2.0
2/* Copyright 2019-2021 NXP
3 *
4 * This is an umbrella module for all network switches that are
5 * register-compatible with Ocelot and that perform I/O to their host CPU
6 * through an NPI (Node Processor Interface) Ethernet port.
7 */
8#include <uapi/linux/if_bridge.h>

--- 1061 unchanged lines hidden (view full) ---

1070 return pcs;
1071}
1072
1073static void felix_phylink_mac_link_down(struct dsa_switch *ds, int port,
1074 unsigned int link_an_mode,
1075 phy_interface_t interface)
1076{
1077 struct ocelot *ocelot = ds->priv;
1078 struct felix *felix;
1078
1079
1080 felix = ocelot_to_felix(ocelot);
1081
1079 ocelot_phylink_mac_link_down(ocelot, port, link_an_mode, interface,
1082 ocelot_phylink_mac_link_down(ocelot, port, link_an_mode, interface,
1080 FELIX_MAC_QUIRKS);
1083 felix->info->quirks);
1081}
1082
1083static void felix_phylink_mac_link_up(struct dsa_switch *ds, int port,
1084 unsigned int link_an_mode,
1085 phy_interface_t interface,
1086 struct phy_device *phydev,
1087 int speed, int duplex,
1088 bool tx_pause, bool rx_pause)
1089{
1090 struct ocelot *ocelot = ds->priv;
1091 struct felix *felix = ocelot_to_felix(ocelot);
1092
1093 ocelot_phylink_mac_link_up(ocelot, port, phydev, link_an_mode,
1094 interface, speed, duplex, tx_pause, rx_pause,
1084}
1085
1086static void felix_phylink_mac_link_up(struct dsa_switch *ds, int port,
1087 unsigned int link_an_mode,
1088 phy_interface_t interface,
1089 struct phy_device *phydev,
1090 int speed, int duplex,
1091 bool tx_pause, bool rx_pause)
1092{
1093 struct ocelot *ocelot = ds->priv;
1094 struct felix *felix = ocelot_to_felix(ocelot);
1095
1096 ocelot_phylink_mac_link_up(ocelot, port, phydev, link_an_mode,
1097 interface, speed, duplex, tx_pause, rx_pause,
1095 FELIX_MAC_QUIRKS);
1098 felix->info->quirks);
1096
1097 if (felix->info->port_sched_speed_set)
1098 felix->info->port_sched_speed_set(ocelot, port, speed);
1099}
1100
1101static int felix_port_enable(struct dsa_switch *ds, int port,
1102 struct phy_device *phydev)
1103{

--- 1058 unchanged lines hidden ---
1099
1100 if (felix->info->port_sched_speed_set)
1101 felix->info->port_sched_speed_set(ocelot, port, speed);
1102}
1103
1104static int felix_port_enable(struct dsa_switch *ds, int port,
1105 struct phy_device *phydev)
1106{

--- 1058 unchanged lines hidden ---