Skip to content

Commit 7d5af56

Browse files
Rafał Miłeckikuba-moo
authored andcommitted
net: dsa: b53: Drop unused "cpu_port" field
It's set but never used anymore. Signed-off-by: Rafał Miłecki <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 3ff26b2 commit 7d5af56

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

drivers/net/dsa/b53/b53_common.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2300,7 +2300,6 @@ static const struct b53_chip_data b53_switch_chips[] = {
23002300
.arl_bins = 2,
23012301
.arl_buckets = 1024,
23022302
.imp_port = 5,
2303-
.cpu_port = B53_CPU_PORT_25,
23042303
.duplex_reg = B53_DUPLEX_STAT_FE,
23052304
},
23062305
{
@@ -2311,7 +2310,6 @@ static const struct b53_chip_data b53_switch_chips[] = {
23112310
.arl_bins = 2,
23122311
.arl_buckets = 1024,
23132312
.imp_port = 5,
2314-
.cpu_port = B53_CPU_PORT_25,
23152313
.duplex_reg = B53_DUPLEX_STAT_FE,
23162314
},
23172315
{
@@ -2322,7 +2320,6 @@ static const struct b53_chip_data b53_switch_chips[] = {
23222320
.arl_bins = 4,
23232321
.arl_buckets = 1024,
23242322
.imp_port = 8,
2325-
.cpu_port = B53_CPU_PORT,
23262323
.vta_regs = B53_VTA_REGS,
23272324
.duplex_reg = B53_DUPLEX_STAT_GE,
23282325
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2336,7 +2333,6 @@ static const struct b53_chip_data b53_switch_chips[] = {
23362333
.arl_bins = 4,
23372334
.arl_buckets = 1024,
23382335
.imp_port = 8,
2339-
.cpu_port = B53_CPU_PORT,
23402336
.vta_regs = B53_VTA_REGS,
23412337
.duplex_reg = B53_DUPLEX_STAT_GE,
23422338
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2350,7 +2346,6 @@ static const struct b53_chip_data b53_switch_chips[] = {
23502346
.arl_bins = 4,
23512347
.arl_buckets = 1024,
23522348
.imp_port = 8,
2353-
.cpu_port = B53_CPU_PORT,
23542349
.vta_regs = B53_VTA_REGS_9798,
23552350
.duplex_reg = B53_DUPLEX_STAT_GE,
23562351
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2364,7 +2359,6 @@ static const struct b53_chip_data b53_switch_chips[] = {
23642359
.arl_bins = 4,
23652360
.arl_buckets = 1024,
23662361
.imp_port = 8,
2367-
.cpu_port = B53_CPU_PORT,
23682362
.vta_regs = B53_VTA_REGS_9798,
23692363
.duplex_reg = B53_DUPLEX_STAT_GE,
23702364
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2379,7 +2373,6 @@ static const struct b53_chip_data b53_switch_chips[] = {
23792373
.arl_buckets = 1024,
23802374
.vta_regs = B53_VTA_REGS,
23812375
.imp_port = 8,
2382-
.cpu_port = B53_CPU_PORT,
23832376
.duplex_reg = B53_DUPLEX_STAT_GE,
23842377
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
23852378
.jumbo_size_reg = B53_JUMBO_MAX_SIZE,
@@ -2392,7 +2385,6 @@ static const struct b53_chip_data b53_switch_chips[] = {
23922385
.arl_bins = 4,
23932386
.arl_buckets = 1024,
23942387
.imp_port = 8,
2395-
.cpu_port = B53_CPU_PORT,
23962388
.vta_regs = B53_VTA_REGS,
23972389
.duplex_reg = B53_DUPLEX_STAT_GE,
23982390
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2406,7 +2398,6 @@ static const struct b53_chip_data b53_switch_chips[] = {
24062398
.arl_bins = 4,
24072399
.arl_buckets = 1024,
24082400
.imp_port = 8,
2409-
.cpu_port = B53_CPU_PORT,
24102401
.vta_regs = B53_VTA_REGS,
24112402
.duplex_reg = B53_DUPLEX_STAT_GE,
24122403
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2420,7 +2411,6 @@ static const struct b53_chip_data b53_switch_chips[] = {
24202411
.arl_bins = 4,
24212412
.arl_buckets = 1024,
24222413
.imp_port = 8,
2423-
.cpu_port = B53_CPU_PORT,
24242414
.vta_regs = B53_VTA_REGS_63XX,
24252415
.duplex_reg = B53_DUPLEX_STAT_63XX,
24262416
.jumbo_pm_reg = B53_JUMBO_PORT_MASK_63XX,
@@ -2434,7 +2424,6 @@ static const struct b53_chip_data b53_switch_chips[] = {
24342424
.arl_bins = 4,
24352425
.arl_buckets = 1024,
24362426
.imp_port = 8,
2437-
.cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
24382427
.vta_regs = B53_VTA_REGS,
24392428
.duplex_reg = B53_DUPLEX_STAT_GE,
24402429
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2448,7 +2437,6 @@ static const struct b53_chip_data b53_switch_chips[] = {
24482437
.arl_bins = 4,
24492438
.arl_buckets = 1024,
24502439
.imp_port = 8,
2451-
.cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
24522440
.vta_regs = B53_VTA_REGS,
24532441
.duplex_reg = B53_DUPLEX_STAT_GE,
24542442
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2462,7 +2450,6 @@ static const struct b53_chip_data b53_switch_chips[] = {
24622450
.arl_bins = 4,
24632451
.arl_buckets = 1024,
24642452
.imp_port = 8,
2465-
.cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
24662453
.vta_regs = B53_VTA_REGS,
24672454
.duplex_reg = B53_DUPLEX_STAT_GE,
24682455
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2476,7 +2463,6 @@ static const struct b53_chip_data b53_switch_chips[] = {
24762463
.arl_bins = 4,
24772464
.arl_buckets = 1024,
24782465
.imp_port = 8,
2479-
.cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
24802466
.vta_regs = B53_VTA_REGS,
24812467
.duplex_reg = B53_DUPLEX_STAT_GE,
24822468
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2490,7 +2476,6 @@ static const struct b53_chip_data b53_switch_chips[] = {
24902476
.arl_bins = 4,
24912477
.arl_buckets = 1024,
24922478
.imp_port = 8,
2493-
.cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
24942479
.vta_regs = B53_VTA_REGS,
24952480
.duplex_reg = B53_DUPLEX_STAT_GE,
24962481
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2504,7 +2489,6 @@ static const struct b53_chip_data b53_switch_chips[] = {
25042489
.arl_bins = 4,
25052490
.arl_buckets = 1024,
25062491
.imp_port = 8,
2507-
.cpu_port = B53_CPU_PORT,
25082492
.vta_regs = B53_VTA_REGS,
25092493
.duplex_reg = B53_DUPLEX_STAT_GE,
25102494
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2518,7 +2502,6 @@ static const struct b53_chip_data b53_switch_chips[] = {
25182502
.arl_bins = 4,
25192503
.arl_buckets = 1024,
25202504
.imp_port = 8,
2521-
.cpu_port = B53_CPU_PORT,
25222505
.vta_regs = B53_VTA_REGS,
25232506
.duplex_reg = B53_DUPLEX_STAT_GE,
25242507
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2533,7 +2516,6 @@ static const struct b53_chip_data b53_switch_chips[] = {
25332516
.arl_bins = 4,
25342517
.arl_buckets = 256,
25352518
.imp_port = 8,
2536-
.cpu_port = 8, /* TODO: ports 4, 5, 8 */
25372519
.vta_regs = B53_VTA_REGS,
25382520
.duplex_reg = B53_DUPLEX_STAT_GE,
25392521
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2547,7 +2529,6 @@ static const struct b53_chip_data b53_switch_chips[] = {
25472529
.arl_bins = 4,
25482530
.arl_buckets = 1024,
25492531
.imp_port = 8,
2550-
.cpu_port = B53_CPU_PORT,
25512532
.vta_regs = B53_VTA_REGS,
25522533
.duplex_reg = B53_DUPLEX_STAT_GE,
25532534
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2561,7 +2542,6 @@ static const struct b53_chip_data b53_switch_chips[] = {
25612542
.arl_bins = 4,
25622543
.arl_buckets = 256,
25632544
.imp_port = 8,
2564-
.cpu_port = B53_CPU_PORT,
25652545
.vta_regs = B53_VTA_REGS,
25662546
.duplex_reg = B53_DUPLEX_STAT_GE,
25672547
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
@@ -2587,7 +2567,6 @@ static int b53_switch_init(struct b53_device *dev)
25872567
dev->vta_regs[2] = chip->vta_regs[2];
25882568
dev->jumbo_pm_reg = chip->jumbo_pm_reg;
25892569
dev->imp_port = chip->imp_port;
2590-
dev->cpu_port = chip->cpu_port;
25912570
dev->num_vlans = chip->vlans;
25922571
dev->num_arl_bins = chip->arl_bins;
25932572
dev->num_arl_buckets = chip->arl_buckets;
@@ -2619,13 +2598,6 @@ static int b53_switch_init(struct b53_device *dev)
26192598
break;
26202599
#endif
26212600
}
2622-
} else if (dev->chip_id == BCM53115_DEVICE_ID) {
2623-
u64 strap_value;
2624-
2625-
b53_read48(dev, B53_STAT_PAGE, B53_STRAP_VALUE, &strap_value);
2626-
/* use second IMP port if GMII is enabled */
2627-
if (strap_value & SV_GMII_CTRL_115)
2628-
dev->cpu_port = 5;
26292601
}
26302602

26312603
dev->num_ports = fls(dev->enabled_ports);

drivers/net/dsa/b53/b53_priv.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ struct b53_device {
124124
/* used ports mask */
125125
u16 enabled_ports;
126126
unsigned int imp_port;
127-
unsigned int cpu_port;
128127

129128
/* connect specific data */
130129
u8 current_page;

0 commit comments

Comments
 (0)