mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/4] mv88e6xxx: Cache scratch config3 of 6352
@ 2026-05-21 20:29 Fidan Aliyeva
  2026-05-21 20:29 ` [PATCH net-next v2 1/4] mv88e6xxx: Add mv88e6352_reset for 6352 family Fidan Aliyeva
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Fidan Aliyeva @ 2026-05-21 20:29 UTC (permalink / raw)
  To: andrew, olteanv, davem, edumazet, kuba, pabeni, marek.behun
  Cc: netdev, linux-kernel, fidan.aliyeva.ext

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-05-26 10:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-21 20:29 [PATCH net-next v2 0/4] mv88e6xxx: Cache scratch config3 of 6352 Fidan Aliyeva
2026-05-21 20:29 ` [PATCH net-next v2 1/4] mv88e6xxx: Add mv88e6352_reset for 6352 family Fidan Aliyeva
2026-05-21 20:29 ` [PATCH net-next v2 2/4] mv88e6xxx: Cache scratch config3 of 6352 Fidan Aliyeva
2026-05-21 20:29 ` [PATCH net-next v2 3/4] mv88e6xxx: Use cached config3 in 6352 has_serdes Fidan Aliyeva
2026-05-21 20:29 ` [PATCH net-next v2 4/4] mv88e6xxx: Remove locks for 6352's has_serdes Fidan Aliyeva
2026-05-26 10:20 ` [PATCH net-next v2 0/4] mv88e6xxx: Cache scratch config3 of 6352 patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®