]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: renesas: rswitch: use generic MPSM operation for mdio C45
authorNikita Yushchenko <nikita.yoush@cogentembedded.com>
Mon, 16 Dec 2024 07:19:56 +0000 (12:19 +0500)
committerJakub Kicinski <kuba@kernel.org>
Thu, 19 Dec 2024 03:32:05 +0000 (19:32 -0800)
commit2aa722b6d81c3118d33dcb8eea9aac49f56af790
treee4aa50014308ef64e5c95fa061e0a93b34da07d1
parent1ced1b8cacf396d6ff979f594ba40ace42087797
net: renesas: rswitch: use generic MPSM operation for mdio C45

Introduce rswitch_etha_mpsm_op() that accepts values for MPSM register
fields and executes the transaction.

This avoids some code duptication, and can be used both for C45 and C22.

Convert C45 read and write operations to use that.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://patch.msgid.link/20241216071957.2587354-5-nikita.yoush@cogentembedded.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/renesas/rswitch.c
drivers/net/ethernet/renesas/rswitch.h