[PATCH net-next v2 0/4] mv88e6xxx: Cache scratch config3 of 6352

Fidan Aliyeva posted 4 patches 2 days, 22 hours ago
drivers/net/dsa/mv88e6xxx/chip.c            | 25 ++++++++++----
drivers/net/dsa/mv88e6xxx/chip.h            |  3 ++
drivers/net/dsa/mv88e6xxx/global2.h         |  1 +
drivers/net/dsa/mv88e6xxx/global2_scratch.c | 38 ++++++++++++++++-----
drivers/net/dsa/mv88e6xxx/pcs-6352.c        |  2 --
drivers/net/dsa/mv88e6xxx/serdes.c          |  2 --
6 files changed, 51 insertions(+), 20 deletions(-)
[PATCH net-next v2 0/4] mv88e6xxx: Cache scratch config3 of 6352
Posted by Fidan Aliyeva 2 days, 22 hours ago
In mv88e6352 scratch register in Global Control 2 set of registers
returns which port is attached to SERDES. This value is a pin
strapping value and is set after the switch is released from reset.
Thus, it can be cached during chip setup instead of reading the
register everytime when SERDES check is needed.

The series consist of 4 parts:
1. Add new mv88e6352_reset function as ops->reset
2. Cache the register value in this reset function
3. Refactor mv88e6352_g2_scratch_port_has_serdes to use the cached
value.
4. Remove the locks surrounding mv88e6352_g2_scratch_port_has_serdes.

---
v2 changes:
  - Fix the documentation of the return value for the new function
  mv88e6352_g2_cache_global_scratch_config3
as addressed by Jakub Kicinski

v1 link:
https://lore.kernel.org/netdev/20260515223707.1026325-1-fidan.aliyeva.ext@ericsson.com/

Changes after RFC:
  - Separate the patch into 4 different patches
  - Move caching step into chip->info->ops->reset function
as suggested by Andrew.

RFC link:
https://lore.kernel.org/netdev/20260510213429.2044612-1-fidan.aliyeva.ext@ericsson.com/

---
Fidan Aliyeva (4):
  mv88e6xxx: Add mv88e6352_reset for 6352 family
  mv88e6xxx: Cache scratch config3 of 6352
  mv88e6xxx: Use cached config3 in 6352 has_serdes
  mv88e6xxx: Remove locks for 6352's has_serdes

 drivers/net/dsa/mv88e6xxx/chip.c            | 25 ++++++++++----
 drivers/net/dsa/mv88e6xxx/chip.h            |  3 ++
 drivers/net/dsa/mv88e6xxx/global2.h         |  1 +
 drivers/net/dsa/mv88e6xxx/global2_scratch.c | 38 ++++++++++++++++-----
 drivers/net/dsa/mv88e6xxx/pcs-6352.c        |  2 --
 drivers/net/dsa/mv88e6xxx/serdes.c          |  2 --
 6 files changed, 51 insertions(+), 20 deletions(-)

--
2.36.0