Re: [PATCH v2 3/3] soc: renesas: rcar-sysc: Keep wakeup sources active during system suspend
On Wed, Dec 20, 2017 at 11:28:43AM +0100, Geert Uytterhoeven wrote: > Hi Simon, > > On Wed, Dec 20, 2017 at 11:23 AM, Simon Horman wrote: > > On Mon, Dec 18, 2017 at 12:22:17PM +0100, Geert Uytterhoeven wrote: > >> On Thu, Dec 14, 2017 at 3:11 PM, Ulf Hansson > >> wrote: > >> > On 9 November 2017 at 14:27, Geert Uytterhoeven > >> > wrote: > >> >> 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 > >> > > >> > Reviewed-by: Ulf Hansson > >> > >> Thank you! > >> > >> Simon: can you please queue this up for v4.16? > >> I have queued the other 2 clock patches in clk-renesas-for-v4.16, and sent > >> a PR for it. > > > > Thanks, I have applied this patch to the soc-for-v4.16 branch. > > It is currently not based v4.15-rc1. Let me know if it should > > be rebased on top of your pull request for clk-renesas-for-v4.16. > > If the base is not v4.15-rc1, what is it? GENPD_FLAG_ACTIVE_WAKEUP was > introduced in v4.15-rc1, so it won't compile based on v4.14. Sorry, I typed my message incorrectly. The base _is_ v4.15-rc1. > There's no dependency on the clock drivers, so no need to base on > top of clk-renesas-for-v4.16. Thanks, got it.
Re: [PATCH v2 3/3] soc: renesas: rcar-sysc: Keep wakeup sources active during system suspend
Hi Simon, On Wed, Dec 20, 2017 at 11:23 AM, Simon Horman wrote: > On Mon, Dec 18, 2017 at 12:22:17PM +0100, Geert Uytterhoeven wrote: >> On Thu, Dec 14, 2017 at 3:11 PM, Ulf Hansson wrote: >> > On 9 November 2017 at 14:27, Geert Uytterhoeven >> > wrote: >> >> 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 >> > >> > Reviewed-by: Ulf Hansson >> >> Thank you! >> >> Simon: can you please queue this up for v4.16? >> I have queued the other 2 clock patches in clk-renesas-for-v4.16, and sent >> a PR for it. > > Thanks, I have applied this patch to the soc-for-v4.16 branch. > It is currently not based v4.15-rc1. Let me know if it should > be rebased on top of your pull request for clk-renesas-for-v4.16. If the base is not v4.15-rc1, what is it? GENPD_FLAG_ACTIVE_WAKEUP was introduced in v4.15-rc1, so it won't compile based on v4.14. There's no dependency on the clock drivers, so no need to base on top of clk-renesas-for-v4.16. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [PATCH v2 3/3] soc: renesas: rcar-sysc: Keep wakeup sources active during system suspend
On Mon, Dec 18, 2017 at 12:22:17PM +0100, Geert Uytterhoeven wrote: > On Thu, Dec 14, 2017 at 3:11 PM, Ulf Hansson wrote: > > On 9 November 2017 at 14:27, Geert Uytterhoeven > > wrote: > >> 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 > > > > Reviewed-by: Ulf Hansson > > Thank you! > > Simon: can you please queue this up for v4.16? > I have queued the other 2 clock patches in clk-renesas-for-v4.16, and sent > a PR for it. Thanks, I have applied this patch to the soc-for-v4.16 branch. It is currently not based v4.15-rc1. Let me know if it should be rebased on top of your pull request for clk-renesas-for-v4.16.
Re: [PATCH v2 3/3] soc: renesas: rcar-sysc: Keep wakeup sources active during system suspend
On Thu, Dec 14, 2017 at 3:11 PM, Ulf Hansson wrote: > On 9 November 2017 at 14:27, Geert Uytterhoeven > wrote: >> 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 > > Reviewed-by: Ulf Hansson Thank you! Simon: can you please queue this up for v4.16? I have queued the other 2 clock patches in clk-renesas-for-v4.16, and sent a PR for it. Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [PATCH v2 3/3] soc: renesas: rcar-sysc: Keep wakeup sources active during system suspend
On 9 November 2017 at 14:27, Geert Uytterhoeven wrote: > 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 Reviewed-by: Ulf Hansson Kind regards Uffe > --- > v2: > - Integrate "soc: renesas: rcar-sysc: Use GENPD_FLAG_ACTIVE_WAKEUP", > --- > 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 c8406e81640f6560..ac4df1c43b2fbdbe 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.7.4 >
[PATCH v2 3/3] soc: renesas: rcar-sysc: Keep wakeup sources active during system suspend
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 --- v2: - Integrate "soc: renesas: rcar-sysc: Use GENPD_FLAG_ACTIVE_WAKEUP", --- 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 c8406e81640f6560..ac4df1c43b2fbdbe 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.7.4