Re: [PATCH net-next v2 3/7] net: bcmgenet: move clk_wol management to bcmgenet_wol
From: Florian Fainelli
Date: Wed Apr 29 2020 - 17:34:22 EST
On 4/29/20 1:02 PM, Doug Berger wrote:
> The GENET_POWER_WOL_MAGIC power up and power down code configures
> the device for WoL when suspending and disables the WoL logic when
> resuming. It makes sense that this code should also manage the WoL
> clocking.
>
> This commit consolidates the logic and moves it earlier in the
> resume sequence.
>
> Since the clock is now only enabled if WoL is successfully entered
> the wol_active flag is introduced to track that state to keep the
> clock enables and disables balanced in case a suspend is aborted.
> The MPD_EN hardware bit can't be used because it can be cleared
> when the MAC is reset by a deep sleep.
>
> Signed-off-by: Doug Berger <opendmb@xxxxxxxxx>
Acked-by: Florian Fainelli <f.fainelli@xxxxxxxxx>
--
Florian