From: Simon Horman <horms+renesas@verge.net.au> To: linux-renesas-soc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Magnus Damm <magnus.damm@gmail.com>, Geert Uytterhoeven <geert+renesas@glider.be>, Simon Horman <horms+renesas@verge.net.au> Subject: [PATCH 1/1] soc: renesas: rcar-sysc: Keep wakeup sources active during system suspend Date: Fri, 22 Dec 2017 11:30:38 +0100 [thread overview] Message-ID: <91c719f5ec6671f7b63762d78897af5583dd7693.1513936182.git.horms+renesas@verge.net.au> (raw) In-Reply-To: <cover.1513936182.git.horms+renesas@verge.net.au> From: Geert Uytterhoeven <geert+renesas@glider.be> If an R-Car SYSC slave device is part of the CPG/MSTP or CPG/MSSR Clock Domain and to be used as a wakeup source, it must be kept active during system suspend. Currently this is handled in device-specific drivers by explicitly increasing the use count of the module clock when the device is configured as a wakeup source. However, the proper way to prevent the device from being stopped is to inform this requirement to the genpd core, by setting the GENPD_FLAG_ACTIVE_WAKEUP flag. Note that this will only affect devices configured as wakeup sources. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- drivers/soc/renesas/rcar-sysc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/renesas/rcar-sysc.c b/drivers/soc/renesas/rcar-sysc.c index 55a47e509e49..52c25a5e2646 100644 --- a/drivers/soc/renesas/rcar-sysc.c +++ b/drivers/soc/renesas/rcar-sysc.c @@ -224,7 +224,7 @@ static void __init rcar_sysc_pd_setup(struct rcar_sysc_pd *pd) if (!(pd->flags & (PD_CPU | PD_SCU))) { /* Enable Clock Domain for I/O devices */ - genpd->flags |= GENPD_FLAG_PM_CLK; + genpd->flags |= GENPD_FLAG_PM_CLK | GENPD_FLAG_ACTIVE_WAKEUP; if (has_cpg_mstp) { genpd->attach_dev = cpg_mstp_attach_dev; genpd->detach_dev = cpg_mstp_detach_dev; -- 2.11.0
WARNING: multiple messages have this Message-ID (diff)
From: horms+renesas@verge.net.au (Simon Horman) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/1] soc: renesas: rcar-sysc: Keep wakeup sources active during system suspend Date: Fri, 22 Dec 2017 11:30:38 +0100 [thread overview] Message-ID: <91c719f5ec6671f7b63762d78897af5583dd7693.1513936182.git.horms+renesas@verge.net.au> (raw) In-Reply-To: <cover.1513936182.git.horms+renesas@verge.net.au> From: Geert Uytterhoeven <geert+renesas@glider.be> If an R-Car SYSC slave device is part of the CPG/MSTP or CPG/MSSR Clock Domain and to be used as a wakeup source, it must be kept active during system suspend. Currently this is handled in device-specific drivers by explicitly increasing the use count of the module clock when the device is configured as a wakeup source. However, the proper way to prevent the device from being stopped is to inform this requirement to the genpd core, by setting the GENPD_FLAG_ACTIVE_WAKEUP flag. Note that this will only affect devices configured as wakeup sources. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- drivers/soc/renesas/rcar-sysc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/renesas/rcar-sysc.c b/drivers/soc/renesas/rcar-sysc.c index 55a47e509e49..52c25a5e2646 100644 --- a/drivers/soc/renesas/rcar-sysc.c +++ b/drivers/soc/renesas/rcar-sysc.c @@ -224,7 +224,7 @@ static void __init rcar_sysc_pd_setup(struct rcar_sysc_pd *pd) if (!(pd->flags & (PD_CPU | PD_SCU))) { /* Enable Clock Domain for I/O devices */ - genpd->flags |= GENPD_FLAG_PM_CLK; + genpd->flags |= GENPD_FLAG_PM_CLK | GENPD_FLAG_ACTIVE_WAKEUP; if (has_cpg_mstp) { genpd->attach_dev = cpg_mstp_attach_dev; genpd->detach_dev = cpg_mstp_detach_dev; -- 2.11.0
next prev parent reply other threads:[~2017-12-22 10:31 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-12-22 10:30 [GIT PULL] Second Round of Renesas ARM Based SoC Updates for v4.16 Simon Horman 2017-12-22 10:30 ` Simon Horman 2017-12-22 10:30 ` Simon Horman [this message] 2017-12-22 10:30 ` [PATCH 1/1] soc: renesas: rcar-sysc: Keep wakeup sources active during system suspend Simon Horman 2018-01-05 6:52 ` [GIT PULL] Second Round of Renesas ARM Based SoC Updates for v4.16 Olof Johansson 2018-01-05 6:52 ` Olof Johansson
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=91c719f5ec6671f7b63762d78897af5583dd7693.1513936182.git.horms+renesas@verge.net.au \ --to=horms+renesas@verge.net.au \ --cc=geert+renesas@glider.be \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-renesas-soc@vger.kernel.org \ --cc=magnus.damm@gmail.com \ /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: linkBe 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.