]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: mdio: aspeed: move reg accessing part into separate functions
authorPotin Lai <potin.lai@quantatw.com>
Thu, 7 Apr 2022 01:17:36 +0000 (09:17 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jan 2026 12:11:53 +0000 (13:11 +0100)
commit692ead5233ff1a144f88f2d7689e410a32580b7a
tree6dd746f6e0c58d73e78b55e3315f34f8c8db9beb
parent18202537856e0fae079fed2c9308780bcff2bb9d
net: mdio: aspeed: move reg accessing part into separate functions

[ Upstream commit 737ca352569e744bf753b4522a6f91b120a734f1 ]

Add aspeed_mdio_op() and aseed_mdio_get_data() for register accessing.

aspeed_mdio_op() handles operations, write command to control register,
then check and wait operations is finished (bit 31 is cleared).

aseed_mdio_get_data() fetchs the result value of operation from data
register.

Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: d1a1a4bade4b ("net: mdio: aspeed: add dummy read to avoid read-after-write issue")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/mdio/mdio-aspeed.c