Lines Matching +full:port +full:- +full:mapping
1 // SPDX-License-Identifier: GPL-2.0-or-later
7 * Copyright (c) 2016-2017 Savoir-faire Linux Inc.
18 int addr = chip->info->global1_addr; in mv88e6xxx_g1_read()
25 int addr = chip->info->global1_addr; in mv88e6xxx_g1_write()
33 return mv88e6xxx_wait_bit(chip, chip->info->global1_addr, reg, in mv88e6xxx_g1_wait_bit()
40 return mv88e6xxx_wait_mask(chip, chip->info->global1_addr, reg, in mv88e6xxx_g1_wait_mask()
98 /* Returns 0 when done, -EBUSY when waiting, other negative codes on error */
106 dev_err(chip->dev, "Error reading status"); in mv88e6xxx_g1_is_eeprom_done()
116 return -EBUSY; in mv88e6xxx_g1_is_eeprom_done()
135 if (ret != -EBUSY) in mv88e6xxx_g1_wait_eeprom_done()
139 dev_err(chip->dev, "Timeout waiting for EEPROM done"); in mv88e6xxx_g1_wait_eeprom_done()
140 return -ETIMEDOUT; in mv88e6xxx_g1_wait_eeprom_done()
148 if (ret != -EBUSY) in mv88e6250_g1_wait_eeprom_done_prereset()
151 /* Pre-reset, we don't know the state of the switch - when in mv88e6250_g1_wait_eeprom_done_prereset()
152 * mv88e6xxx_g1_is_eeprom_done() returns -EBUSY, that may be because in mv88e6250_g1_wait_eeprom_done_prereset()
202 * the PPU, including re-doing PHY detection and initialization in mv88e6185_g1_reset()
307 /* Offset 0x10: IP-PRI Mapping Register 0
308 * Offset 0x11: IP-PRI Mapping Register 1
309 * Offset 0x12: IP-PRI Mapping Register 2
310 * Offset 0x13: IP-PRI Mapping Register 3
311 * Offset 0x14: IP-PRI Mapping Register 4
312 * Offset 0x15: IP-PRI Mapping Register 5
313 * Offset 0x16: IP-PRI Mapping Register 6
314 * Offset 0x17: IP-PRI Mapping Register 7
357 /* Offset 0x18: IEEE-PRI Register */
376 int port) in mv88e6095_g1_set_egress_port() argument
388 reg |= port << in mv88e6095_g1_set_egress_port()
393 reg |= port << in mv88e6095_g1_set_egress_port()
397 return -EINVAL; in mv88e6095_g1_set_egress_port()
407 int mv88e6095_g1_set_cpu_port(struct mv88e6xxx_chip *chip, int port) in mv88e6095_g1_set_cpu_port() argument
417 reg |= port << __bf_shf(MV88E6185_G1_MONITOR_CTL_ARP_DEST_MASK); in mv88e6095_g1_set_cpu_port()
434 int port) in mv88e6390_g1_set_egress_port() argument
446 return -EINVAL; in mv88e6390_g1_set_egress_port()
449 return mv88e6390_g1_monitor_write(chip, ptr, port); in mv88e6390_g1_set_egress_port()
452 int mv88e6390_g1_set_cpu_port(struct mv88e6xxx_chip *chip, int port) in mv88e6390_g1_set_cpu_port() argument
459 port |= MV88E6390_G1_MONITOR_MGMT_CTL_PTR_CPU_DEST_MGMTPRI; in mv88e6390_g1_set_cpu_port()
461 return mv88e6390_g1_monitor_write(chip, ptr, port); in mv88e6390_g1_set_cpu_port()
464 int mv88e6390_g1_set_ptp_cpu_port(struct mv88e6xxx_chip *chip, int port) in mv88e6390_g1_set_ptp_cpu_port() argument
471 port |= MV88E6390_G1_MONITOR_MGMT_CTL_PTR_CPU_DEST_MGMTPRI; in mv88e6390_g1_set_ptp_cpu_port()
473 return mv88e6390_g1_monitor_write(chip, ptr, port); in mv88e6390_g1_set_ptp_cpu_port()
481 /* 01:80:c2:00:00:00-01:80:c2:00:00:07 are Management */ in mv88e6390_g1_mgmt_rsvd2cpu()
487 /* 01:80:c2:00:00:08-01:80:c2:00:00:0f are Management */ in mv88e6390_g1_mgmt_rsvd2cpu()
493 /* 01:80:c2:00:00:20-01:80:c2:00:00:27 are Management */ in mv88e6390_g1_mgmt_rsvd2cpu()
499 /* 01:80:c2:00:00:28-01:80:c2:00:00:2f are Management */ in mv88e6390_g1_mgmt_rsvd2cpu()
526 int mv88e6185_g1_set_cascade_port(struct mv88e6xxx_chip *chip, int port) in mv88e6185_g1_set_cascade_port() argument
530 return mv88e6xxx_g1_ctl2_mask(chip, mask, port << __bf_shf(mask)); in mv88e6185_g1_set_cascade_port()
589 int mv88e6xxx_g1_stats_snapshot(struct mv88e6xxx_chip *chip, int port) in mv88e6xxx_g1_stats_snapshot() argument
593 /* Snapshot the hardware statistics counters for this port. */ in mv88e6xxx_g1_stats_snapshot()
597 MV88E6XXX_G1_STATS_OP_HIST_RX | port); in mv88e6xxx_g1_stats_snapshot()
605 int mv88e6320_g1_stats_snapshot(struct mv88e6xxx_chip *chip, int port) in mv88e6320_g1_stats_snapshot() argument
607 port = (port + 1) << 5; in mv88e6320_g1_stats_snapshot()
609 return mv88e6xxx_g1_stats_snapshot(chip, port); in mv88e6320_g1_stats_snapshot()
612 int mv88e6390_g1_stats_snapshot(struct mv88e6xxx_chip *chip, int port) in mv88e6390_g1_stats_snapshot() argument
616 port = (port + 1) << 5; in mv88e6390_g1_stats_snapshot()
618 /* Snapshot the hardware statistics counters for this port. */ in mv88e6390_g1_stats_snapshot()
621 MV88E6XXX_G1_STATS_OP_CAPTURE_PORT | port); in mv88e6390_g1_stats_snapshot()