Skip to content

Commit bc39315

Browse files
lunndavem330
authored andcommitted
net: dsa: mv88e6xxx: Add number of internal PHYs
Add to the info structure the number of internal PHYs, if they generate interrupts. Some of the older generations of switches have internal PHYs, but no interrupt registers. In this case, set the count to zero. Signed-off-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent adfccf1 commit bc39315

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

drivers/net/dsa/mv88e6xxx/chip.c

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3319,6 +3319,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
33193319
.name = "Marvell 88E6085",
33203320
.num_databases = 4096,
33213321
.num_ports = 10,
3322+
.num_internal_phys = 5,
33223323
.max_vid = 4095,
33233324
.port_base_addr = 0x10,
33243325
.global1_addr = 0x1b,
@@ -3339,6 +3340,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
33393340
.name = "Marvell 88E6095/88E6095F",
33403341
.num_databases = 256,
33413342
.num_ports = 11,
3343+
.num_internal_phys = 0,
33423344
.max_vid = 4095,
33433345
.port_base_addr = 0x10,
33443346
.global1_addr = 0x1b,
@@ -3357,6 +3359,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
33573359
.name = "Marvell 88E6097/88E6097F",
33583360
.num_databases = 4096,
33593361
.num_ports = 11,
3362+
.num_internal_phys = 8,
33603363
.max_vid = 4095,
33613364
.port_base_addr = 0x10,
33623365
.global1_addr = 0x1b,
@@ -3377,6 +3380,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
33773380
.name = "Marvell 88E6123",
33783381
.num_databases = 4096,
33793382
.num_ports = 3,
3383+
.num_internal_phys = 5,
33803384
.max_vid = 4095,
33813385
.port_base_addr = 0x10,
33823386
.global1_addr = 0x1b,
@@ -3397,6 +3401,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
33973401
.name = "Marvell 88E6131",
33983402
.num_databases = 256,
33993403
.num_ports = 8,
3404+
.num_internal_phys = 0,
34003405
.max_vid = 4095,
34013406
.port_base_addr = 0x10,
34023407
.global1_addr = 0x1b,
@@ -3415,6 +3420,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
34153420
.name = "Marvell 88E6341",
34163421
.num_databases = 4096,
34173422
.num_ports = 6,
3423+
.num_internal_phys = 5,
34183424
.num_gpio = 11,
34193425
.max_vid = 4095,
34203426
.port_base_addr = 0x10,
@@ -3436,6 +3442,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
34363442
.name = "Marvell 88E6161",
34373443
.num_databases = 4096,
34383444
.num_ports = 6,
3445+
.num_internal_phys = 5,
34393446
.max_vid = 4095,
34403447
.port_base_addr = 0x10,
34413448
.global1_addr = 0x1b,
@@ -3456,6 +3463,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
34563463
.name = "Marvell 88E6165",
34573464
.num_databases = 4096,
34583465
.num_ports = 6,
3466+
.num_internal_phys = 0,
34593467
.max_vid = 4095,
34603468
.port_base_addr = 0x10,
34613469
.global1_addr = 0x1b,
@@ -3476,6 +3484,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
34763484
.name = "Marvell 88E6171",
34773485
.num_databases = 4096,
34783486
.num_ports = 7,
3487+
.num_internal_phys = 5,
34793488
.max_vid = 4095,
34803489
.port_base_addr = 0x10,
34813490
.global1_addr = 0x1b,
@@ -3496,6 +3505,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
34963505
.name = "Marvell 88E6172",
34973506
.num_databases = 4096,
34983507
.num_ports = 7,
3508+
.num_internal_phys = 5,
34993509
.num_gpio = 15,
35003510
.max_vid = 4095,
35013511
.port_base_addr = 0x10,
@@ -3517,6 +3527,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
35173527
.name = "Marvell 88E6175",
35183528
.num_databases = 4096,
35193529
.num_ports = 7,
3530+
.num_internal_phys = 5,
35203531
.max_vid = 4095,
35213532
.port_base_addr = 0x10,
35223533
.global1_addr = 0x1b,
@@ -3537,6 +3548,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
35373548
.name = "Marvell 88E6176",
35383549
.num_databases = 4096,
35393550
.num_ports = 7,
3551+
.num_internal_phys = 5,
35403552
.num_gpio = 15,
35413553
.max_vid = 4095,
35423554
.port_base_addr = 0x10,
@@ -3558,6 +3570,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
35583570
.name = "Marvell 88E6185",
35593571
.num_databases = 256,
35603572
.num_ports = 10,
3573+
.num_internal_phys = 0,
35613574
.max_vid = 4095,
35623575
.port_base_addr = 0x10,
35633576
.global1_addr = 0x1b,
@@ -3576,6 +3589,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
35763589
.name = "Marvell 88E6190",
35773590
.num_databases = 4096,
35783591
.num_ports = 11, /* 10 + Z80 */
3592+
.num_internal_phys = 11,
35793593
.num_gpio = 16,
35803594
.max_vid = 8191,
35813595
.port_base_addr = 0x0,
@@ -3597,6 +3611,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
35973611
.name = "Marvell 88E6190X",
35983612
.num_databases = 4096,
35993613
.num_ports = 11, /* 10 + Z80 */
3614+
.num_internal_phys = 11,
36003615
.num_gpio = 16,
36013616
.max_vid = 8191,
36023617
.port_base_addr = 0x0,
@@ -3618,6 +3633,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
36183633
.name = "Marvell 88E6191",
36193634
.num_databases = 4096,
36203635
.num_ports = 11, /* 10 + Z80 */
3636+
.num_internal_phys = 11,
36213637
.max_vid = 8191,
36223638
.port_base_addr = 0x0,
36233639
.global1_addr = 0x1b,
@@ -3639,6 +3655,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
36393655
.name = "Marvell 88E6240",
36403656
.num_databases = 4096,
36413657
.num_ports = 7,
3658+
.num_internal_phys = 5,
36423659
.num_gpio = 15,
36433660
.max_vid = 4095,
36443661
.port_base_addr = 0x10,
@@ -3661,6 +3678,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
36613678
.name = "Marvell 88E6290",
36623679
.num_databases = 4096,
36633680
.num_ports = 11, /* 10 + Z80 */
3681+
.num_internal_phys = 11,
36643682
.num_gpio = 16,
36653683
.max_vid = 8191,
36663684
.port_base_addr = 0x0,
@@ -3683,13 +3701,15 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
36833701
.name = "Marvell 88E6320",
36843702
.num_databases = 4096,
36853703
.num_ports = 7,
3704+
.num_internal_phys = 5,
36863705
.num_gpio = 15,
36873706
.max_vid = 4095,
36883707
.port_base_addr = 0x10,
36893708
.global1_addr = 0x1b,
36903709
.global2_addr = 0x1c,
36913710
.age_time_coeff = 15000,
36923711
.g1_irqs = 8,
3712+
.g2_irqs = 10,
36933713
.atu_move_port_mask = 0xf,
36943714
.pvt = true,
36953715
.multi_chip = true,
@@ -3704,13 +3724,15 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
37043724
.name = "Marvell 88E6321",
37053725
.num_databases = 4096,
37063726
.num_ports = 7,
3727+
.num_internal_phys = 5,
37073728
.num_gpio = 15,
37083729
.max_vid = 4095,
37093730
.port_base_addr = 0x10,
37103731
.global1_addr = 0x1b,
37113732
.global2_addr = 0x1c,
37123733
.age_time_coeff = 15000,
37133734
.g1_irqs = 8,
3735+
.g2_irqs = 10,
37143736
.atu_move_port_mask = 0xf,
37153737
.multi_chip = true,
37163738
.tag_protocol = DSA_TAG_PROTO_EDSA,
@@ -3723,6 +3745,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
37233745
.family = MV88E6XXX_FAMILY_6341,
37243746
.name = "Marvell 88E6341",
37253747
.num_databases = 4096,
3748+
.num_internal_phys = 5,
37263749
.num_ports = 6,
37273750
.num_gpio = 11,
37283751
.max_vid = 4095,
@@ -3746,6 +3769,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
37463769
.name = "Marvell 88E6350",
37473770
.num_databases = 4096,
37483771
.num_ports = 7,
3772+
.num_internal_phys = 5,
37493773
.max_vid = 4095,
37503774
.port_base_addr = 0x10,
37513775
.global1_addr = 0x1b,
@@ -3766,6 +3790,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
37663790
.name = "Marvell 88E6351",
37673791
.num_databases = 4096,
37683792
.num_ports = 7,
3793+
.num_internal_phys = 5,
37693794
.max_vid = 4095,
37703795
.port_base_addr = 0x10,
37713796
.global1_addr = 0x1b,
@@ -3786,6 +3811,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
37863811
.name = "Marvell 88E6352",
37873812
.num_databases = 4096,
37883813
.num_ports = 7,
3814+
.num_internal_phys = 5,
37893815
.num_gpio = 15,
37903816
.max_vid = 4095,
37913817
.port_base_addr = 0x10,
@@ -3807,6 +3833,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
38073833
.name = "Marvell 88E6390",
38083834
.num_databases = 4096,
38093835
.num_ports = 11, /* 10 + Z80 */
3836+
.num_internal_phys = 11,
38103837
.num_gpio = 16,
38113838
.max_vid = 8191,
38123839
.port_base_addr = 0x0,
@@ -3828,6 +3855,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
38283855
.name = "Marvell 88E6390X",
38293856
.num_databases = 4096,
38303857
.num_ports = 11, /* 10 + Z80 */
3858+
.num_internal_phys = 11,
38313859
.num_gpio = 16,
38323860
.max_vid = 8191,
38333861
.port_base_addr = 0x0,

drivers/net/dsa/mv88e6xxx/chip.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ struct mv88e6xxx_info {
110110
const char *name;
111111
unsigned int num_databases;
112112
unsigned int num_ports;
113+
unsigned int num_internal_phys;
113114
unsigned int num_gpio;
114115
unsigned int max_vid;
115116
unsigned int port_base_addr;

0 commit comments

Comments
 (0)