|
|
|
@ -677,11 +677,6 @@ static int mv88e6xxx_phy_ppu_write(struct mv88e6xxx_chip *chip, int addr,
|
|
|
|
|
return err;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static bool mv88e6xxx_6065_family(struct mv88e6xxx_chip *chip)
|
|
|
|
|
{
|
|
|
|
|
return chip->info->family == MV88E6XXX_FAMILY_6065;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static bool mv88e6xxx_6095_family(struct mv88e6xxx_chip *chip)
|
|
|
|
|
{
|
|
|
|
|
return chip->info->family == MV88E6XXX_FAMILY_6095;
|
|
|
|
@ -2438,6 +2433,72 @@ static int mv88e6xxx_serdes_power_on(struct mv88e6xxx_chip *chip)
|
|
|
|
|
return err;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int mv88e6xxx_setup_port_dsa(struct mv88e6xxx_chip *chip, int port,
|
|
|
|
|
int upstream_port)
|
|
|
|
|
{
|
|
|
|
|
int err;
|
|
|
|
|
|
|
|
|
|
err = chip->info->ops->port_set_frame_mode(
|
|
|
|
|
chip, port, MV88E6XXX_FRAME_MODE_DSA);
|
|
|
|
|
if (err)
|
|
|
|
|
return err;
|
|
|
|
|
|
|
|
|
|
return chip->info->ops->port_set_egress_unknowns(
|
|
|
|
|
chip, port, port == upstream_port);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int mv88e6xxx_setup_port_cpu(struct mv88e6xxx_chip *chip, int port)
|
|
|
|
|
{
|
|
|
|
|
int err;
|
|
|
|
|
|
|
|
|
|
switch (chip->info->tag_protocol) {
|
|
|
|
|
case DSA_TAG_PROTO_EDSA:
|
|
|
|
|
err = chip->info->ops->port_set_frame_mode(
|
|
|
|
|
chip, port, MV88E6XXX_FRAME_MODE_ETHERTYPE);
|
|
|
|
|
if (err)
|
|
|
|
|
return err;
|
|
|
|
|
|
|
|
|
|
err = mv88e6xxx_port_set_egress_mode(
|
|
|
|
|
chip, port, PORT_CONTROL_EGRESS_ADD_TAG);
|
|
|
|
|
if (err)
|
|
|
|
|
return err;
|
|
|
|
|
|
|
|
|
|
if (chip->info->ops->port_set_ether_type)
|
|
|
|
|
err = chip->info->ops->port_set_ether_type(
|
|
|
|
|
chip, port, ETH_P_EDSA);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case DSA_TAG_PROTO_DSA:
|
|
|
|
|
err = chip->info->ops->port_set_frame_mode(
|
|
|
|
|
chip, port, MV88E6XXX_FRAME_MODE_DSA);
|
|
|
|
|
if (err)
|
|
|
|
|
return err;
|
|
|
|
|
|
|
|
|
|
err = mv88e6xxx_port_set_egress_mode(
|
|
|
|
|
chip, port, PORT_CONTROL_EGRESS_UNMODIFIED);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
err = -EINVAL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (err)
|
|
|
|
|
return err;
|
|
|
|
|
|
|
|
|
|
return chip->info->ops->port_set_egress_unknowns(chip, port, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int mv88e6xxx_setup_port_normal(struct mv88e6xxx_chip *chip, int port)
|
|
|
|
|
{
|
|
|
|
|
int err;
|
|
|
|
|
|
|
|
|
|
err = chip->info->ops->port_set_frame_mode(
|
|
|
|
|
chip, port, MV88E6XXX_FRAME_MODE_NORMAL);
|
|
|
|
|
if (err)
|
|
|
|
|
return err;
|
|
|
|
|
|
|
|
|
|
return chip->info->ops->port_set_egress_unknowns(chip, port, false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port)
|
|
|
|
|
{
|
|
|
|
|
struct dsa_switch *ds = chip->ds;
|
|
|
|
@ -2473,44 +2534,23 @@ static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port)
|
|
|
|
|
* If this is the upstream port for this switch, enable
|
|
|
|
|
* forwarding of unknown unicasts and multicasts.
|
|
|
|
|
*/
|
|
|
|
|
reg = 0;
|
|
|
|
|
if (mv88e6xxx_6352_family(chip) || mv88e6xxx_6351_family(chip) ||
|
|
|
|
|
mv88e6xxx_6165_family(chip) || mv88e6xxx_6097_family(chip) ||
|
|
|
|
|
mv88e6xxx_6095_family(chip) || mv88e6xxx_6065_family(chip) ||
|
|
|
|
|
mv88e6xxx_6185_family(chip) || mv88e6xxx_6320_family(chip))
|
|
|
|
|
reg = PORT_CONTROL_IGMP_MLD_SNOOP |
|
|
|
|
|
reg = PORT_CONTROL_IGMP_MLD_SNOOP |
|
|
|
|
|
PORT_CONTROL_USE_TAG | PORT_CONTROL_USE_IP |
|
|
|
|
|
PORT_CONTROL_STATE_FORWARDING;
|
|
|
|
|
if (dsa_is_cpu_port(ds, port)) {
|
|
|
|
|
if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_EDSA))
|
|
|
|
|
reg |= PORT_CONTROL_FRAME_ETHER_TYPE_DSA |
|
|
|
|
|
PORT_CONTROL_FORWARD_UNKNOWN_MC;
|
|
|
|
|
else
|
|
|
|
|
reg |= PORT_CONTROL_DSA_TAG;
|
|
|
|
|
reg |= PORT_CONTROL_EGRESS_ADD_TAG |
|
|
|
|
|
PORT_CONTROL_FORWARD_UNKNOWN;
|
|
|
|
|
}
|
|
|
|
|
if (dsa_is_dsa_port(ds, port)) {
|
|
|
|
|
if (mv88e6xxx_6095_family(chip) ||
|
|
|
|
|
mv88e6xxx_6185_family(chip))
|
|
|
|
|
reg |= PORT_CONTROL_DSA_TAG;
|
|
|
|
|
if (mv88e6xxx_6352_family(chip) ||
|
|
|
|
|
mv88e6xxx_6351_family(chip) ||
|
|
|
|
|
mv88e6xxx_6165_family(chip) ||
|
|
|
|
|
mv88e6xxx_6097_family(chip) ||
|
|
|
|
|
mv88e6xxx_6320_family(chip)) {
|
|
|
|
|
reg |= PORT_CONTROL_FRAME_MODE_DSA;
|
|
|
|
|
}
|
|
|
|
|
err = mv88e6xxx_port_write(chip, port, PORT_CONTROL, reg);
|
|
|
|
|
if (err)
|
|
|
|
|
return err;
|
|
|
|
|
|
|
|
|
|
if (port == dsa_upstream_port(ds))
|
|
|
|
|
reg |= PORT_CONTROL_FORWARD_UNKNOWN |
|
|
|
|
|
PORT_CONTROL_FORWARD_UNKNOWN_MC;
|
|
|
|
|
}
|
|
|
|
|
if (reg) {
|
|
|
|
|
err = mv88e6xxx_port_write(chip, port, PORT_CONTROL, reg);
|
|
|
|
|
if (err)
|
|
|
|
|
return err;
|
|
|
|
|
if (dsa_is_cpu_port(ds, port)) {
|
|
|
|
|
err = mv88e6xxx_setup_port_cpu(chip, port);
|
|
|
|
|
} else if (dsa_is_dsa_port(ds, port)) {
|
|
|
|
|
err = mv88e6xxx_setup_port_dsa(chip, port,
|
|
|
|
|
dsa_upstream_port(ds));
|
|
|
|
|
} else {
|
|
|
|
|
err = mv88e6xxx_setup_port_normal(chip, port);
|
|
|
|
|
}
|
|
|
|
|
if (err)
|
|
|
|
|
return err;
|
|
|
|
|
|
|
|
|
|
/* If this port is connected to a SerDes, make sure the SerDes is not
|
|
|
|
|
* powered down.
|
|
|
|
@ -2607,30 +2647,10 @@ static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port)
|
|
|
|
|
0x0000);
|
|
|
|
|
if (err)
|
|
|
|
|
return err;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Port Ethertype: use the Ethertype DSA Ethertype
|
|
|
|
|
* value.
|
|
|
|
|
*/
|
|
|
|
|
if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_EDSA)) {
|
|
|
|
|
err = mv88e6xxx_port_write(chip, port, PORT_ETH_TYPE,
|
|
|
|
|
ETH_P_EDSA);
|
|
|
|
|
if (err)
|
|
|
|
|
return err;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Tag Remap: use an identity 802.1p prio -> switch
|
|
|
|
|
* prio mapping.
|
|
|
|
|
*/
|
|
|
|
|
err = mv88e6xxx_port_write(chip, port, PORT_TAG_REGMAP_0123,
|
|
|
|
|
0x3210);
|
|
|
|
|
if (err)
|
|
|
|
|
return err;
|
|
|
|
|
|
|
|
|
|
/* Tag Remap 2: use an identity 802.1p prio -> switch
|
|
|
|
|
* prio mapping.
|
|
|
|
|
*/
|
|
|
|
|
err = mv88e6xxx_port_write(chip, port, PORT_TAG_REGMAP_4567,
|
|
|
|
|
0x7654);
|
|
|
|
|
if (chip->info->ops->port_tag_remap) {
|
|
|
|
|
err = chip->info->ops->port_tag_remap(chip, port);
|
|
|
|
|
if (err)
|
|
|
|
|
return err;
|
|
|
|
|
}
|
|
|
|
@ -2757,15 +2777,17 @@ static int mv88e6xxx_g1_setup(struct mv88e6xxx_chip *chip)
|
|
|
|
|
if (err)
|
|
|
|
|
return err;
|
|
|
|
|
|
|
|
|
|
/* Configure the upstream port, and configure it as the port to which
|
|
|
|
|
* ingress and egress and ARP monitor frames are to be sent.
|
|
|
|
|
*/
|
|
|
|
|
reg = upstream_port << GLOBAL_MONITOR_CONTROL_INGRESS_SHIFT |
|
|
|
|
|
upstream_port << GLOBAL_MONITOR_CONTROL_EGRESS_SHIFT |
|
|
|
|
|
upstream_port << GLOBAL_MONITOR_CONTROL_ARP_SHIFT;
|
|
|
|
|
err = mv88e6xxx_g1_write(chip, GLOBAL_MONITOR_CONTROL, reg);
|
|
|
|
|
if (err)
|
|
|
|
|
return err;
|
|
|
|
|
if (chip->info->ops->g1_set_cpu_port) {
|
|
|
|
|
err = chip->info->ops->g1_set_cpu_port(chip, upstream_port);
|
|
|
|
|
if (err)
|
|
|
|
|
return err;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (chip->info->ops->g1_set_egress_port) {
|
|
|
|
|
err = chip->info->ops->g1_set_egress_port(chip, upstream_port);
|
|
|
|
|
if (err)
|
|
|
|
|
return err;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Disable remote management, and set the switch's DSA device number. */
|
|
|
|
|
err = mv88e6xxx_g1_write(chip, GLOBAL_CONTROL_2,
|
|
|
|
@ -3189,10 +3211,16 @@ static const struct mv88e6xxx_ops mv88e6085_ops = {
|
|
|
|
|
.port_set_link = mv88e6xxx_port_set_link,
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_speed = mv88e6185_port_set_speed,
|
|
|
|
|
.port_tag_remap = mv88e6095_port_tag_remap,
|
|
|
|
|
.port_set_frame_mode = mv88e6351_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6351_port_set_egress_unknowns,
|
|
|
|
|
.port_set_ether_type = mv88e6351_port_set_ether_type,
|
|
|
|
|
.stats_snapshot = mv88e6xxx_g1_stats_snapshot,
|
|
|
|
|
.stats_get_sset_count = mv88e6095_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6095_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6095_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6095_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6095_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_ops mv88e6095_ops = {
|
|
|
|
@ -3203,6 +3231,8 @@ static const struct mv88e6xxx_ops mv88e6095_ops = {
|
|
|
|
|
.port_set_link = mv88e6xxx_port_set_link,
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_speed = mv88e6185_port_set_speed,
|
|
|
|
|
.port_set_frame_mode = mv88e6085_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6085_port_set_egress_unknowns,
|
|
|
|
|
.stats_snapshot = mv88e6xxx_g1_stats_snapshot,
|
|
|
|
|
.stats_get_sset_count = mv88e6095_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6095_stats_get_strings,
|
|
|
|
@ -3217,10 +3247,16 @@ static const struct mv88e6xxx_ops mv88e6097_ops = {
|
|
|
|
|
.port_set_link = mv88e6xxx_port_set_link,
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_speed = mv88e6185_port_set_speed,
|
|
|
|
|
.port_tag_remap = mv88e6095_port_tag_remap,
|
|
|
|
|
.port_set_frame_mode = mv88e6351_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6351_port_set_egress_unknowns,
|
|
|
|
|
.port_set_ether_type = mv88e6351_port_set_ether_type,
|
|
|
|
|
.stats_snapshot = mv88e6xxx_g1_stats_snapshot,
|
|
|
|
|
.stats_get_sset_count = mv88e6095_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6095_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6095_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6095_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6095_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_ops mv88e6123_ops = {
|
|
|
|
@ -3231,10 +3267,14 @@ static const struct mv88e6xxx_ops mv88e6123_ops = {
|
|
|
|
|
.port_set_link = mv88e6xxx_port_set_link,
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_speed = mv88e6185_port_set_speed,
|
|
|
|
|
.port_set_frame_mode = mv88e6085_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6085_port_set_egress_unknowns,
|
|
|
|
|
.stats_snapshot = mv88e6xxx_g1_stats_snapshot,
|
|
|
|
|
.stats_get_sset_count = mv88e6095_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6095_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6095_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6095_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6095_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_ops mv88e6131_ops = {
|
|
|
|
@ -3245,10 +3285,16 @@ static const struct mv88e6xxx_ops mv88e6131_ops = {
|
|
|
|
|
.port_set_link = mv88e6xxx_port_set_link,
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_speed = mv88e6185_port_set_speed,
|
|
|
|
|
.port_tag_remap = mv88e6095_port_tag_remap,
|
|
|
|
|
.port_set_frame_mode = mv88e6351_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6351_port_set_egress_unknowns,
|
|
|
|
|
.port_set_ether_type = mv88e6351_port_set_ether_type,
|
|
|
|
|
.stats_snapshot = mv88e6xxx_g1_stats_snapshot,
|
|
|
|
|
.stats_get_sset_count = mv88e6095_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6095_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6095_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6095_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6095_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_ops mv88e6161_ops = {
|
|
|
|
@ -3259,10 +3305,16 @@ static const struct mv88e6xxx_ops mv88e6161_ops = {
|
|
|
|
|
.port_set_link = mv88e6xxx_port_set_link,
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_speed = mv88e6185_port_set_speed,
|
|
|
|
|
.port_tag_remap = mv88e6095_port_tag_remap,
|
|
|
|
|
.port_set_frame_mode = mv88e6351_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6351_port_set_egress_unknowns,
|
|
|
|
|
.port_set_ether_type = mv88e6351_port_set_ether_type,
|
|
|
|
|
.stats_snapshot = mv88e6xxx_g1_stats_snapshot,
|
|
|
|
|
.stats_get_sset_count = mv88e6095_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6095_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6095_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6095_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6095_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_ops mv88e6165_ops = {
|
|
|
|
@ -3277,6 +3329,8 @@ static const struct mv88e6xxx_ops mv88e6165_ops = {
|
|
|
|
|
.stats_get_sset_count = mv88e6095_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6095_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6095_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6095_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6095_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_ops mv88e6171_ops = {
|
|
|
|
@ -3288,10 +3342,16 @@ static const struct mv88e6xxx_ops mv88e6171_ops = {
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_rgmii_delay = mv88e6352_port_set_rgmii_delay,
|
|
|
|
|
.port_set_speed = mv88e6185_port_set_speed,
|
|
|
|
|
.port_tag_remap = mv88e6095_port_tag_remap,
|
|
|
|
|
.port_set_frame_mode = mv88e6351_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6351_port_set_egress_unknowns,
|
|
|
|
|
.port_set_ether_type = mv88e6351_port_set_ether_type,
|
|
|
|
|
.stats_snapshot = mv88e6320_g1_stats_snapshot,
|
|
|
|
|
.stats_get_sset_count = mv88e6095_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6095_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6095_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6095_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6095_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_ops mv88e6172_ops = {
|
|
|
|
@ -3305,10 +3365,16 @@ static const struct mv88e6xxx_ops mv88e6172_ops = {
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_rgmii_delay = mv88e6352_port_set_rgmii_delay,
|
|
|
|
|
.port_set_speed = mv88e6352_port_set_speed,
|
|
|
|
|
.port_tag_remap = mv88e6095_port_tag_remap,
|
|
|
|
|
.port_set_frame_mode = mv88e6351_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6351_port_set_egress_unknowns,
|
|
|
|
|
.port_set_ether_type = mv88e6351_port_set_ether_type,
|
|
|
|
|
.stats_snapshot = mv88e6320_g1_stats_snapshot,
|
|
|
|
|
.stats_get_sset_count = mv88e6095_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6095_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6095_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6095_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6095_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_ops mv88e6175_ops = {
|
|
|
|
@ -3320,10 +3386,16 @@ static const struct mv88e6xxx_ops mv88e6175_ops = {
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_rgmii_delay = mv88e6352_port_set_rgmii_delay,
|
|
|
|
|
.port_set_speed = mv88e6185_port_set_speed,
|
|
|
|
|
.port_tag_remap = mv88e6095_port_tag_remap,
|
|
|
|
|
.port_set_frame_mode = mv88e6351_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6351_port_set_egress_unknowns,
|
|
|
|
|
.port_set_ether_type = mv88e6351_port_set_ether_type,
|
|
|
|
|
.stats_snapshot = mv88e6320_g1_stats_snapshot,
|
|
|
|
|
.stats_get_sset_count = mv88e6095_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6095_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6095_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6095_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6095_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_ops mv88e6176_ops = {
|
|
|
|
@ -3337,10 +3409,16 @@ static const struct mv88e6xxx_ops mv88e6176_ops = {
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_rgmii_delay = mv88e6352_port_set_rgmii_delay,
|
|
|
|
|
.port_set_speed = mv88e6352_port_set_speed,
|
|
|
|
|
.port_tag_remap = mv88e6095_port_tag_remap,
|
|
|
|
|
.port_set_frame_mode = mv88e6351_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6351_port_set_egress_unknowns,
|
|
|
|
|
.port_set_ether_type = mv88e6351_port_set_ether_type,
|
|
|
|
|
.stats_snapshot = mv88e6320_g1_stats_snapshot,
|
|
|
|
|
.stats_get_sset_count = mv88e6095_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6095_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6095_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6095_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6095_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_ops mv88e6185_ops = {
|
|
|
|
@ -3351,10 +3429,14 @@ static const struct mv88e6xxx_ops mv88e6185_ops = {
|
|
|
|
|
.port_set_link = mv88e6xxx_port_set_link,
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_speed = mv88e6185_port_set_speed,
|
|
|
|
|
.port_set_frame_mode = mv88e6085_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6085_port_set_egress_unknowns,
|
|
|
|
|
.stats_snapshot = mv88e6xxx_g1_stats_snapshot,
|
|
|
|
|
.stats_get_sset_count = mv88e6095_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6095_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6095_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6095_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6095_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_ops mv88e6190_ops = {
|
|
|
|
@ -3366,11 +3448,17 @@ static const struct mv88e6xxx_ops mv88e6190_ops = {
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_rgmii_delay = mv88e6390_port_set_rgmii_delay,
|
|
|
|
|
.port_set_speed = mv88e6390_port_set_speed,
|
|
|
|
|
.port_tag_remap = mv88e6390_port_tag_remap,
|
|
|
|
|
.port_set_frame_mode = mv88e6351_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6351_port_set_egress_unknowns,
|
|
|
|
|
.port_set_ether_type = mv88e6351_port_set_ether_type,
|
|
|
|
|
.stats_snapshot = mv88e6390_g1_stats_snapshot,
|
|
|
|
|
.stats_set_histogram = mv88e6390_g1_stats_set_histogram,
|
|
|
|
|
.stats_get_sset_count = mv88e6320_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6320_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6390_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6390_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6390_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_ops mv88e6190x_ops = {
|
|
|
|
@ -3382,11 +3470,17 @@ static const struct mv88e6xxx_ops mv88e6190x_ops = {
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_rgmii_delay = mv88e6390_port_set_rgmii_delay,
|
|
|
|
|
.port_set_speed = mv88e6390x_port_set_speed,
|
|
|
|
|
.port_tag_remap = mv88e6390_port_tag_remap,
|
|
|
|
|
.port_set_frame_mode = mv88e6351_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6351_port_set_egress_unknowns,
|
|
|
|
|
.port_set_ether_type = mv88e6351_port_set_ether_type,
|
|
|
|
|
.stats_snapshot = mv88e6390_g1_stats_snapshot,
|
|
|
|
|
.stats_set_histogram = mv88e6390_g1_stats_set_histogram,
|
|
|
|
|
.stats_get_sset_count = mv88e6320_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6320_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6390_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6390_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6390_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_ops mv88e6191_ops = {
|
|
|
|
@ -3398,11 +3492,17 @@ static const struct mv88e6xxx_ops mv88e6191_ops = {
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_rgmii_delay = mv88e6390_port_set_rgmii_delay,
|
|
|
|
|
.port_set_speed = mv88e6390_port_set_speed,
|
|
|
|
|
.port_tag_remap = mv88e6390_port_tag_remap,
|
|
|
|
|
.port_set_frame_mode = mv88e6351_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6351_port_set_egress_unknowns,
|
|
|
|
|
.port_set_ether_type = mv88e6351_port_set_ether_type,
|
|
|
|
|
.stats_snapshot = mv88e6390_g1_stats_snapshot,
|
|
|
|
|
.stats_set_histogram = mv88e6390_g1_stats_set_histogram,
|
|
|
|
|
.stats_get_sset_count = mv88e6320_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6320_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6390_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6390_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6390_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_ops mv88e6240_ops = {
|
|
|
|
@ -3416,10 +3516,16 @@ static const struct mv88e6xxx_ops mv88e6240_ops = {
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_rgmii_delay = mv88e6352_port_set_rgmii_delay,
|
|
|
|
|
.port_set_speed = mv88e6352_port_set_speed,
|
|
|
|
|
.port_tag_remap = mv88e6095_port_tag_remap,
|
|
|
|
|
.port_set_frame_mode = mv88e6351_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6351_port_set_egress_unknowns,
|
|
|
|
|
.port_set_ether_type = mv88e6351_port_set_ether_type,
|
|
|
|
|
.stats_snapshot = mv88e6320_g1_stats_snapshot,
|
|
|
|
|
.stats_get_sset_count = mv88e6095_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6095_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6095_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6095_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6095_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_ops mv88e6290_ops = {
|
|
|
|
@ -3431,11 +3537,17 @@ static const struct mv88e6xxx_ops mv88e6290_ops = {
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_rgmii_delay = mv88e6390_port_set_rgmii_delay,
|
|
|
|
|
.port_set_speed = mv88e6390_port_set_speed,
|
|
|
|
|
.port_tag_remap = mv88e6390_port_tag_remap,
|
|
|
|
|
.port_set_frame_mode = mv88e6351_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6351_port_set_egress_unknowns,
|
|
|
|
|
.port_set_ether_type = mv88e6351_port_set_ether_type,
|
|
|
|
|
.stats_snapshot = mv88e6390_g1_stats_snapshot,
|
|
|
|
|
.stats_set_histogram = mv88e6390_g1_stats_set_histogram,
|
|
|
|
|
.stats_get_sset_count = mv88e6320_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6320_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6390_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6390_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6390_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_ops mv88e6320_ops = {
|
|
|
|
@ -3448,10 +3560,16 @@ static const struct mv88e6xxx_ops mv88e6320_ops = {
|
|
|
|
|
.port_set_link = mv88e6xxx_port_set_link,
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_speed = mv88e6185_port_set_speed,
|
|
|
|
|
.port_tag_remap = mv88e6095_port_tag_remap,
|
|
|
|
|
.port_set_frame_mode = mv88e6351_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6351_port_set_egress_unknowns,
|
|
|
|
|
.port_set_ether_type = mv88e6351_port_set_ether_type,
|
|
|
|
|
.stats_snapshot = mv88e6320_g1_stats_snapshot,
|
|
|
|
|
.stats_get_sset_count = mv88e6320_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6320_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6320_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6095_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6095_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_ops mv88e6321_ops = {
|
|
|
|
@ -3464,10 +3582,16 @@ static const struct mv88e6xxx_ops mv88e6321_ops = {
|
|
|
|
|
.port_set_link = mv88e6xxx_port_set_link,
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_speed = mv88e6185_port_set_speed,
|
|
|
|
|
.port_tag_remap = mv88e6095_port_tag_remap,
|
|
|
|
|
.port_set_frame_mode = mv88e6351_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6351_port_set_egress_unknowns,
|
|
|
|
|
.port_set_ether_type = mv88e6351_port_set_ether_type,
|
|
|
|
|
.stats_snapshot = mv88e6320_g1_stats_snapshot,
|
|
|
|
|
.stats_get_sset_count = mv88e6320_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6320_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6320_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6095_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6095_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_ops mv88e6350_ops = {
|
|
|
|
@ -3479,10 +3603,16 @@ static const struct mv88e6xxx_ops mv88e6350_ops = {
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_rgmii_delay = mv88e6352_port_set_rgmii_delay,
|
|
|
|
|
.port_set_speed = mv88e6185_port_set_speed,
|
|
|
|
|
.port_tag_remap = mv88e6095_port_tag_remap,
|
|
|
|
|
.port_set_frame_mode = mv88e6351_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6351_port_set_egress_unknowns,
|
|
|
|
|
.port_set_ether_type = mv88e6351_port_set_ether_type,
|
|
|
|
|
.stats_snapshot = mv88e6320_g1_stats_snapshot,
|
|
|
|
|
.stats_get_sset_count = mv88e6095_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6095_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6095_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6095_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6095_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_ops mv88e6351_ops = {
|
|
|
|
@ -3494,10 +3624,16 @@ static const struct mv88e6xxx_ops mv88e6351_ops = {
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_rgmii_delay = mv88e6352_port_set_rgmii_delay,
|
|
|
|
|
.port_set_speed = mv88e6185_port_set_speed,
|
|
|
|
|
.port_tag_remap = mv88e6095_port_tag_remap,
|
|
|
|
|
.port_set_frame_mode = mv88e6351_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6351_port_set_egress_unknowns,
|
|
|
|
|
.port_set_ether_type = mv88e6351_port_set_ether_type,
|
|
|
|
|
.stats_snapshot = mv88e6320_g1_stats_snapshot,
|
|
|
|
|
.stats_get_sset_count = mv88e6095_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6095_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6095_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6095_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6095_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_ops mv88e6352_ops = {
|
|
|
|
@ -3511,10 +3647,16 @@ static const struct mv88e6xxx_ops mv88e6352_ops = {
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_rgmii_delay = mv88e6352_port_set_rgmii_delay,
|
|
|
|
|
.port_set_speed = mv88e6352_port_set_speed,
|
|
|
|
|
.port_tag_remap = mv88e6095_port_tag_remap,
|
|
|
|
|
.port_set_frame_mode = mv88e6351_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6351_port_set_egress_unknowns,
|
|
|
|
|
.port_set_ether_type = mv88e6351_port_set_ether_type,
|
|
|
|
|
.stats_snapshot = mv88e6320_g1_stats_snapshot,
|
|
|
|
|
.stats_get_sset_count = mv88e6095_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6095_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6095_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6095_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6095_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_ops mv88e6390_ops = {
|
|
|
|
@ -3526,11 +3668,17 @@ static const struct mv88e6xxx_ops mv88e6390_ops = {
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_rgmii_delay = mv88e6390_port_set_rgmii_delay,
|
|
|
|
|
.port_set_speed = mv88e6390_port_set_speed,
|
|
|
|
|
.port_tag_remap = mv88e6390_port_tag_remap,
|
|
|
|
|
.port_set_frame_mode = mv88e6351_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6351_port_set_egress_unknowns,
|
|
|
|
|
.port_set_ether_type = mv88e6351_port_set_ether_type,
|
|
|
|
|
.stats_snapshot = mv88e6390_g1_stats_snapshot,
|
|
|
|
|
.stats_set_histogram = mv88e6390_g1_stats_set_histogram,
|
|
|
|
|
.stats_get_sset_count = mv88e6320_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6320_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6390_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6390_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6390_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_ops mv88e6390x_ops = {
|
|
|
|
@ -3542,11 +3690,17 @@ static const struct mv88e6xxx_ops mv88e6390x_ops = {
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_rgmii_delay = mv88e6390_port_set_rgmii_delay,
|
|
|
|
|
.port_set_speed = mv88e6390x_port_set_speed,
|
|
|
|
|
.port_tag_remap = mv88e6390_port_tag_remap,
|
|
|
|
|
.port_set_frame_mode = mv88e6351_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6351_port_set_egress_unknowns,
|
|
|
|
|
.port_set_ether_type = mv88e6351_port_set_ether_type,
|
|
|
|
|
.stats_snapshot = mv88e6390_g1_stats_snapshot,
|
|
|
|
|
.stats_set_histogram = mv88e6390_g1_stats_set_histogram,
|
|
|
|
|
.stats_get_sset_count = mv88e6320_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6320_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6390_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6390_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6390_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_ops mv88e6391_ops = {
|
|
|
|
@ -3558,13 +3712,35 @@ static const struct mv88e6xxx_ops mv88e6391_ops = {
|
|
|
|
|
.port_set_duplex = mv88e6xxx_port_set_duplex,
|
|
|
|
|
.port_set_rgmii_delay = mv88e6390_port_set_rgmii_delay,
|
|
|
|
|
.port_set_speed = mv88e6390_port_set_speed,
|
|
|
|
|
.port_tag_remap = mv88e6390_port_tag_remap,
|
|
|
|
|
.port_set_frame_mode = mv88e6351_port_set_frame_mode,
|
|
|
|
|
.port_set_egress_unknowns = mv88e6351_port_set_egress_unknowns,
|
|
|
|
|
.port_set_ether_type = mv88e6351_port_set_ether_type,
|
|
|
|
|
.stats_snapshot = mv88e6390_g1_stats_snapshot,
|
|
|
|
|
.stats_set_histogram = mv88e6390_g1_stats_set_histogram,
|
|
|
|
|
.stats_get_sset_count = mv88e6320_stats_get_sset_count,
|
|
|
|
|
.stats_get_strings = mv88e6320_stats_get_strings,
|
|
|
|
|
.stats_get_stats = mv88e6390_stats_get_stats,
|
|
|
|
|
.g1_set_cpu_port = mv88e6390_g1_set_cpu_port,
|
|
|
|
|
.g1_set_egress_port = mv88e6390_g1_set_egress_port,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static int mv88e6xxx_verify_madatory_ops(struct mv88e6xxx_chip *chip,
|
|
|
|
|
const struct mv88e6xxx_ops *ops)
|
|
|
|
|
{
|
|
|
|
|
if (!ops->port_set_frame_mode) {
|
|
|
|
|
dev_err(chip->dev, "Missing port_set_frame_mode");
|
|
|
|
|
return -EINVAL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!ops->port_set_egress_unknowns) {
|
|
|
|
|
dev_err(chip->dev, "Missing port_set_egress_mode");
|
|
|
|
|
return -EINVAL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
[MV88E6085] = {
|
|
|
|
|
.prod_num = PORT_SWITCH_ID_PROD_NUM_6085,
|
|
|
|
@ -3576,6 +3752,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
.global1_addr = 0x1b,
|
|
|
|
|
.age_time_coeff = 15000,
|
|
|
|
|
.g1_irqs = 8,
|
|
|
|
|
.tag_protocol = DSA_TAG_PROTO_DSA,
|
|
|
|
|
.flags = MV88E6XXX_FLAGS_FAMILY_6097,
|
|
|
|
|
.ops = &mv88e6085_ops,
|
|
|
|
|
},
|
|
|
|
@ -3590,6 +3767,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
.global1_addr = 0x1b,
|
|
|
|
|
.age_time_coeff = 15000,
|
|
|
|
|
.g1_irqs = 8,
|
|
|
|
|
.tag_protocol = DSA_TAG_PROTO_DSA,
|
|
|
|
|
.flags = MV88E6XXX_FLAGS_FAMILY_6095,
|
|
|
|
|
.ops = &mv88e6095_ops,
|
|
|
|
|
},
|
|
|
|
@ -3618,6 +3796,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
.global1_addr = 0x1b,
|
|
|
|
|
.age_time_coeff = 15000,
|
|
|
|
|
.g1_irqs = 9,
|
|
|
|
|
.tag_protocol = DSA_TAG_PROTO_DSA,
|
|
|
|
|
.flags = MV88E6XXX_FLAGS_FAMILY_6165,
|
|
|
|
|
.ops = &mv88e6123_ops,
|
|
|
|
|
},
|
|
|
|
@ -3632,6 +3811,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
.global1_addr = 0x1b,
|
|
|
|
|
.age_time_coeff = 15000,
|
|
|
|
|
.g1_irqs = 9,
|
|
|
|
|
.tag_protocol = DSA_TAG_PROTO_DSA,
|
|
|
|
|
.flags = MV88E6XXX_FLAGS_FAMILY_6185,
|
|
|
|
|
.ops = &mv88e6131_ops,
|
|
|
|
|
},
|
|
|
|
@ -3646,6 +3826,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
.global1_addr = 0x1b,
|
|
|
|
|
.age_time_coeff = 15000,
|
|
|
|
|
.g1_irqs = 9,
|
|
|
|
|
.tag_protocol = DSA_TAG_PROTO_DSA,
|
|
|
|
|
.flags = MV88E6XXX_FLAGS_FAMILY_6165,
|
|
|
|
|
.ops = &mv88e6161_ops,
|
|
|
|
|
},
|
|
|
|
@ -3660,6 +3841,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
.global1_addr = 0x1b,
|
|
|
|
|
.age_time_coeff = 15000,
|
|
|
|
|
.g1_irqs = 9,
|
|
|
|
|
.tag_protocol = DSA_TAG_PROTO_DSA,
|
|
|
|
|
.flags = MV88E6XXX_FLAGS_FAMILY_6165,
|
|
|
|
|
.ops = &mv88e6165_ops,
|
|
|
|
|
},
|
|
|
|
@ -3674,6 +3856,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
.global1_addr = 0x1b,
|
|
|
|
|
.age_time_coeff = 15000,
|
|
|
|
|
.g1_irqs = 9,
|
|
|
|
|
.tag_protocol = DSA_TAG_PROTO_EDSA,
|
|
|
|
|
.flags = MV88E6XXX_FLAGS_FAMILY_6351,
|
|
|
|
|
.ops = &mv88e6171_ops,
|
|
|
|
|
},
|
|
|
|
@ -3688,6 +3871,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
.global1_addr = 0x1b,
|
|
|
|
|
.age_time_coeff = 15000,
|
|
|
|
|
.g1_irqs = 9,
|
|
|
|
|
.tag_protocol = DSA_TAG_PROTO_EDSA,
|
|
|
|
|
.flags = MV88E6XXX_FLAGS_FAMILY_6352,
|
|
|
|
|
.ops = &mv88e6172_ops,
|
|
|
|
|
},
|
|
|
|
@ -3702,6 +3886,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
.global1_addr = 0x1b,
|
|
|
|
|
.age_time_coeff = 15000,
|
|
|
|
|
.g1_irqs = 9,
|
|
|
|
|
.tag_protocol = DSA_TAG_PROTO_EDSA,
|
|
|
|
|
.flags = MV88E6XXX_FLAGS_FAMILY_6351,
|
|
|
|
|
.ops = &mv88e6175_ops,
|
|
|
|
|
},
|
|
|
|
@ -3716,6 +3901,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
.global1_addr = 0x1b,
|
|
|
|
|
.age_time_coeff = 15000,
|
|
|
|
|
.g1_irqs = 9,
|
|
|
|
|
.tag_protocol = DSA_TAG_PROTO_EDSA,
|
|
|
|
|
.flags = MV88E6XXX_FLAGS_FAMILY_6352,
|
|
|
|
|
.ops = &mv88e6176_ops,
|
|
|
|
|
},
|
|
|
|
@ -3730,6 +3916,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
.global1_addr = 0x1b,
|
|
|
|
|
.age_time_coeff = 15000,
|
|
|
|
|
.g1_irqs = 8,
|
|
|
|
|
.tag_protocol = DSA_TAG_PROTO_EDSA,
|
|
|
|
|
.flags = MV88E6XXX_FLAGS_FAMILY_6185,
|
|
|
|
|
.ops = &mv88e6185_ops,
|
|
|
|
|
},
|
|
|
|
@ -3742,6 +3929,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
.num_ports = 11, /* 10 + Z80 */
|
|
|
|
|
.port_base_addr = 0x0,
|
|
|
|
|
.global1_addr = 0x1b,
|
|
|
|
|
.tag_protocol = DSA_TAG_PROTO_DSA,
|
|
|
|
|
.age_time_coeff = 15000,
|
|
|
|
|
.g1_irqs = 9,
|
|
|
|
|
.flags = MV88E6XXX_FLAGS_FAMILY_6390,
|
|
|
|
@ -3758,6 +3946,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
.global1_addr = 0x1b,
|
|
|
|
|
.age_time_coeff = 15000,
|
|
|
|
|
.g1_irqs = 9,
|
|
|
|
|
.tag_protocol = DSA_TAG_PROTO_DSA,
|
|
|
|
|
.flags = MV88E6XXX_FLAGS_FAMILY_6390,
|
|
|
|
|
.ops = &mv88e6190x_ops,
|
|
|
|
|
},
|
|
|
|
@ -3771,6 +3960,8 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
.port_base_addr = 0x0,
|
|
|
|
|
.global1_addr = 0x1b,
|
|
|
|
|
.age_time_coeff = 15000,
|
|
|
|
|
.g1_irqs = 9,
|
|
|
|
|
.tag_protocol = DSA_TAG_PROTO_DSA,
|
|
|
|
|
.flags = MV88E6XXX_FLAGS_FAMILY_6390,
|
|
|
|
|
.ops = &mv88e6391_ops,
|
|
|
|
|
},
|
|
|
|
@ -3785,6 +3976,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
.global1_addr = 0x1b,
|
|
|
|
|
.age_time_coeff = 15000,
|
|
|
|
|
.g1_irqs = 9,
|
|
|
|
|
.tag_protocol = DSA_TAG_PROTO_EDSA,
|
|
|
|
|
.flags = MV88E6XXX_FLAGS_FAMILY_6352,
|
|
|
|
|
.ops = &mv88e6240_ops,
|
|
|
|
|
},
|
|
|
|
@ -3799,6 +3991,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
.global1_addr = 0x1b,
|
|
|
|
|
.age_time_coeff = 15000,
|
|
|
|
|
.g1_irqs = 9,
|
|
|
|
|
.tag_protocol = DSA_TAG_PROTO_DSA,
|
|
|
|
|
.flags = MV88E6XXX_FLAGS_FAMILY_6390,
|
|
|
|
|
.ops = &mv88e6290_ops,
|
|
|
|
|
},
|
|
|
|
@ -3813,6 +4006,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
.global1_addr = 0x1b,
|
|
|
|
|
.age_time_coeff = 15000,
|
|
|
|
|
.g1_irqs = 8,
|
|
|
|
|
.tag_protocol = DSA_TAG_PROTO_EDSA,
|
|
|
|
|
.flags = MV88E6XXX_FLAGS_FAMILY_6320,
|
|
|
|
|
.ops = &mv88e6320_ops,
|
|
|
|
|
},
|
|
|
|
@ -3827,6 +4021,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
.global1_addr = 0x1b,
|
|
|
|
|
.age_time_coeff = 15000,
|
|
|
|
|
.g1_irqs = 8,
|
|
|
|
|
.tag_protocol = DSA_TAG_PROTO_EDSA,
|
|
|
|
|
.flags = MV88E6XXX_FLAGS_FAMILY_6320,
|
|
|
|
|
.ops = &mv88e6321_ops,
|
|
|
|
|
},
|
|
|
|
@ -3841,6 +4036,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
.global1_addr = 0x1b,
|
|
|
|
|
.age_time_coeff = 15000,
|
|
|
|
|
.g1_irqs = 9,
|
|
|
|
|
.tag_protocol = DSA_TAG_PROTO_EDSA,
|
|
|
|
|
.flags = MV88E6XXX_FLAGS_FAMILY_6351,
|
|
|
|
|
.ops = &mv88e6350_ops,
|
|
|
|
|
},
|
|
|
|
@ -3855,6 +4051,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
.global1_addr = 0x1b,
|
|
|
|
|
.age_time_coeff = 15000,
|
|
|
|
|
.g1_irqs = 9,
|
|
|
|
|
.tag_protocol = DSA_TAG_PROTO_EDSA,
|
|
|
|
|
.flags = MV88E6XXX_FLAGS_FAMILY_6351,
|
|
|
|
|
.ops = &mv88e6351_ops,
|
|
|
|
|
},
|
|
|
|
@ -3869,6 +4066,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
.global1_addr = 0x1b,
|
|
|
|
|
.age_time_coeff = 15000,
|
|
|
|
|
.g1_irqs = 9,
|
|
|
|
|
.tag_protocol = DSA_TAG_PROTO_EDSA,
|
|
|
|
|
.flags = MV88E6XXX_FLAGS_FAMILY_6352,
|
|
|
|
|
.ops = &mv88e6352_ops,
|
|
|
|
|
},
|
|
|
|
@ -3882,6 +4080,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
.global1_addr = 0x1b,
|
|
|
|
|
.age_time_coeff = 15000,
|
|
|
|
|
.g1_irqs = 9,
|
|
|
|
|
.tag_protocol = DSA_TAG_PROTO_DSA,
|
|
|
|
|
.flags = MV88E6XXX_FLAGS_FAMILY_6390,
|
|
|
|
|
.ops = &mv88e6390_ops,
|
|
|
|
|
},
|
|
|
|
@ -3895,6 +4094,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
|
|
|
|
|
.global1_addr = 0x1b,
|
|
|
|
|
.age_time_coeff = 15000,
|
|
|
|
|
.g1_irqs = 9,
|
|
|
|
|
.tag_protocol = DSA_TAG_PROTO_DSA,
|
|
|
|
|
.flags = MV88E6XXX_FLAGS_FAMILY_6390,
|
|
|
|
|
.ops = &mv88e6390x_ops,
|
|
|
|
|
},
|
|
|
|
@ -3995,10 +4195,7 @@ static enum dsa_tag_protocol mv88e6xxx_get_tag_protocol(struct dsa_switch *ds)
|
|
|
|
|
{
|
|
|
|
|
struct mv88e6xxx_chip *chip = ds->priv;
|
|
|
|
|
|
|
|
|
|
if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_EDSA))
|
|
|
|
|
return DSA_TAG_PROTO_EDSA;
|
|
|
|
|
|
|
|
|
|
return DSA_TAG_PROTO_DSA;
|
|
|
|
|
return chip->info->tag_protocol;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static const char *mv88e6xxx_drv_probe(struct device *dsa_dev,
|
|
|
|
@ -4186,6 +4383,10 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)
|
|
|
|
|
|
|
|
|
|
chip->info = compat_info;
|
|
|
|
|
|
|
|
|
|
err = mv88e6xxx_verify_madatory_ops(chip, chip->info->ops);
|
|
|
|
|
if (err)
|
|
|
|
|
return err;
|
|
|
|
|
|
|
|
|
|
err = mv88e6xxx_smi_init(chip, mdiodev->bus, mdiodev->addr);
|
|
|
|
|
if (err)
|
|
|
|
|
return err;
|
|
|
|
|