linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] Renesas ARM Based SoC R-Car SYSC Updates for v4.13
@ 2017-06-16 13:31 Simon Horman
  2017-06-16 13:31 ` [PATCH] soc: renesas: rcar-sysc: Use GENPD_FLAG_ALWAYS_ON Simon Horman
  2017-06-19  5:51 ` [GIT PULL] Renesas ARM Based SoC R-Car SYSC Updates for v4.13 Olof Johansson
  0 siblings, 2 replies; 3+ messages in thread
From: Simon Horman @ 2017-06-16 13:31 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Olof, Hi Kevin, Hi Arnd,

Please consider these Renesas ARM based SoC R-Car SYSC updates for v4.13.

This has been separated out from the pull request
"[GIT PULL] Renesas ARM Based SoC Drivers Updates for v4.13"
due to differing dependencies. It seems cleanest to provide separate
branchs rather than do a merge to create a common base for a single branch.


The following changes since commit 2ea659a9ef488125eb46da6eb571de5eae5c43f6:

  Linux 4.12-rc1 (2017-05-13 13:19:49 -0700)

are available in the git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-rcar-sysc-for-v4.13

for you to fetch changes up to 980532a5dda319eeafadc5c590376626ad178f4f:

  soc: renesas: rcar-sysc: Use GENPD_FLAG_ALWAYS_ON (2017-06-15 21:10:41 +0200)

----------------------------------------------------------------
Renesas ARM Based SoC R-Car SYSC Updates for v4.13

Use GENPD_FLAG_ALWAYS_ON in R-Car SYSC driver

----------------------------------------------------------------
Geert Uytterhoeven (1):
      soc: renesas: rcar-sysc: Use GENPD_FLAG_ALWAYS_ON

 drivers/soc/renesas/rcar-sysc.c | 28 ++++------------------------
 drivers/soc/renesas/rcar-sysc.h |  2 --
 2 files changed, 4 insertions(+), 26 deletions(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] soc: renesas: rcar-sysc: Use GENPD_FLAG_ALWAYS_ON
  2017-06-16 13:31 [GIT PULL] Renesas ARM Based SoC R-Car SYSC Updates for v4.13 Simon Horman
@ 2017-06-16 13:31 ` Simon Horman
  2017-06-19  5:51 ` [GIT PULL] Renesas ARM Based SoC R-Car SYSC Updates for v4.13 Olof Johansson
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2017-06-16 13:31 UTC (permalink / raw)
  To: linux-arm-kernel

From: Geert Uytterhoeven <geert+renesas@glider.be>

Improve handling of always-on PM domains by using the
GENPD_FLAG_ALWAYS_ON flag introduced in commit ffaa42e8a40b7f10 ("PM /
Domains: Enable users of genpd to specify always on PM domains").

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 | 28 ++++------------------------
 drivers/soc/renesas/rcar-sysc.h |  2 --
 2 files changed, 4 insertions(+), 26 deletions(-)

diff --git a/drivers/soc/renesas/rcar-sysc.c b/drivers/soc/renesas/rcar-sysc.c
index 528a13742aeb..d86bc6c84ea4 100644
--- a/drivers/soc/renesas/rcar-sysc.c
+++ b/drivers/soc/renesas/rcar-sysc.c
@@ -181,17 +181,6 @@ static int rcar_sysc_pd_power_off(struct generic_pm_domain *genpd)
 	struct rcar_sysc_pd *pd = to_rcar_pd(genpd);
 
 	pr_debug("%s: %s\n", __func__, genpd->name);
-
-	if (pd->flags & PD_NO_CR) {
-		pr_debug("%s: Cannot control %s\n", __func__, genpd->name);
-		return -EBUSY;
-	}
-
-	if (pd->flags & PD_BUSY) {
-		pr_debug("%s: %s busy\n", __func__, genpd->name);
-		return -EBUSY;
-	}
-
 	return rcar_sysc_power_down(&pd->ch);
 }
 
@@ -200,12 +189,6 @@ static int rcar_sysc_pd_power_on(struct generic_pm_domain *genpd)
 	struct rcar_sysc_pd *pd = to_rcar_pd(genpd);
 
 	pr_debug("%s: %s\n", __func__, genpd->name);
-
-	if (pd->flags & PD_NO_CR) {
-		pr_debug("%s: Cannot control %s\n", __func__, genpd->name);
-		return 0;
-	}
-
 	return rcar_sysc_power_up(&pd->ch);
 }
 
@@ -223,8 +206,7 @@ static void __init rcar_sysc_pd_setup(struct rcar_sysc_pd *pd)
 		 * only be turned off if the CPU is not in use.
 		 */
 		pr_debug("PM domain %s contains %s\n", name, "CPU");
