1
1
openwrt/target/linux/realtek
Markus Stockhausen 2d2f0fbc70 realtek: mdio: use regmap_bulk_write() in RTL838x path
The regmap conversion only replaced the old sw() macros with their
regmap counterparts. Neither access optimization nor error handling
took place. Redesign the mdio access as follows:

- The c22/c45/read/write functions only prepare a data structure
  that describes the to-be-executed command.
- rtmdio_xxxx_run_cmd() is enhanced to bulk write the data into the
  SoC, issue all the I/O and do proper error handling. Additionally
  the signature is changed to allow read & write operations.

The bulk commands introduce some subtle changes.

- Before this patch only the needed registers were written. After
  the conversion all phy control registers are set up.
- The register write order changes

This is no issue as the hardware starts operation when issuing the
run_cmd() and only accesses the needed registers per operation.

For now adapt only the RTL838x path. Where needed rename "err" to
"ret" for consistency with kernel conventions.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23092
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-05-01 12:14:50 +02:00
..
base-files realtek: rtl930x: add Hasivo S600WP-5GT-2SX-SE 2026-04-24 12:17:26 +02:00
dts realtek: rtl930x: mcx3: specify RTL8224 reset GPIO 2026-04-28 11:24:28 +02:00
files-6.18 realtek: mdio: use regmap_bulk_write() in RTL838x path 2026-05-01 12:14:50 +02:00
image realtek: rtl930x: add Hasivo S600WP-5GT-2SX-SE 2026-04-24 12:17:26 +02:00
patches-6.18 realtek: refresh patches 2026-05-01 10:46:39 +02:00
profiles target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00
rtl838x realtek: drop support for 6.12 2026-04-11 20:59:10 +02:00
rtl839x realtek: drop support for 6.12 2026-04-11 20:59:10 +02:00
rtl930x realtek: drop support for 6.12 2026-04-11 20:59:10 +02:00
rtl930x_nand realtek: drop support for 6.12 2026-04-11 20:59:10 +02:00
rtl931x realtek: add generic support for Zyxel XS1930 lineup 2026-04-20 11:13:06 +02:00
rtl931x_nand realtek: drop support for 6.12 2026-04-11 20:59:10 +02:00
Makefile realtek: switch to 6.18 2026-04-11 20:59:10 +02:00
modules.mk kernel: mfd: Add Hasivo STC8 mfd 2026-03-01 18:47:27 +01:00