mirror of
https://github.com/torvalds/linux.git
synced 2024-11-18 18:11:56 +00:00
net: dsa: mv88e6xxx: implement port_set_speed for mv88e6250
The data sheet also mentions the possibility of selecting 200 Mbps for the MII ports (ports 5 and 6) by setting the ForceSpd field to 0x2 (aka MV88E6065_PORT_MAC_CTL_SPEED_200). However, there's a note that "actual speed is determined by bit 8 above", and flipping back a page, one finds that bits 13:8 are reserved... So without further information on what bit 8 means, let's stick to supporting just 10 and 100 Mbps on all ports. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
855cdfde54
commit
a528e5be6b
@ -294,6 +294,18 @@ int mv88e6185_port_set_speed(struct mv88e6xxx_chip *chip, int port, int speed)
|
||||
return mv88e6xxx_port_set_speed(chip, port, speed, false, false);
|
||||
}
|
||||
|
||||
/* Support 10, 100 Mbps (e.g. 88E6250 family) */
|
||||
int mv88e6250_port_set_speed(struct mv88e6xxx_chip *chip, int port, int speed)
|
||||
{
|
||||
if (speed == SPEED_MAX)
|
||||
speed = 100;
|
||||
|
||||
if (speed > 100)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
return mv88e6xxx_port_set_speed(chip, port, speed, false, false);
|
||||
}
|
||||
|
||||
/* Support 10, 100, 200, 1000, 2500 Mbps (e.g. 88E6341) */
|
||||
int mv88e6341_port_set_speed(struct mv88e6xxx_chip *chip, int port, int speed)
|
||||
{
|
||||
|
@ -279,6 +279,7 @@ int mv88e6xxx_port_set_duplex(struct mv88e6xxx_chip *chip, int port, int dup);
|
||||
|
||||
int mv88e6065_port_set_speed(struct mv88e6xxx_chip *chip, int port, int speed);
|
||||
int mv88e6185_port_set_speed(struct mv88e6xxx_chip *chip, int port, int speed);
|
||||
int mv88e6250_port_set_speed(struct mv88e6xxx_chip *chip, int port, int speed);
|
||||
int mv88e6341_port_set_speed(struct mv88e6xxx_chip *chip, int port, int speed);
|
||||
int mv88e6352_port_set_speed(struct mv88e6xxx_chip *chip, int port, int speed);
|
||||
int mv88e6390_port_set_speed(struct mv88e6xxx_chip *chip, int port, int speed);
|
||||
|
Loading…
Reference in New Issue
Block a user