All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Simon Horman <horms@verge.net.au>,
	Magnus Damm <magnus.damm@gmail.com>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Kevin Hilman <khilman@kernel.org>,
	Ulf Hansson <ulf.hansson@linaro.org>
Cc: "Sergei Shtylyov" <sergei.shtylyov@cogentembedded.com>,
	"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
	linux-clk@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-pm@vger.kernel.org,
	"Geert Uytterhoeven" <geert+renesas@glider.be>
Subject: [PATCH 09/10] [RFC] ravb: Remove obsolete explicit clock handling for WoL
Date: Mon, 16 Oct 2017 15:55:15 +0200	[thread overview]
Message-ID: <1508162116-5043-10-git-send-email-geert+renesas@glider.be> (raw)
In-Reply-To: <1508162116-5043-1-git-send-email-geert+renesas@glider.be>

Currently, if Wake-on-LAN is enabled, the EtherAVB device's module clock
is manually kept running during system suspend, to make sure the device
stays active.

Since "soc: renesas: rcar-sysc: Keep wakeup sources active during system
suspend", this workaround is no longer needed.  Hence remove all
explicit clock handling to keep the device active.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
This must not be applied before the dependency has landed upstream,
hence the "RFC"!
---
 drivers/net/ethernet/renesas/ravb_main.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index fdf30bfa403bf416..11ffccca11d56df5 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -2218,9 +2218,6 @@ static int ravb_wol_setup(struct net_device *ndev)
 	/* Enable MagicPacket */
 	ravb_modify(ndev, ECMR, ECMR_MPDE, ECMR_MPDE);
 
-	/* Increased clock usage so device won't be suspended */
-	clk_enable(priv->clk);
-
 	return enable_irq_wake(priv->emac_irq);
 }
 
@@ -2239,9 +2236,6 @@ static int ravb_wol_restore(struct net_device *ndev)
 	if (ret < 0)
 		return ret;
 
-	/* Restore clock usage count */
-	clk_disable(priv->clk);
-
 	return disable_irq_wake(priv->emac_irq);
 }
 
@@ -2289,8 +2283,6 @@ static int __maybe_unused ravb_resume(struct device *dev)
 		 *       this clock dance should be removed.
 		 */
 		clk_disable(priv->clk);
-		clk_disable(priv->clk);
-		clk_enable(priv->clk);
 		clk_enable(priv->clk);
 
 		/* Set reset mode to rearm the WoL logic */
-- 
2.7.4

  parent reply	other threads:[~2017-10-16 13:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-16 13:55 [PATCH 00/10] PM / Domain: renesas: Fix active wakeup behavior Geert Uytterhoeven
2017-10-16 13:55 ` [PATCH 01/10] clk: renesas: mstp: Keep wakeup sources active during system suspend Geert Uytterhoeven
2017-10-16 13:55 ` [PATCH 02/10] clk: renesas: cpg-mssr: " Geert Uytterhoeven
2017-10-16 13:55 ` [PATCH 03/10] soc: renesas: rcar-sysc: " Geert Uytterhoeven
2017-10-16 13:55 ` [PATCH 04/10] PM / Domain: Allow genpd users to specify default active wakeup behavior Geert Uytterhoeven
2017-10-16 13:55 ` [PATCH 05/10] [RFC] ARM: shmobile: pm-rmobile: Use GENPD_FLAG_ACTIVE_WAKEUP Geert Uytterhoeven
2017-10-16 13:55 ` [PATCH 06/10] [RFC] clk: renesas: mstp: " Geert Uytterhoeven
2017-10-16 13:55 ` [PATCH 07/10] [RFC] clk: renesas: cpg-mssr: " Geert Uytterhoeven
2017-10-16 13:55 ` [PATCH 08/10] [RFC] soc: renesas: rcar-sysc: " Geert Uytterhoeven
2017-10-16 13:55 ` Geert Uytterhoeven [this message]
2017-10-16 15:14   ` [PATCH 09/10] [RFC] ravb: Remove obsolete explicit clock handling for WoL Niklas Söderlund
2017-10-16 15:14     ` Niklas Söderlund
2017-10-16 20:17   ` Sergei Shtylyov
2017-10-17  7:10     ` Geert Uytterhoeven
2017-10-16 13:55 ` [PATCH 10/10] [RFC] sh_eth: " Geert Uytterhoeven
2017-10-16 15:15   ` Niklas Söderlund
2017-10-16 15:15     ` Niklas Söderlund
2017-10-16 19:24   ` Sergei Shtylyov
2017-10-25 20:49 ` [PATCH 00/10] PM / Domain: renesas: Fix active wakeup behavior Ulf Hansson
2017-10-25 21:39   ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1508162116-5043-10-git-send-email-geert+renesas@glider.be \
    --to=geert+renesas@glider.be \
    --cc=horms@verge.net.au \
    --cc=khilman@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=rjw@rjwysocki.net \
    --cc=sboyd@codeaurora.org \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.