net: stmmac: dwmac-meson8b: Make the clock enabling code re-usable
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Tue, 12 May 2020 21:11:02 +0000 (23:11 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 May 2020 19:23:14 +0000 (12:23 -0700)
commita54dc4a4904568fe2c6b2ba249dcc97612affebb
tree55f67715db4ff0a291f8d28bf5555e02b806c44f
parente4227bff804fc77e2f78c77470d3fbd2d4a6a8d0
net: stmmac: dwmac-meson8b: Make the clock enabling code re-usable

The timing adjustment clock will need similar logic as the RGMII clock:
It has to be enabled in the driver conditionally and when the driver is
unloaded it should be disabled again. Extract the existing code for the
RGMII clock into a new function so it can be re-used.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c