]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Apr 2022 11:20:52 +0000 (12:20 +0100)
commitce535841f7dacbc67fac40a3312657d0be7a99df
treebada66a52677c58fe49739d92a560f979ee37a24
parent6d8e6b77c0a63754e0041e311bb43619a6f864f3
net: mdio: aspeed: move reg accessing part into separate functions

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>
drivers/net/mdio/mdio-aspeed.c