-		pd->flags |= PD_BUSY;
-		gov = &pm_domain_always_on_gov;
+		genpd->flags |= GENPD_FLAG_ALWAYS_ON;
 	} else if (pd->flags & PD_SCU) {
 		/*
 		 * This domain contains an SCU and cache-controller, and
@@ -232,19 +214,17 @@ static void __init rcar_sysc_pd_setup(struct rcar_sysc_pd *pd)
 		 * not in use.
 		 */
 		pr_debug("PM domain %s contains %s\n", name, "SCU");
-		pd->flags |= PD_BUSY;
-		gov = &pm_domain_always_on_gov;
+		genpd->flags |= GENPD_FLAG_ALWAYS_ON;
 	} else if (pd->flags & PD_NO_CR) {
 		/*
 		 * This domain cannot be turned off.
 		 */
-		pd->flags |= PD_BUSY;
-		gov = &pm_domain_always_on_gov;
+		genpd->flags |= GENPD_FLAG_ALWAYS_ON;
 	}
 
 	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;
 		if (has_cpg_mstp) {
 			genpd->attach_dev = cpg_mstp_attach_dev;
 			genpd->detach_dev = cpg_mstp_detach_dev;
diff --git a/drivers/soc/renesas/rcar-sysc.h b/drivers/soc/renesas/rcar-sysc.h
index 07edb049a401..1a5bebaf54ba 100644
--- a/drivers/soc/renesas/rcar-sysc.h
+++ b/drivers/soc/renesas/rcar-sysc.h
@@ -20,8 +20,6 @@
 #define PD_SCU		BIT(1)	/* Area contains SCU and L2 cache */
 #define PD_NO_CR	BIT(2)	/* Area lacks PWR{ON,OFF}CR registers */
 
-#define PD_BUSY		BIT(3)	/* Busy, for internal use only */
-
 #define PD_CPU_CR	PD_CPU		  /* CPU area has CR (R-Car H1) */
 #define PD_CPU_NOCR	PD_CPU | PD_NO_CR /* CPU area lacks CR (R-Car Gen2/3) */
 #define PD_ALWAYS_ON	PD_NO_CR	  /* Always-on area */
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [GIT PULL] Renesas ARM Based SoC R-Car SYSC Updates for v4.13
  2017-06-16 13:31 [GIT PULL] Renesas ARM Based SoC R-Car SYSC Updates for v4.13 Simon Horman
  2017-06-16 13:31 ` [PATCH] soc: renesas: rcar-sysc: Use GENPD_FLAG_ALWAYS_ON Simon Horman
@ 2017-06-19  5:51 ` Olof Johansson
  1 sibling, 0 replies; 3+ messages in thread
From: Olof Johansson @ 2017-06-19  5:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jun 16, 2017 at 03:31:08PM +0200, Simon Horman wrote:
> Hi Olof, Hi Kevin, Hi Arnd,
> 
> Please consider these Renesas ARM based SoC R-Car SYSC updates for v4.13.
> 
> This has been separated out from the pull request
> "[GIT PULL] Renesas ARM Based SoC Drivers Updates for v4.13"
> due to differing dependencies. It seems cleanest to provide separate
> branchs rather than do a merge to create a common base for a single branch.
> 
> 
> The following changes since commit 2ea659a9ef488125eb46da6eb571de5eae5c43f6:
> 
>   Linux 4.12-rc1 (2017-05-13 13:19:49 -0700)
> 
> are available in the git repository at:
> 
>   https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-rcar-sysc-for-v4.13
> 
> for you to fetch changes up to 980532a5dda319eeafadc5c590376626ad178f4f:
> 
>   soc: renesas: rcar-sysc: Use GENPD_FLAG_ALWAYS_ON (2017-06-15 21:10:41 +0200)
> 
> ----------------------------------------------------------------
> Renesas ARM Based SoC R-Car SYSC Updates for v4.13
> 
> Use GENPD_FLAG_ALWAYS_ON in R-Car SYSC driver
> 
> ----------------------------------------------------------------
> Geert Uytterhoeven (1):
>       soc: renesas: rcar-sysc: Use GENPD_FLAG_ALWAYS_ON

Merged, thanks.


-Olof

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-19  5:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-16 13:31 [GIT PULL] Renesas ARM Based SoC R-Car SYSC Updates for v4.13 Simon Horman
2017-06-16 13:31 ` [PATCH] soc: renesas: rcar-sysc: Use GENPD_FLAG_ALWAYS_ON Simon Horman
2017-06-19  5:51 ` [GIT PULL] Renesas ARM Based SoC R-Car SYSC Updates for v4.13 Olof Johansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).