]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: pcs: add SerDes register struct and use it
authorJonas Jelonek <jelonek.jonas@gmail.com>
Fri, 13 Feb 2026 22:05:32 +0000 (22:05 +0000)
committerRobert Marko <robimarko@gmail.com>
Mon, 16 Feb 2026 14:43:20 +0000 (15:43 +0100)
commitfb0bc84182ff44acd61701c6d7f685a1596dc133
tree9c525a84c0446db1c92eeacb4e6450bba5eef3cd
parent6c982c7db449648f4b9c6d5f0acf6c5fcd6f42e3
realtek: pcs: add SerDes register struct and use it

Slight differences between the variants of the Otto family are handled
so far handled using function indirection by defining per-variant
operations which are called from generic implementations. In several
case, this can still be optimized because the variants only differ in
some register addresses and/or bits while the procedure otherwise is
exactly the same.

To address this, add a new SerDes register struct where register fields
can be described and later used by generic implementations which otherwise
would need to be separate just because of slight differences. Add two
register fields for autonegotiation to that register struct which are
used by a successing patch to address a real issue.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22013
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c