File tree Expand file tree Collapse file tree 3 files changed +14
-7
lines changed
drivers/net/dsa/mv88e6xxx Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -1053,6 +1053,10 @@ static int mv88e6xxx_devmap_setup(struct mv88e6xxx_chip *chip)
10531053 return err ;
10541054 }
10551055
1056+ err = mv88e6xxx_g1_set_device_number (chip , chip -> ds -> index );
1057+ if (err )
1058+ return err ;
1059+
10561060 return 0 ;
10571061}
10581062
@@ -2160,15 +2164,8 @@ static int mv88e6xxx_set_ageing_time(struct dsa_switch *ds,
21602164
21612165static int mv88e6xxx_g1_setup (struct mv88e6xxx_chip * chip )
21622166{
2163- struct dsa_switch * ds = chip -> ds ;
21642167 int err ;
21652168
2166- /* Disable remote management, and set the switch's DSA device number. */
2167- err = mv88e6xxx_g1_write (chip , MV88E6XXX_G1_CTL2 ,
2168- (ds -> index & 0x1f ));
2169- if (err )
2170- return err ;
2171-
21722169 /* Configure the IP ToS mapping registers. */
21732170 err = mv88e6xxx_g1_write (chip , MV88E6XXX_G1_IP_PRI_0 , 0x0000 );
21742171 if (err )
Original file line number Diff line number Diff line change @@ -389,6 +389,13 @@ int mv88e6390_g1_stats_set_histogram(struct mv88e6xxx_chip *chip)
389389 return err ;
390390}
391391
392+ int mv88e6xxx_g1_set_device_number (struct mv88e6xxx_chip * chip , int index )
393+ {
394+ return mv88e6xxx_g1_ctl2_mask (chip ,
395+ MV88E6XXX_G1_CTL2_DEVICE_NUMBER_MASK ,
396+ index );
397+ }
398+
392399/* Offset 0x1d: Statistics Operation 2 */
393400
394401int mv88e6xxx_g1_stats_wait (struct mv88e6xxx_chip * chip )
Original file line number Diff line number Diff line change 207207#define MV88E6185_G1_CTL2_CASCADE_PORT_MASK 0xf000
208208#define MV88E6185_G1_CTL2_CASCADE_PORT_NONE 0xe000
209209#define MV88E6185_G1_CTL2_CASCADE_PORT_MULTI 0xf000
210+ #define MV88E6XXX_G1_CTL2_DEVICE_NUMBER_MASK 0x001f
210211
211212/* Offset 0x1D: Stats Operation Register */
212213#define MV88E6XXX_G1_STATS_OP 0x1d
@@ -256,6 +257,8 @@ int mv88e6390_g1_mgmt_rsvd2cpu(struct mv88e6xxx_chip *chip);
256257
257258int mv88e6185_g1_set_cascade_port (struct mv88e6xxx_chip * chip , int port );
258259
260+ int mv88e6xxx_g1_set_device_number (struct mv88e6xxx_chip * chip , int index );
261+
259262int mv88e6xxx_g1_atu_set_learn2all (struct mv88e6xxx_chip * chip , bool learn2all );
260263int mv88e6xxx_g1_atu_set_age_time (struct mv88e6xxx_chip * chip ,
261264 unsigned int msecs );
You can’t perform that action at this time.
0 commit comments