net: stmmac: add clocks management for gmac driver
This patch intends to add clocks management for stmmac driver: If CONFIG_PM enabled: 1. Keep clocks disabled after driver probed. 2. Enable clocks when up the net device, and disable clocks when down the net device. If CONFIG_PM disabled: Keep clocks always enabled after driver probed. Note: 1. It is fine for ethtool, since the way of implementing ethtool_ops::begin in stmmac is only can be accessed when interface is enabled, so the clocks are ticked. 2. The MDIO bus has a different life cycle to the MAC, need ensure clocks are enabled when _mdio_read/write() need clocks, because these functions can be called while the interface it not opened. Reviewed-by:Andrew Lunn <andrew@lunn.ch> Signed-off-by:
Joakim Zhang <qiangqing.zhang@nxp.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
parent
91de5ac9
-
mentioned in commit 2d26f6e3
-
mentioned in commit 3afe11be
-
mentioned in commit bcf37522
-
mentioned in commit 483ed895
-
mentioned in commit ac4bb995
-
mentioned in commit 80407c6a
-
mentioned in commit a0958a53
-
mentioned in commit d8f574fb
-
mentioned in commit 6289b494
-
mentioned in commit 2967b081
-
mentioned in commit 5dc4be3b
-
mentioned in commit 5c23d6b7
-
mentioned in commit 02f3642d
-
mentioned in commit 47129531
Please register or sign in to comment