All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-14 12:11 ` Geert Uytterhoeven
  0 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 12:11 UTC (permalink / raw)
  To: linux-arm-kernel

	Hi Simon, Magnus,

This patch series enables DT support for PM domains on the Renesas
SH-Mobile AG5 (sh73a0) SoC.

This series builds further on the DT PM Domain support for R-Mobile A1
(r8a7740).  Due to the similarity of the SYSC System-Controller on the
various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
DT, the same driver can handle sh73a0 after some small modifications,
without changing the DT bindings.

Compared to r8a7740, the only significant change is the move of the
memory-controller(s) to separate PM domains on sh73a0 (and also on
R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
shmobile: Add DT support for memory controllers" I've just sent.

This series has been sent before, as part of the series "[PATCH RFC
0/7] ARM: shmobile: sh73a0: DT PM domain support"
(https://lkml.org/lkml/2014/11/19/404).
Changes since v1 (more detailed changelogs in the individual patches):
  - Factored out addition of the memory-controller in a separate
    series.

Dependencies:
  1. Patches 1-4 (DT binding doc, C code) depend on:
       a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
          renesas-dt-pm-for-v3.20 of Simon's repository,
       b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
	   code"
	   (http://www.spinics.net/lists/arm-kernel/msg391084.html),
  2. Patch 5 (dtsi) depends on:
       a. The multiplatform work for sh73a0, queued in branch
          sh73a0-multiplatform-for-v3.20 of Simon's repository,
       b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
          controllers"
	  (http://marc.info/?l=linux-sh&m\x142123399414888).
  3. Patch 6 (drivers/sh) depends on all of the above.

This was tested on kzm9g-multiplatform.

Thanks!

Geert Uytterhoeven (6):
  PM / Domains: R-Mobile SYSC: Document SH-Mobile AG5 (sh73a0) binding
  ARM: shmobile: R-Mobile: Consolidate rmobile_pd_suspend_*()
  ARM: shmobile: R-Mobile: Generalize adding/looking up special PM
    domains
  ARM: shmobile: R-Mobile: Special-case PM domains with
    memory-controllers
  ARM: shmobile: sh73a0 dtsi: Add PM domain support
  drivers: sh: Disable PM runtime for multi-platform sh73a0 with genpd

 .../bindings/power/renesas,sysc-rmobile.txt        |   1 +
 arch/arm/boot/dts/sh73a0.dtsi                      | 144 ++++++++++++++++++-
 arch/arm/mach-shmobile/pm-rmobile.c                | 155 +++++++++++++--------
 drivers/sh/pm_runtime.c                            |   4 +-
 4 files changed, 242 insertions(+), 62 deletions(-)

-- 
1.9.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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

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

* [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-14 12:11 ` Geert Uytterhoeven
  0 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 12:11 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm
  Cc: linux-sh, linux-pm, linux-arm-kernel, devicetree, Geert Uytterhoeven

	Hi Simon, Magnus,

This patch series enables DT support for PM domains on the Renesas
SH-Mobile AG5 (sh73a0) SoC.

This series builds further on the DT PM Domain support for R-Mobile A1
(r8a7740).  Due to the similarity of the SYSC System-Controller on the
various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
DT, the same driver can handle sh73a0 after some small modifications,
without changing the DT bindings.

Compared to r8a7740, the only significant change is the move of the
memory-controller(s) to separate PM domains on sh73a0 (and also on
R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
shmobile: Add DT support for memory controllers" I've just sent.

This series has been sent before, as part of the series "[PATCH RFC
0/7] ARM: shmobile: sh73a0: DT PM domain support"
(https://lkml.org/lkml/2014/11/19/404).
Changes since v1 (more detailed changelogs in the individual patches):
  - Factored out addition of the memory-controller in a separate
    series.

Dependencies:
  1. Patches 1-4 (DT binding doc, C code) depend on:
       a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
          renesas-dt-pm-for-v3.20 of Simon's repository,
       b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
	   code"
	   (http://www.spinics.net/lists/arm-kernel/msg391084.html),
  2. Patch 5 (dtsi) depends on:
       a. The multiplatform work for sh73a0, queued in branch
          sh73a0-multiplatform-for-v3.20 of Simon's repository,
       b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
          controllers"
	  (http://marc.info/?l=linux-sh&m=142123399414888).
  3. Patch 6 (drivers/sh) depends on all of the above.

This was tested on kzm9g-multiplatform.

Thanks!

Geert Uytterhoeven (6):
  PM / Domains: R-Mobile SYSC: Document SH-Mobile AG5 (sh73a0) binding
  ARM: shmobile: R-Mobile: Consolidate rmobile_pd_suspend_*()
  ARM: shmobile: R-Mobile: Generalize adding/looking up special PM
    domains
  ARM: shmobile: R-Mobile: Special-case PM domains with
    memory-controllers
  ARM: shmobile: sh73a0 dtsi: Add PM domain support
  drivers: sh: Disable PM runtime for multi-platform sh73a0 with genpd

 .../bindings/power/renesas,sysc-rmobile.txt        |   1 +
 arch/arm/boot/dts/sh73a0.dtsi                      | 144 ++++++++++++++++++-
 arch/arm/mach-shmobile/pm-rmobile.c                | 155 +++++++++++++--------
 drivers/sh/pm_runtime.c                            |   4 +-
 4 files changed, 242 insertions(+), 62 deletions(-)

-- 
1.9.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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

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

* [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-14 12:11 ` Geert Uytterhoeven
  0 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 12:11 UTC (permalink / raw)
  To: linux-arm-kernel

	Hi Simon, Magnus,

This patch series enables DT support for PM domains on the Renesas
SH-Mobile AG5 (sh73a0) SoC.

This series builds further on the DT PM Domain support for R-Mobile A1
(r8a7740).  Due to the similarity of the SYSC System-Controller on the
various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
DT, the same driver can handle sh73a0 after some small modifications,
without changing the DT bindings.

Compared to r8a7740, the only significant change is the move of the
memory-controller(s) to separate PM domains on sh73a0 (and also on
R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
shmobile: Add DT support for memory controllers" I've just sent.

This series has been sent before, as part of the series "[PATCH RFC
0/7] ARM: shmobile: sh73a0: DT PM domain support"
(https://lkml.org/lkml/2014/11/19/404).
Changes since v1 (more detailed changelogs in the individual patches):
  - Factored out addition of the memory-controller in a separate
    series.

Dependencies:
  1. Patches 1-4 (DT binding doc, C code) depend on:
       a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
          renesas-dt-pm-for-v3.20 of Simon's repository,
       b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
	   code"
	   (http://www.spinics.net/lists/arm-kernel/msg391084.html),
  2. Patch 5 (dtsi) depends on:
       a. The multiplatform work for sh73a0, queued in branch
          sh73a0-multiplatform-for-v3.20 of Simon's repository,
       b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
          controllers"
	  (http://marc.info/?l=linux-sh&m=142123399414888).
  3. Patch 6 (drivers/sh) depends on all of the above.

This was tested on kzm9g-multiplatform.

Thanks!

Geert Uytterhoeven (6):
  PM / Domains: R-Mobile SYSC: Document SH-Mobile AG5 (sh73a0) binding
  ARM: shmobile: R-Mobile: Consolidate rmobile_pd_suspend_*()
  ARM: shmobile: R-Mobile: Generalize adding/looking up special PM
    domains
  ARM: shmobile: R-Mobile: Special-case PM domains with
    memory-controllers
  ARM: shmobile: sh73a0 dtsi: Add PM domain support
  drivers: sh: Disable PM runtime for multi-platform sh73a0 with genpd

 .../bindings/power/renesas,sysc-rmobile.txt        |   1 +
 arch/arm/boot/dts/sh73a0.dtsi                      | 144 ++++++++++++++++++-
 arch/arm/mach-shmobile/pm-rmobile.c                | 155 +++++++++++++--------
 drivers/sh/pm_runtime.c                            |   4 +-
 4 files changed, 242 insertions(+), 62 deletions(-)

-- 
1.9.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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

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

* [PATCH v2 1/6] PM / Domains: R-Mobile SYSC: Document SH-Mobile AG5 (sh73a0) binding
  2015-01-14 12:11 ` Geert Uytterhoeven
  (?)
@ 2015-01-14 12:11   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 12:11 UTC (permalink / raw)
  To: linux-arm-kernel

SH-Mobile AG5 (sh73a0) can be handled by the existing bindings.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
  - No changes
---
 Documentation/devicetree/bindings/power/renesas,sysc-rmobile.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/power/renesas,sysc-rmobile.txt b/Documentation/devicetree/bindings/power/renesas,sysc-rmobile.txt
index 2460476808e9333e..cc3b1f0a9b1a2b75 100644
--- a/Documentation/devicetree/bindings/power/renesas,sysc-rmobile.txt
+++ b/Documentation/devicetree/bindings/power/renesas,sysc-rmobile.txt
@@ -12,6 +12,7 @@ Required properties:
 	      fallback.
 	      Examples with soctypes are:
 		- "renesas,sysc-r8a7740" (R-Mobile A1)
+		- "renesas,sysc-sh73a0" (SH-Mobile AG5)
 - reg: Two address start and address range blocks for the device:
          - The first block refers to the normally accessible registers,
          - the second block refers to the registers protected by the HPB
-- 
1.9.1


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

* [PATCH v2 1/6] PM / Domains: R-Mobile SYSC: Document SH-Mobile AG5 (sh73a0) binding
@ 2015-01-14 12:11   ` Geert Uytterhoeven
  0 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 12:11 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm
  Cc: linux-sh, linux-pm, linux-arm-kernel, devicetree, Geert Uytterhoeven

SH-Mobile AG5 (sh73a0) can be handled by the existing bindings.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
  - No changes
---
 Documentation/devicetree/bindings/power/renesas,sysc-rmobile.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/power/renesas,sysc-rmobile.txt b/Documentation/devicetree/bindings/power/renesas,sysc-rmobile.txt
index 2460476808e9333e..cc3b1f0a9b1a2b75 100644
--- a/Documentation/devicetree/bindings/power/renesas,sysc-rmobile.txt
+++ b/Documentation/devicetree/bindings/power/renesas,sysc-rmobile.txt
@@ -12,6 +12,7 @@ Required properties:
 	      fallback.
 	      Examples with soctypes are:
 		- "renesas,sysc-r8a7740" (R-Mobile A1)
+		- "renesas,sysc-sh73a0" (SH-Mobile AG5)
 - reg: Two address start and address range blocks for the device:
          - The first block refers to the normally accessible registers,
          - the second block refers to the registers protected by the HPB
-- 
1.9.1


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

* [PATCH v2 1/6] PM / Domains: R-Mobile SYSC: Document SH-Mobile AG5 (sh73a0) binding
@ 2015-01-14 12:11   ` Geert Uytterhoeven
  0 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 12:11 UTC (permalink / raw)
  To: linux-arm-kernel

SH-Mobile AG5 (sh73a0) can be handled by the existing bindings.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
  - No changes
---
 Documentation/devicetree/bindings/power/renesas,sysc-rmobile.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/power/renesas,sysc-rmobile.txt b/Documentation/devicetree/bindings/power/renesas,sysc-rmobile.txt
index 2460476808e9333e..cc3b1f0a9b1a2b75 100644
--- a/Documentation/devicetree/bindings/power/renesas,sysc-rmobile.txt
+++ b/Documentation/devicetree/bindings/power/renesas,sysc-rmobile.txt
@@ -12,6 +12,7 @@ Required properties:
 	      fallback.
 	      Examples with soctypes are:
 		- "renesas,sysc-r8a7740" (R-Mobile A1)
+		- "renesas,sysc-sh73a0" (SH-Mobile AG5)
 - reg: Two address start and address range blocks for the device:
          - The first block refers to the normally accessible registers,
          - the second block refers to the registers protected by the HPB
-- 
1.9.1

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

* [PATCH v2 2/6] ARM: shmobile: R-Mobile: Consolidate rmobile_pd_suspend_*()
  2015-01-14 12:11 ` Geert Uytterhoeven
  (?)
@ 2015-01-14 12:11   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 12:11 UTC (permalink / raw)
  To: linux-arm-kernel

Consolidate the identical rmobile_pd_suspend_*() routines that just
return -EBUSY to prevent a PM domain from being powered down into a
single rmobile_pd_suspend_busy().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
  - Break long comment.
---
 arch/arm/mach-shmobile/pm-rmobile.c | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c
index 85a7fdd9823bc5a6..e1be4b8919efe30e 100644
--- a/arch/arm/mach-shmobile/pm-rmobile.c
+++ b/arch/arm/mach-shmobile/pm-rmobile.c
@@ -200,11 +200,10 @@ void rmobile_add_devices_to_domains(struct pm_domain_device data[],
 
 #else /* !CONFIG_ARCH_SHMOBILE_LEGACY */
 
-static int rmobile_pd_suspend_cpu(void)
+static int rmobile_pd_suspend_busy(void)
 {
 	/*
-	 * This domain contains the CPU core and therefore it should
-	 * only be turned off if the CPU is not in use.
+	 * This domain should not be turned off.
 	 */
 	return -EBUSY;
 }
@@ -218,16 +217,6 @@ static int rmobile_pd_suspend_console(void)
 	return console_suspend_enabled ? 0 : -EBUSY;
 }
 
-static int rmobile_pd_suspend_debug(void)
-{
-	/*
-	 * This domain contains the Coresight-ETM hardware block and
-	 * therefore it should only be turned off if the debug module is
-	 * not in use.
-	 */
-	return -EBUSY;
-}
-
 #define MAX_NUM_CPU_PDS		8
 
 static unsigned int num_cpu_pds __initdata;
@@ -303,17 +292,26 @@ static void __init rmobile_setup_pm_domain(struct device_node *np,
 	const char *name = pd->genpd.name;
 
 	if (pd_contains_cpu(np)) {
+		/*
+		 * This domain contains the CPU core and therefore it should
+		 * only be turned off if the CPU is not in use.
+		 */
 		pr_debug("PM domain %s contains CPU\n", name);
 		pd->gov = &pm_domain_always_on_gov;
-		pd->suspend = rmobile_pd_suspend_cpu;
+		pd->suspend = rmobile_pd_suspend_busy;
 	} else if (np = console_pd) {
 		pr_debug("PM domain %s contains serial console\n", name);
 		pd->gov = &pm_domain_always_on_gov;
 		pd->suspend = rmobile_pd_suspend_console;
 	} else if (np = debug_pd) {
+		/*
+		 * This domain contains the Coresight-ETM hardware block and
+		 * therefore it should only be turned off if the debug module
+		 * is not in use.
+		 */
 		pr_debug("PM domain %s contains Coresight-ETM\n", name);
 		pd->gov = &pm_domain_always_on_gov;
-		pd->suspend = rmobile_pd_suspend_debug;
+		pd->suspend = rmobile_pd_suspend_busy;
 	}
 
 	rmobile_init_pm_domain(pd);
-- 
1.9.1


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

* [PATCH v2 2/6] ARM: shmobile: R-Mobile: Consolidate rmobile_pd_suspend_*()
@ 2015-01-14 12:11   ` Geert Uytterhoeven
  0 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 12:11 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm
  Cc: linux-sh, linux-pm, linux-arm-kernel, devicetree, Geert Uytterhoeven

Consolidate the identical rmobile_pd_suspend_*() routines that just
return -EBUSY to prevent a PM domain from being powered down into a
single rmobile_pd_suspend_busy().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
  - Break long comment.
---
 arch/arm/mach-shmobile/pm-rmobile.c | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c
index 85a7fdd9823bc5a6..e1be4b8919efe30e 100644
--- a/arch/arm/mach-shmobile/pm-rmobile.c
+++ b/arch/arm/mach-shmobile/pm-rmobile.c
@@ -200,11 +200,10 @@ void rmobile_add_devices_to_domains(struct pm_domain_device data[],
 
 #else /* !CONFIG_ARCH_SHMOBILE_LEGACY */
 
-static int rmobile_pd_suspend_cpu(void)
+static int rmobile_pd_suspend_busy(void)
 {
 	/*
-	 * This domain contains the CPU core and therefore it should
-	 * only be turned off if the CPU is not in use.
+	 * This domain should not be turned off.
 	 */
 	return -EBUSY;
 }
@@ -218,16 +217,6 @@ static int rmobile_pd_suspend_console(void)
 	return console_suspend_enabled ? 0 : -EBUSY;
 }
 
-static int rmobile_pd_suspend_debug(void)
-{
-	/*
-	 * This domain contains the Coresight-ETM hardware block and
-	 * therefore it should only be turned off if the debug module is
-	 * not in use.
-	 */
-	return -EBUSY;
-}
-
 #define MAX_NUM_CPU_PDS		8
 
 static unsigned int num_cpu_pds __initdata;
@@ -303,17 +292,26 @@ static void __init rmobile_setup_pm_domain(struct device_node *np,
 	const char *name = pd->genpd.name;
 
 	if (pd_contains_cpu(np)) {
+		/*
+		 * This domain contains the CPU core and therefore it should
+		 * only be turned off if the CPU is not in use.
+		 */
 		pr_debug("PM domain %s contains CPU\n", name);
 		pd->gov = &pm_domain_always_on_gov;
-		pd->suspend = rmobile_pd_suspend_cpu;
+		pd->suspend = rmobile_pd_suspend_busy;
 	} else if (np == console_pd) {
 		pr_debug("PM domain %s contains serial console\n", name);
 		pd->gov = &pm_domain_always_on_gov;
 		pd->suspend = rmobile_pd_suspend_console;
 	} else if (np == debug_pd) {
+		/*
+		 * This domain contains the Coresight-ETM hardware block and
+		 * therefore it should only be turned off if the debug module
+		 * is not in use.
+		 */
 		pr_debug("PM domain %s contains Coresight-ETM\n", name);
 		pd->gov = &pm_domain_always_on_gov;
-		pd->suspend = rmobile_pd_suspend_debug;
+		pd->suspend = rmobile_pd_suspend_busy;
 	}
 
 	rmobile_init_pm_domain(pd);
-- 
1.9.1


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

* [PATCH v2 2/6] ARM: shmobile: R-Mobile: Consolidate rmobile_pd_suspend_*()
@ 2015-01-14 12:11   ` Geert Uytterhoeven
  0 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 12:11 UTC (permalink / raw)
  To: linux-arm-kernel

Consolidate the identical rmobile_pd_suspend_*() routines that just
return -EBUSY to prevent a PM domain from being powered down into a
single rmobile_pd_suspend_busy().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
  - Break long comment.
---
 arch/arm/mach-shmobile/pm-rmobile.c | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c
index 85a7fdd9823bc5a6..e1be4b8919efe30e 100644
--- a/arch/arm/mach-shmobile/pm-rmobile.c
+++ b/arch/arm/mach-shmobile/pm-rmobile.c
@@ -200,11 +200,10 @@ void rmobile_add_devices_to_domains(struct pm_domain_device data[],
 
 #else /* !CONFIG_ARCH_SHMOBILE_LEGACY */
 
-static int rmobile_pd_suspend_cpu(void)
+static int rmobile_pd_suspend_busy(void)
 {
 	/*
-	 * This domain contains the CPU core and therefore it should
-	 * only be turned off if the CPU is not in use.
+	 * This domain should not be turned off.
 	 */
 	return -EBUSY;
 }
@@ -218,16 +217,6 @@ static int rmobile_pd_suspend_console(void)
 	return console_suspend_enabled ? 0 : -EBUSY;
 }
 
-static int rmobile_pd_suspend_debug(void)
-{
-	/*
-	 * This domain contains the Coresight-ETM hardware block and
-	 * therefore it should only be turned off if the debug module is
-	 * not in use.
-	 */
-	return -EBUSY;
-}
-
 #define MAX_NUM_CPU_PDS		8
 
 static unsigned int num_cpu_pds __initdata;
@@ -303,17 +292,26 @@ static void __init rmobile_setup_pm_domain(struct device_node *np,
 	const char *name = pd->genpd.name;
 
 	if (pd_contains_cpu(np)) {
+		/*
+		 * This domain contains the CPU core and therefore it should
+		 * only be turned off if the CPU is not in use.
+		 */
 		pr_debug("PM domain %s contains CPU\n", name);
 		pd->gov = &pm_domain_always_on_gov;
-		pd->suspend = rmobile_pd_suspend_cpu;
+		pd->suspend = rmobile_pd_suspend_busy;
 	} else if (np == console_pd) {
 		pr_debug("PM domain %s contains serial console\n", name);
 		pd->gov = &pm_domain_always_on_gov;
 		pd->suspend = rmobile_pd_suspend_console;
 	} else if (np == debug_pd) {
+		/*
+		 * This domain contains the Coresight-ETM hardware block and
+		 * therefore it should only be turned off if the debug module
+		 * is not in use.
+		 */
 		pr_debug("PM domain %s contains Coresight-ETM\n", name);
 		pd->gov = &pm_domain_always_on_gov;
-		pd->suspend = rmobile_pd_suspend_debug;
+		pd->suspend = rmobile_pd_suspend_busy;
 	}
 
 	rmobile_init_pm_domain(pd);
-- 
1.9.1

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

* [PATCH v2 3/6] ARM: shmobile: R-Mobile: Generalize adding/looking up special PM domains
  2015-01-14 12:11 ` Geert Uytterhoeven
  (?)
@ 2015-01-14 12:11   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 12:11 UTC (permalink / raw)
  To: linux-arm-kernel

Make adding special PM domains to an array, and looking them up
later, more generic, so it can be used for all special hardware blocks.
The type of PM domain is also stored, so rmobile_setup_pm_domain() can
use a switch() statement instead of a chain of if/else statements.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
  - Rebase on top of "ARM: shmobile: R-Mobile: Fix DT refcount bugs in
    PM domain code",
  - Merge "break" and "i < num_special_pds" block in add_special_pd().
---
 arch/arm/mach-shmobile/pm-rmobile.c | 102 ++++++++++++++++++++++--------------
 1 file changed, 63 insertions(+), 39 deletions(-)

diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c
index e1be4b8919efe30e..e4c3f7de48e2ccf2 100644
--- a/arch/arm/mach-shmobile/pm-rmobile.c
+++ b/arch/arm/mach-shmobile/pm-rmobile.c
@@ -217,50 +217,67 @@ static int rmobile_pd_suspend_console(void)
 	return console_suspend_enabled ? 0 : -EBUSY;
 }
 
-#define MAX_NUM_CPU_PDS		8
+enum pd_types {
+	PD_NORMAL,
+	PD_CPU,
+	PD_CONSOLE,
+	PD_DEBUG,
+};
 
-static unsigned int num_cpu_pds __initdata;
-static struct device_node *cpu_pds[MAX_NUM_CPU_PDS] __initdata;
-static struct device_node *console_pd __initdata;
-static struct device_node *debug_pd __initdata;
+#define MAX_NUM_SPECIAL_PDS	16
 
-static void __init get_special_pds(void)
-{
-	struct device_node *np, *pd;
-	unsigned int i;
+static struct special_pd {
+	struct device_node *pd;
+	enum pd_types type;
+} special_pds[MAX_NUM_SPECIAL_PDS] __initdata;
 
-	/* PM domains containing CPUs */
-	for_each_node_by_type(np, "cpu") {
-		pd = of_parse_phandle(np, "power-domains", 0);
-		if (!pd)
-			continue;
+static unsigned int num_special_pds __initdata;
 
-		for (i = 0; i < num_cpu_pds; i++)
-			if (pd = cpu_pds[i])
-				break;
+static void __init add_special_pd(struct device_node *np, enum pd_types type)
+{
+	unsigned int i;
+	struct device_node *pd;
 
-		if (i < num_cpu_pds) {
-			of_node_put(pd);
-			continue;
-		}
+	pd = of_parse_phandle(np, "power-domains", 0);
+	if (!pd)
+		return;
 
-		if (num_cpu_pds = MAX_NUM_CPU_PDS) {
-			pr_warn("Too many CPU PM domains\n");
+	for (i = 0; i < num_special_pds; i++)
+		if (pd = special_pds[i].pd && type = special_pds[i].type) {
 			of_node_put(pd);
-			continue;
+			return;
 		}
 
-		cpu_pds[num_cpu_pds++] = pd;
+	if (num_special_pds = ARRAY_SIZE(special_pds)) {
+		pr_warn("Too many special PM domains\n");
+		of_node_put(pd);
+		return;
 	}
 
+	pr_debug("Special PM domain %s type %d for %s\n", pd->name, type,
+		 np->full_name);
+
+	special_pds[num_special_pds].pd = pd;
+	special_pds[num_special_pds].type = type;
+	num_special_pds++;
+}
+
+static void __init get_special_pds(void)
+{
+	struct device_node *np;
+
+	/* PM domains containing CPUs */
+	for_each_node_by_type(np, "cpu")
+		add_special_pd(np, PD_CPU);
+
 	/* PM domain containing console */
 	if (of_stdout)
-		console_pd = of_parse_phandle(of_stdout, "power-domains", 0);
+		add_special_pd(of_stdout, PD_CONSOLE);
 
 	/* PM domain containing Coresight-ETM */
 	np = of_find_compatible_node(NULL, NULL, "arm,coresight-etm3x");
 	if (np) {
-		debug_pd = of_parse_phandle(np, "power-domains", 0);
+		add_special_pd(np, PD_DEBUG);
 		of_node_put(np);
 	}
 }
@@ -269,21 +286,19 @@ static void __init put_special_pds(void)
 {
 	unsigned int i;
 
-	for (i = 0; i < num_cpu_pds; i++)
-		of_node_put(cpu_pds[i]);
-	of_node_put(console_pd);
-	of_node_put(debug_pd);
+	for (i = 0; i < num_special_pds; i++)
+		of_node_put(special_pds[i].pd);
 }
 
-static bool __init pd_contains_cpu(const struct device_node *pd)
+static enum pd_types __init pd_type(const struct device_node *pd)
 {
 	unsigned int i;
 
-	for (i = 0; i < num_cpu_pds; i++)
-		if (pd = cpu_pds[i])
-			return true;
+	for (i = 0; i < num_special_pds; i++)
+		if (pd = special_pds[i].pd)
+			return special_pds[i].type;
 
-	return false;
+	return PD_NORMAL;
 }
 
 static void __init rmobile_setup_pm_domain(struct device_node *np,
@@ -291,7 +306,8 @@ static void __init rmobile_setup_pm_domain(struct device_node *np,
 {
 	const char *name = pd->genpd.name;
 
-	if (pd_contains_cpu(np)) {
+	switch (pd_type(np)) {
+	case PD_CPU:
 		/*
 		 * This domain contains the CPU core and therefore it should
 		 * only be turned off if the CPU is not in use.
@@ -299,11 +315,15 @@ static void __init rmobile_setup_pm_domain(struct device_node *np,
 		pr_debug("PM domain %s contains CPU\n", name);
 		pd->gov = &pm_domain_always_on_gov;
 		pd->suspend = rmobile_pd_suspend_busy;
-	} else if (np = console_pd) {
+		break;
+
+	case PD_CONSOLE:
 		pr_debug("PM domain %s contains serial console\n", name);
 		pd->gov = &pm_domain_always_on_gov;
 		pd->suspend = rmobile_pd_suspend_console;
-	} else if (np = debug_pd) {
+		break;
+
+	case PD_DEBUG:
 		/*
 		 * This domain contains the Coresight-ETM hardware block and
 		 * therefore it should only be turned off if the debug module
@@ -312,6 +332,10 @@ static void __init rmobile_setup_pm_domain(struct device_node *np,
 		pr_debug("PM domain %s contains Coresight-ETM\n", name);
 		pd->gov = &pm_domain_always_on_gov;
 		pd->suspend = rmobile_pd_suspend_busy;
+		break;
+
+	case PD_NORMAL:
+		break;
 	}
 
 	rmobile_init_pm_domain(pd);
-- 
1.9.1


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

* [PATCH v2 3/6] ARM: shmobile: R-Mobile: Generalize adding/looking up special PM domains
@ 2015-01-14 12:11   ` Geert Uytterhoeven
  0 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 12:11 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm
  Cc: linux-sh, linux-pm, linux-arm-kernel, devicetree, Geert Uytterhoeven

Make adding special PM domains to an array, and looking them up
later, more generic, so it can be used for all special hardware blocks.
The type of PM domain is also stored, so rmobile_setup_pm_domain() can
use a switch() statement instead of a chain of if/else statements.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
  - Rebase on top of "ARM: shmobile: R-Mobile: Fix DT refcount bugs in
    PM domain code",
  - Merge "break" and "i < num_special_pds" block in add_special_pd().
---
 arch/arm/mach-shmobile/pm-rmobile.c | 102 ++++++++++++++++++++++--------------
 1 file changed, 63 insertions(+), 39 deletions(-)

diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c
index e1be4b8919efe30e..e4c3f7de48e2ccf2 100644
--- a/arch/arm/mach-shmobile/pm-rmobile.c
+++ b/arch/arm/mach-shmobile/pm-rmobile.c
@@ -217,50 +217,67 @@ static int rmobile_pd_suspend_console(void)
 	return console_suspend_enabled ? 0 : -EBUSY;
 }
 
-#define MAX_NUM_CPU_PDS		8
+enum pd_types {
+	PD_NORMAL,
+	PD_CPU,
+	PD_CONSOLE,
+	PD_DEBUG,
+};
 
-static unsigned int num_cpu_pds __initdata;
-static struct device_node *cpu_pds[MAX_NUM_CPU_PDS] __initdata;
-static struct device_node *console_pd __initdata;
-static struct device_node *debug_pd __initdata;
+#define MAX_NUM_SPECIAL_PDS	16
 
-static void __init get_special_pds(void)
-{
-	struct device_node *np, *pd;
-	unsigned int i;
+static struct special_pd {
+	struct device_node *pd;
+	enum pd_types type;
+} special_pds[MAX_NUM_SPECIAL_PDS] __initdata;
 
-	/* PM domains containing CPUs */
-	for_each_node_by_type(np, "cpu") {
-		pd = of_parse_phandle(np, "power-domains", 0);
-		if (!pd)
-			continue;
+static unsigned int num_special_pds __initdata;
 
-		for (i = 0; i < num_cpu_pds; i++)
-			if (pd == cpu_pds[i])
-				break;
+static void __init add_special_pd(struct device_node *np, enum pd_types type)
+{
+	unsigned int i;
+	struct device_node *pd;
 
-		if (i < num_cpu_pds) {
-			of_node_put(pd);
-			continue;
-		}
+	pd = of_parse_phandle(np, "power-domains", 0);
+	if (!pd)
+		return;
 
-		if (num_cpu_pds == MAX_NUM_CPU_PDS) {
-			pr_warn("Too many CPU PM domains\n");
+	for (i = 0; i < num_special_pds; i++)
+		if (pd == special_pds[i].pd && type == special_pds[i].type) {
 			of_node_put(pd);
-			continue;
+			return;
 		}
 
-		cpu_pds[num_cpu_pds++] = pd;
+	if (num_special_pds == ARRAY_SIZE(special_pds)) {
+		pr_warn("Too many special PM domains\n");
+		of_node_put(pd);
+		return;
 	}
 
+	pr_debug("Special PM domain %s type %d for %s\n", pd->name, type,
+		 np->full_name);
+
+	special_pds[num_special_pds].pd = pd;
+	special_pds[num_special_pds].type = type;
+	num_special_pds++;
+}
+
+static void __init get_special_pds(void)
+{
+	struct device_node *np;
+
+	/* PM domains containing CPUs */
+	for_each_node_by_type(np, "cpu")
+		add_special_pd(np, PD_CPU);
+
 	/* PM domain containing console */
 	if (of_stdout)
-		console_pd = of_parse_phandle(of_stdout, "power-domains", 0);
+		add_special_pd(of_stdout, PD_CONSOLE);
 
 	/* PM domain containing Coresight-ETM */
 	np = of_find_compatible_node(NULL, NULL, "arm,coresight-etm3x");
 	if (np) {
-		debug_pd = of_parse_phandle(np, "power-domains", 0);
+		add_special_pd(np, PD_DEBUG);
 		of_node_put(np);
 	}
 }
@@ -269,21 +286,19 @@ static void __init put_special_pds(void)
 {
 	unsigned int i;
 
-	for (i = 0; i < num_cpu_pds; i++)
-		of_node_put(cpu_pds[i]);
-	of_node_put(console_pd);
-	of_node_put(debug_pd);
+	for (i = 0; i < num_special_pds; i++)
+		of_node_put(special_pds[i].pd);
 }
 
-static bool __init pd_contains_cpu(const struct device_node *pd)
+static enum pd_types __init pd_type(const struct device_node *pd)
 {
 	unsigned int i;
 
-	for (i = 0; i < num_cpu_pds; i++)
-		if (pd == cpu_pds[i])
-			return true;
+	for (i = 0; i < num_special_pds; i++)
+		if (pd == special_pds[i].pd)
+			return special_pds[i].type;
 
-	return false;
+	return PD_NORMAL;
 }
 
 static void __init rmobile_setup_pm_domain(struct device_node *np,
@@ -291,7 +306,8 @@ static void __init rmobile_setup_pm_domain(struct device_node *np,
 {
 	const char *name = pd->genpd.name;
 
-	if (pd_contains_cpu(np)) {
+	switch (pd_type(np)) {
+	case PD_CPU:
 		/*
 		 * This domain contains the CPU core and therefore it should
 		 * only be turned off if the CPU is not in use.
@@ -299,11 +315,15 @@ static void __init rmobile_setup_pm_domain(struct device_node *np,
 		pr_debug("PM domain %s contains CPU\n", name);
 		pd->gov = &pm_domain_always_on_gov;
 		pd->suspend = rmobile_pd_suspend_busy;
-	} else if (np == console_pd) {
+		break;
+
+	case PD_CONSOLE:
 		pr_debug("PM domain %s contains serial console\n", name);
 		pd->gov = &pm_domain_always_on_gov;
 		pd->suspend = rmobile_pd_suspend_console;
-	} else if (np == debug_pd) {
+		break;
+
+	case PD_DEBUG:
 		/*
 		 * This domain contains the Coresight-ETM hardware block and
 		 * therefore it should only be turned off if the debug module
@@ -312,6 +332,10 @@ static void __init rmobile_setup_pm_domain(struct device_node *np,
 		pr_debug("PM domain %s contains Coresight-ETM\n", name);
 		pd->gov = &pm_domain_always_on_gov;
 		pd->suspend = rmobile_pd_suspend_busy;
+		break;
+
+	case PD_NORMAL:
+		break;
 	}
 
 	rmobile_init_pm_domain(pd);
-- 
1.9.1


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

* [PATCH v2 3/6] ARM: shmobile: R-Mobile: Generalize adding/looking up special PM domains
@ 2015-01-14 12:11   ` Geert Uytterhoeven
  0 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 12:11 UTC (permalink / raw)
  To: linux-arm-kernel

Make adding special PM domains to an array, and looking them up
later, more generic, so it can be used for all special hardware blocks.
The type of PM domain is also stored, so rmobile_setup_pm_domain() can
use a switch() statement instead of a chain of if/else statements.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
  - Rebase on top of "ARM: shmobile: R-Mobile: Fix DT refcount bugs in
    PM domain code",
  - Merge "break" and "i < num_special_pds" block in add_special_pd().
---
 arch/arm/mach-shmobile/pm-rmobile.c | 102 ++++++++++++++++++++++--------------
 1 file changed, 63 insertions(+), 39 deletions(-)

diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c
index e1be4b8919efe30e..e4c3f7de48e2ccf2 100644
--- a/arch/arm/mach-shmobile/pm-rmobile.c
+++ b/arch/arm/mach-shmobile/pm-rmobile.c
@@ -217,50 +217,67 @@ static int rmobile_pd_suspend_console(void)
 	return console_suspend_enabled ? 0 : -EBUSY;
 }
 
-#define MAX_NUM_CPU_PDS		8
+enum pd_types {
+	PD_NORMAL,
+	PD_CPU,
+	PD_CONSOLE,
+	PD_DEBUG,
+};
 
-static unsigned int num_cpu_pds __initdata;
-static struct device_node *cpu_pds[MAX_NUM_CPU_PDS] __initdata;
-static struct device_node *console_pd __initdata;
-static struct device_node *debug_pd __initdata;
+#define MAX_NUM_SPECIAL_PDS	16
 
-static void __init get_special_pds(void)
-{
-	struct device_node *np, *pd;
-	unsigned int i;
+static struct special_pd {
+	struct device_node *pd;
+	enum pd_types type;
+} special_pds[MAX_NUM_SPECIAL_PDS] __initdata;
 
-	/* PM domains containing CPUs */
-	for_each_node_by_type(np, "cpu") {
-		pd = of_parse_phandle(np, "power-domains", 0);
-		if (!pd)
-			continue;
+static unsigned int num_special_pds __initdata;
 
-		for (i = 0; i < num_cpu_pds; i++)
-			if (pd == cpu_pds[i])
-				break;
+static void __init add_special_pd(struct device_node *np, enum pd_types type)
+{
+	unsigned int i;
+	struct device_node *pd;
 
-		if (i < num_cpu_pds) {
-			of_node_put(pd);
-			continue;
-		}
+	pd = of_parse_phandle(np, "power-domains", 0);
+	if (!pd)
+		return;
 
-		if (num_cpu_pds == MAX_NUM_CPU_PDS) {
-			pr_warn("Too many CPU PM domains\n");
+	for (i = 0; i < num_special_pds; i++)
+		if (pd == special_pds[i].pd && type == special_pds[i].type) {
 			of_node_put(pd);
-			continue;
+			return;
 		}
 
-		cpu_pds[num_cpu_pds++] = pd;
+	if (num_special_pds == ARRAY_SIZE(special_pds)) {
+		pr_warn("Too many special PM domains\n");
+		of_node_put(pd);
+		return;
 	}
 
+	pr_debug("Special PM domain %s type %d for %s\n", pd->name, type,
+		 np->full_name);
+
+	special_pds[num_special_pds].pd = pd;
+	special_pds[num_special_pds].type = type;
+	num_special_pds++;
+}
+
+static void __init get_special_pds(void)
+{
+	struct device_node *np;
+
+	/* PM domains containing CPUs */
+	for_each_node_by_type(np, "cpu")
+		add_special_pd(np, PD_CPU);
+
 	/* PM domain containing console */
 	if (of_stdout)
-		console_pd = of_parse_phandle(of_stdout, "power-domains", 0);
+		add_special_pd(of_stdout, PD_CONSOLE);
 
 	/* PM domain containing Coresight-ETM */
 	np = of_find_compatible_node(NULL, NULL, "arm,coresight-etm3x");
 	if (np) {
-		debug_pd = of_parse_phandle(np, "power-domains", 0);
+		add_special_pd(np, PD_DEBUG);
 		of_node_put(np);
 	}
 }
@@ -269,21 +286,19 @@ static void __init put_special_pds(void)
 {
 	unsigned int i;
 
-	for (i = 0; i < num_cpu_pds; i++)
-		of_node_put(cpu_pds[i]);
-	of_node_put(console_pd);
-	of_node_put(debug_pd);
+	for (i = 0; i < num_special_pds; i++)
+		of_node_put(special_pds[i].pd);
 }
 
-static bool __init pd_contains_cpu(const struct device_node *pd)
+static enum pd_types __init pd_type(const struct device_node *pd)
 {
 	unsigned int i;
 
-	for (i = 0; i < num_cpu_pds; i++)
-		if (pd == cpu_pds[i])
-			return true;
+	for (i = 0; i < num_special_pds; i++)
+		if (pd == special_pds[i].pd)
+			return special_pds[i].type;
 
-	return false;
+	return PD_NORMAL;
 }
 
 static void __init rmobile_setup_pm_domain(struct device_node *np,
@@ -291,7 +306,8 @@ static void __init rmobile_setup_pm_domain(struct device_node *np,
 {
 	const char *name = pd->genpd.name;
 
-	if (pd_contains_cpu(np)) {
+	switch (pd_type(np)) {
+	case PD_CPU:
 		/*
 		 * This domain contains the CPU core and therefore it should
 		 * only be turned off if the CPU is not in use.
@@ -299,11 +315,15 @@ static void __init rmobile_setup_pm_domain(struct device_node *np,
 		pr_debug("PM domain %s contains CPU\n", name);
 		pd->gov = &pm_domain_always_on_gov;
 		pd->suspend = rmobile_pd_suspend_busy;
-	} else if (np == console_pd) {
+		break;
+
+	case PD_CONSOLE:
 		pr_debug("PM domain %s contains serial console\n", name);
 		pd->gov = &pm_domain_always_on_gov;
 		pd->suspend = rmobile_pd_suspend_console;
-	} else if (np == debug_pd) {
+		break;
+
+	case PD_DEBUG:
 		/*
 		 * This domain contains the Coresight-ETM hardware block and
 		 * therefore it should only be turned off if the debug module
@@ -312,6 +332,10 @@ static void __init rmobile_setup_pm_domain(struct device_node *np,
 		pr_debug("PM domain %s contains Coresight-ETM\n", name);
 		pd->gov = &pm_domain_always_on_gov;
 		pd->suspend = rmobile_pd_suspend_busy;
+		break;
+
+	case PD_NORMAL:
+		break;
 	}
 
 	rmobile_init_pm_domain(pd);
-- 
1.9.1

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

* [PATCH v2 4/6] ARM: shmobile: R-Mobile: Special-case PM domains with memory-controllers
  2015-01-14 12:11 ` Geert Uytterhoeven
  (?)
@ 2015-01-14 12:11   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 12:11 UTC (permalink / raw)
  To: linux-arm-kernel

Add a special case for PM domains containing a memory-controller.
Such a PM domain must not be turned off if memory is in use.

On sh73a0 PM domains A4BC0 and A4BC1 each contain an SDRAM Bus State
Controller (SBSC). On r8a73a4 PM domain A3BC contains two DDR Bus
Controllers (DBSC).  In both cases, there are no other devices in these
PM domains, so they were eligible for power down, crashing the system.

On r8a7740 the DDR3 Bus State Controller (DBSC3) is located in A4S,
whose child domain A3SM contains the CPU core. Hence A4S is never turned
off, and no crash happened.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
  - Rename PD_SBSC to PD_MEMCTL,
  - Reword code comments and patch description.
---
 arch/arm/mach-shmobile/pm-rmobile.c | 29 +++++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c
index e4c3f7de48e2ccf2..95018209ff0b37cc 100644
--- a/arch/arm/mach-shmobile/pm-rmobile.c
+++ b/arch/arm/mach-shmobile/pm-rmobile.c
@@ -222,6 +222,7 @@ enum pd_types {
 	PD_CPU,
 	PD_CONSOLE,
 	PD_DEBUG,
+	PD_MEMCTL,
 };
 
 #define MAX_NUM_SPECIAL_PDS	16
@@ -233,6 +234,14 @@ static struct special_pd {
 
 static unsigned int num_special_pds __initdata;
 
+static const struct of_device_id special_ids[] __initconst = {
+	{ .compatible = "arm,coresight-etm3x", .data = (void *)PD_DEBUG },
+	{ .compatible = "renesas,dbsc-r8a73a4", .data = (void *)PD_MEMCTL, },
+	{ .compatible = "renesas,dbsc3-r8a7740", .data = (void *)PD_MEMCTL, },
+	{ .compatible = "renesas,sbsc-sh73a0", .data = (void *)PD_MEMCTL, },
+	{ /* sentinel */ },
+};
+
 static void __init add_special_pd(struct device_node *np, enum pd_types type)
 {
 	unsigned int i;
@@ -265,6 +274,7 @@ static void __init add_special_pd(struct device_node *np, enum pd_types type)
 static void __init get_special_pds(void)
 {
 	struct device_node *np;
+	const struct of_device_id *id;
 
 	/* PM domains containing CPUs */
 	for_each_node_by_type(np, "cpu")
@@ -274,12 +284,9 @@ static void __init get_special_pds(void)
 	if (of_stdout)
 		add_special_pd(of_stdout, PD_CONSOLE);
 
-	/* PM domain containing Coresight-ETM */
-	np = of_find_compatible_node(NULL, NULL, "arm,coresight-etm3x");
-	if (np) {
-		add_special_pd(np, PD_DEBUG);
-		of_node_put(np);
-	}
+	/* PM domains containing other special devices */
+	for_each_matching_node_and_match(np, special_ids, &id)
+		add_special_pd(np, (enum pd_types)id->data);
 }
 
 static void __init put_special_pds(void)
@@ -334,6 +341,16 @@ static void __init rmobile_setup_pm_domain(struct device_node *np,
 		pd->suspend = rmobile_pd_suspend_busy;
 		break;
 
+	case PD_MEMCTL:
+		/*
+		 * This domain contains a memory-controller and therefore it
+		 * should only be turned off if memory is not in use.
+		 */
+		pr_debug("PM domain %s contains MEMCTL\n", name);
+		pd->gov = &pm_domain_always_on_gov;
+		pd->suspend = rmobile_pd_suspend_busy;
+		break;
+
 	case PD_NORMAL:
 		break;
 	}
-- 
1.9.1


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

* [PATCH v2 4/6] ARM: shmobile: R-Mobile: Special-case PM domains with memory-controllers
@ 2015-01-14 12:11   ` Geert Uytterhoeven
  0 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 12:11 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm
  Cc: linux-sh, linux-pm, linux-arm-kernel, devicetree, Geert Uytterhoeven

Add a special case for PM domains containing a memory-controller.
Such a PM domain must not be turned off if memory is in use.

On sh73a0 PM domains A4BC0 and A4BC1 each contain an SDRAM Bus State
Controller (SBSC). On r8a73a4 PM domain A3BC contains two DDR Bus
Controllers (DBSC).  In both cases, there are no other devices in these
PM domains, so they were eligible for power down, crashing the system.

On r8a7740 the DDR3 Bus State Controller (DBSC3) is located in A4S,
whose child domain A3SM contains the CPU core. Hence A4S is never turned
off, and no crash happened.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
  - Rename PD_SBSC to PD_MEMCTL,
  - Reword code comments and patch description.
---
 arch/arm/mach-shmobile/pm-rmobile.c | 29 +++++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c
index e4c3f7de48e2ccf2..95018209ff0b37cc 100644
--- a/arch/arm/mach-shmobile/pm-rmobile.c
+++ b/arch/arm/mach-shmobile/pm-rmobile.c
@@ -222,6 +222,7 @@ enum pd_types {
 	PD_CPU,
 	PD_CONSOLE,
 	PD_DEBUG,
+	PD_MEMCTL,
 };
 
 #define MAX_NUM_SPECIAL_PDS	16
@@ -233,6 +234,14 @@ static struct special_pd {
 
 static unsigned int num_special_pds __initdata;
 
+static const struct of_device_id special_ids[] __initconst = {
+	{ .compatible = "arm,coresight-etm3x", .data = (void *)PD_DEBUG },
+	{ .compatible = "renesas,dbsc-r8a73a4", .data = (void *)PD_MEMCTL, },
+	{ .compatible = "renesas,dbsc3-r8a7740", .data = (void *)PD_MEMCTL, },
+	{ .compatible = "renesas,sbsc-sh73a0", .data = (void *)PD_MEMCTL, },
+	{ /* sentinel */ },
+};
+
 static void __init add_special_pd(struct device_node *np, enum pd_types type)
 {
 	unsigned int i;
@@ -265,6 +274,7 @@ static void __init add_special_pd(struct device_node *np, enum pd_types type)
 static void __init get_special_pds(void)
 {
 	struct device_node *np;
+	const struct of_device_id *id;
 
 	/* PM domains containing CPUs */
 	for_each_node_by_type(np, "cpu")
@@ -274,12 +284,9 @@ static void __init get_special_pds(void)
 	if (of_stdout)
 		add_special_pd(of_stdout, PD_CONSOLE);
 
-	/* PM domain containing Coresight-ETM */
-	np = of_find_compatible_node(NULL, NULL, "arm,coresight-etm3x");
-	if (np) {
-		add_special_pd(np, PD_DEBUG);
-		of_node_put(np);
-	}
+	/* PM domains containing other special devices */
+	for_each_matching_node_and_match(np, special_ids, &id)
+		add_special_pd(np, (enum pd_types)id->data);
 }
 
 static void __init put_special_pds(void)
@@ -334,6 +341,16 @@ static void __init rmobile_setup_pm_domain(struct device_node *np,
 		pd->suspend = rmobile_pd_suspend_busy;
 		break;
 
+	case PD_MEMCTL:
+		/*
+		 * This domain contains a memory-controller and therefore it
+		 * should only be turned off if memory is not in use.
+		 */
+		pr_debug("PM domain %s contains MEMCTL\n", name);
+		pd->gov = &pm_domain_always_on_gov;
+		pd->suspend = rmobile_pd_suspend_busy;
+		break;
+
 	case PD_NORMAL:
 		break;
 	}
-- 
1.9.1


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

* [PATCH v2 4/6] ARM: shmobile: R-Mobile: Special-case PM domains with memory-controllers
@ 2015-01-14 12:11   ` Geert Uytterhoeven
  0 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 12:11 UTC (permalink / raw)
  To: linux-arm-kernel

Add a special case for PM domains containing a memory-controller.
Such a PM domain must not be turned off if memory is in use.

On sh73a0 PM domains A4BC0 and A4BC1 each contain an SDRAM Bus State
Controller (SBSC). On r8a73a4 PM domain A3BC contains two DDR Bus
Controllers (DBSC).  In both cases, there are no other devices in these
PM domains, so they were eligible for power down, crashing the system.

On r8a7740 the DDR3 Bus State Controller (DBSC3) is located in A4S,
whose child domain A3SM contains the CPU core. Hence A4S is never turned
off, and no crash happened.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
  - Rename PD_SBSC to PD_MEMCTL,
  - Reword code comments and patch description.
---
 arch/arm/mach-shmobile/pm-rmobile.c | 29 +++++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c
index e4c3f7de48e2ccf2..95018209ff0b37cc 100644
--- a/arch/arm/mach-shmobile/pm-rmobile.c
+++ b/arch/arm/mach-shmobile/pm-rmobile.c
@@ -222,6 +222,7 @@ enum pd_types {
 	PD_CPU,
 	PD_CONSOLE,
 	PD_DEBUG,
+	PD_MEMCTL,
 };
 
 #define MAX_NUM_SPECIAL_PDS	16
@@ -233,6 +234,14 @@ static struct special_pd {
 
 static unsigned int num_special_pds __initdata;
 
+static const struct of_device_id special_ids[] __initconst = {
+	{ .compatible = "arm,coresight-etm3x", .data = (void *)PD_DEBUG },
+	{ .compatible = "renesas,dbsc-r8a73a4", .data = (void *)PD_MEMCTL, },
+	{ .compatible = "renesas,dbsc3-r8a7740", .data = (void *)PD_MEMCTL, },
+	{ .compatible = "renesas,sbsc-sh73a0", .data = (void *)PD_MEMCTL, },
+	{ /* sentinel */ },
+};
+
 static void __init add_special_pd(struct device_node *np, enum pd_types type)
 {
 	unsigned int i;
@@ -265,6 +274,7 @@ static void __init add_special_pd(struct device_node *np, enum pd_types type)
 static void __init get_special_pds(void)
 {
 	struct device_node *np;
+	const struct of_device_id *id;
 
 	/* PM domains containing CPUs */
 	for_each_node_by_type(np, "cpu")
@@ -274,12 +284,9 @@ static void __init get_special_pds(void)
 	if (of_stdout)
 		add_special_pd(of_stdout, PD_CONSOLE);
 
-	/* PM domain containing Coresight-ETM */
-	np = of_find_compatible_node(NULL, NULL, "arm,coresight-etm3x");
-	if (np) {
-		add_special_pd(np, PD_DEBUG);
-		of_node_put(np);
-	}
+	/* PM domains containing other special devices */
+	for_each_matching_node_and_match(np, special_ids, &id)
+		add_special_pd(np, (enum pd_types)id->data);
 }
 
 static void __init put_special_pds(void)
@@ -334,6 +341,16 @@ static void __init rmobile_setup_pm_domain(struct device_node *np,
 		pd->suspend = rmobile_pd_suspend_busy;
 		break;
 
+	case PD_MEMCTL:
+		/*
+		 * This domain contains a memory-controller and therefore it
+		 * should only be turned off if memory is not in use.
+		 */
+		pr_debug("PM domain %s contains MEMCTL\n", name);
+		pd->gov = &pm_domain_always_on_gov;
+		pd->suspend = rmobile_pd_suspend_busy;
+		break;
+
 	case PD_NORMAL:
 		break;
 	}
-- 
1.9.1

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

* [PATCH v2 5/6] ARM: shmobile: sh73a0 dtsi: Add PM domain support
  2015-01-14 12:11 ` Geert Uytterhoeven
  (?)
@ 2015-01-14 12:11   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 12:11 UTC (permalink / raw)
  To: linux-arm-kernel

Add a device node for the System Controller, with subnodes that
represent the hardware power area hierarchy.
Hook up all devices to their respective PM domains.

Note that unlike on R-Mobile A1 (r8a7740), PM domain D4 can be powered
down without ill effects on s2ram behavior, just like on SH-Mobile AP4
(sh7372).  Hence we can postpone adding a (minimal) device node for the
Coresight-ETM hardware block.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
  - Drop RFC state,
  - Extract addition of memory-controller nodes into a separate series,
  - Add missing 0x prefix to sysc device node register lengths.
---
 arch/arm/boot/dts/sh73a0.dtsi | 144 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 142 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/sh73a0.dtsi b/arch/arm/boot/dts/sh73a0.dtsi
index 8d9c2ce593745b1f..121bbeba8f3f6695 100644
--- a/arch/arm/boot/dts/sh73a0.dtsi
+++ b/arch/arm/boot/dts/sh73a0.dtsi
@@ -26,12 +26,14 @@
 			compatible = "arm,cortex-a9";
 			reg = <0>;
 			clock-frequency = <1196000000>;
+			power-domains = <&pd_a2sl>;
 		};
 		cpu@1 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a9";
 			reg = <1>;
 			clock-frequency = <1196000000>;
+			power-domains = <&pd_a2sl>;
 		};
 	};
 
@@ -49,6 +51,7 @@
 		interrupts = <0 37 IRQ_TYPE_LEVEL_HIGH>,
 			     <0 38 IRQ_TYPE_LEVEL_HIGH>;
 		interrupt-names = "sec", "temp";
+		power-domains = <&pd_a4bc1>;
 	};
 
 	sbsc1: memory-controller@fe400000 {
@@ -57,6 +60,7 @@
 		interrupts = <0 35 IRQ_TYPE_LEVEL_HIGH>,
 			     <0 36 IRQ_TYPE_LEVEL_HIGH>;
 		interrupt-names = "sec", "temp";
+		power-domains = <&pd_a4bc0>;
 	};
 
 	pmu {
@@ -69,11 +73,12 @@
 		compatible = "renesas,cmt-48-sh73a0", "renesas,cmt-48";
 		reg = <0xe6138000 0x200>;
 		interrupts = <0 65 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp3_clks SH73A0_CLK_CMT1>;
+		clock-names = "fck";
+		power-domains = <&pd_c5>;
 
 		renesas,channels-mask = <0x3f>;
 
-		clocks = <&mstp3_clks SH73A0_CLK_CMT1>;
-		clock-names = "fck";
 		status = "disabled";
 	};
 
@@ -95,6 +100,7 @@
 			      0 7 IRQ_TYPE_LEVEL_HIGH
 			      0 8 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp5_clks SH73A0_CLK_INTCA0>;
+		power-domains = <&pd_a4s>;
 		control-parent;
 	};
 
@@ -116,6 +122,7 @@
 			      0 15 IRQ_TYPE_LEVEL_HIGH
 			      0 16 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp5_clks SH73A0_CLK_INTCA0>;
+		power-domains = <&pd_a4s>;
 		control-parent;
 	};
 
@@ -137,6 +144,7 @@
 			      0 23 IRQ_TYPE_LEVEL_HIGH
 			      0 24 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp5_clks SH73A0_CLK_INTCA0>;
+		power-domains = <&pd_a4s>;
 		control-parent;
 	};
 
@@ -158,6 +166,7 @@
 			      0 31 IRQ_TYPE_LEVEL_HIGH
 			      0 32 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp5_clks SH73A0_CLK_INTCA0>;
+		power-domains = <&pd_a4s>;
 		control-parent;
 	};
 
@@ -171,6 +180,7 @@
 			      0 169 IRQ_TYPE_LEVEL_HIGH
 			      0 170 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp1_clks SH73A0_CLK_IIC0>;
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -184,6 +194,7 @@
 			      0 53 IRQ_TYPE_LEVEL_HIGH
 			      0 54 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp3_clks SH73A0_CLK_IIC1>;
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -197,6 +208,7 @@
 			      0 173 IRQ_TYPE_LEVEL_HIGH
 			      0 174 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp0_clks SH73A0_CLK_IIC2>;
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -210,6 +222,7 @@
 			      0 185 IRQ_TYPE_LEVEL_HIGH
 			      0 186 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp4_clks SH73A0_CLK_IIC3>;
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -223,6 +236,7 @@
 			      0 189 IRQ_TYPE_LEVEL_HIGH
 			      0 190 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp4_clks SH73A0_CLK_IIC4>;
+		power-domains = <&pd_c5>;
 		status = "disabled";
 	};
 
@@ -232,6 +246,7 @@
 		interrupts = <0 140 IRQ_TYPE_LEVEL_HIGH
 			      0 141 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp3_clks SH73A0_CLK_MMCIF0>;
+		power-domains = <&pd_a3sp>;
 		reg-io-width = <4>;
 		status = "disabled";
 	};
@@ -243,6 +258,7 @@
 			      0 84 IRQ_TYPE_LEVEL_HIGH
 			      0 85 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp3_clks SH73A0_CLK_SDHI0>;
+		power-domains = <&pd_a3sp>;
 		cap-sd-highspeed;
 		status = "disabled";
 	};
@@ -254,6 +270,7 @@
 		interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH
 			      0 89 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp3_clks SH73A0_CLK_SDHI1>;
+		power-domains = <&pd_a3sp>;
 		toshiba,mmc-wrprotect-disable;
 		cap-sd-highspeed;
 		status = "disabled";
@@ -265,6 +282,7 @@
 		interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH
 			      0 105 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp3_clks SH73A0_CLK_SDHI2>;
+		power-domains = <&pd_a3sp>;
 		toshiba,mmc-wrprotect-disable;
 		cap-sd-highspeed;
 		status = "disabled";
@@ -276,6 +294,7 @@
 		interrupts = <0 72 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFA0>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -285,6 +304,7 @@
 		interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFA1>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -294,6 +314,7 @@
 		interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFA2>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -303,6 +324,7 @@
 		interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFA3>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -312,6 +334,7 @@
 		interrupts = <0 78 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFA4>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -321,6 +344,7 @@
 		interrupts = <0 79 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFA5>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -330,6 +354,7 @@
 		interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp3_clks SH73A0_CLK_SCIFA6>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -339,6 +364,7 @@
 		interrupts = <0 143 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFA7>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -348,6 +374,7 @@
 		interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFB>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -366,6 +393,117 @@
 			<&irqpin2 4 0>, <&irqpin2 5 0>, <&irqpin2 6 0>, <&irqpin2 7 0>,
 			<&irqpin3 0 0>, <&irqpin3 1 0>, <&irqpin3 2 0>, <&irqpin3 3 0>,
 			<&irqpin3 4 0>, <&irqpin3 5 0>, <&irqpin3 6 0>, <&irqpin3 7 0>;
+		power-domains = <&pd_c5>;
+	};
+
+	sysc: system-controller@e6180000 {
+		compatible = "renesas,sysc-sh73a0", "renesas,sysc-rmobile";
+		reg = <0xe6180000 0x8000>, <0xe6188000 0x8000>;
+
+		pm-domains {
+			pd_c5: c5 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				#power-domain-cells = <0>;
+
+				pd_c4: c4@0 {
+					reg = <0>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_d4: d4@1 {
+					reg = <1>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_a4bc0: a4bc0@4 {
+					reg = <4>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_a4bc1: a4bc1@5 {
+					reg = <5>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_a4lc0: a4lc0@6 {
+					reg = <6>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_a4lc1: a4lc1@7 {
+					reg = <7>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_a4mp: a4mp@8 {
+					reg = <8>;
+					#address-cells = <1>;
+					#size-cells = <0>;
+					#power-domain-cells = <0>;
+
+					pd_a3mp: a3mp@9 {
+						reg = <9>;
+						#power-domain-cells = <0>;
+					};
+
+					pd_a3vc: a3vc@10 {
+						reg = <10>;
+						#power-domain-cells = <0>;
+					};
+				};
+
+				pd_a4rm: a4rm@12 {
+					reg = <12>;
+					#address-cells = <1>;
+					#size-cells = <0>;
+					#power-domain-cells = <0>;
+
+					pd_a3r: a3r@13 {
+						reg = <13>;
+						#address-cells = <1>;
+						#size-cells = <0>;
+						#power-domain-cells = <0>;
+
+						pd_a2rv: a2rv@14 {
+							reg = <14>;
+							#address-cells = <1>;
+							#size-cells = <0>;
+							#power-domain-cells = <0>;
+						};
+					};
+				};
+
+				pd_a4s: a4s@16 {
+					reg = <16>;
+					#address-cells = <1>;
+					#size-cells = <0>;
+					#power-domain-cells = <0>;
+
+					pd_a3sp: a3sp@17 {
+						reg = <17>;
+						#power-domain-cells = <0>;
+					};
+
+					pd_a3sg: a3sg@18 {
+						reg = <18>;
+						#power-domain-cells = <0>;
+					};
+
+					pd_a3sm: a3sm@19 {
+						reg = <19>;
+						#address-cells = <1>;
+						#size-cells = <0>;
+						#power-domain-cells = <0>;
+
+						pd_a2sl: a2sl@20 {
+							reg = <20>;
+							#power-domain-cells = <0>;
+						};
+					};
+				};
+			};
+		};
 	};
 
 	sh_fsi2: sound@ec230000 {
@@ -373,6 +511,7 @@
 		compatible = "renesas,fsi2-sh73a0", "renesas,sh_fsi2";
 		reg = <0xec230000 0x400>;
 		interrupts = <0 146 0x4>;
+		power-domains = <&pd_a4mp>;
 		status = "disabled";
 	};
 
@@ -384,6 +523,7 @@
 		reg = <0xfec10000 0x400>;
 		interrupts = <0 39 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&zb_clk>;
+		power-domains = <&pd_a4s>;
 	};
 
 	clocks {
-- 
1.9.1


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

* [PATCH v2 5/6] ARM: shmobile: sh73a0 dtsi: Add PM domain support
@ 2015-01-14 12:11   ` Geert Uytterhoeven
  0 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 12:11 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm
  Cc: linux-sh, linux-pm, linux-arm-kernel, devicetree, Geert Uytterhoeven

Add a device node for the System Controller, with subnodes that
represent the hardware power area hierarchy.
Hook up all devices to their respective PM domains.

Note that unlike on R-Mobile A1 (r8a7740), PM domain D4 can be powered
down without ill effects on s2ram behavior, just like on SH-Mobile AP4
(sh7372).  Hence we can postpone adding a (minimal) device node for the
Coresight-ETM hardware block.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
  - Drop RFC state,
  - Extract addition of memory-controller nodes into a separate series,
  - Add missing 0x prefix to sysc device node register lengths.
---
 arch/arm/boot/dts/sh73a0.dtsi | 144 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 142 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/sh73a0.dtsi b/arch/arm/boot/dts/sh73a0.dtsi
index 8d9c2ce593745b1f..121bbeba8f3f6695 100644
--- a/arch/arm/boot/dts/sh73a0.dtsi
+++ b/arch/arm/boot/dts/sh73a0.dtsi
@@ -26,12 +26,14 @@
 			compatible = "arm,cortex-a9";
 			reg = <0>;
 			clock-frequency = <1196000000>;
+			power-domains = <&pd_a2sl>;
 		};
 		cpu@1 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a9";
 			reg = <1>;
 			clock-frequency = <1196000000>;
+			power-domains = <&pd_a2sl>;
 		};
 	};
 
@@ -49,6 +51,7 @@
 		interrupts = <0 37 IRQ_TYPE_LEVEL_HIGH>,
 			     <0 38 IRQ_TYPE_LEVEL_HIGH>;
 		interrupt-names = "sec", "temp";
+		power-domains = <&pd_a4bc1>;
 	};
 
 	sbsc1: memory-controller@fe400000 {
@@ -57,6 +60,7 @@
 		interrupts = <0 35 IRQ_TYPE_LEVEL_HIGH>,
 			     <0 36 IRQ_TYPE_LEVEL_HIGH>;
 		interrupt-names = "sec", "temp";
+		power-domains = <&pd_a4bc0>;
 	};
 
 	pmu {
@@ -69,11 +73,12 @@
 		compatible = "renesas,cmt-48-sh73a0", "renesas,cmt-48";
 		reg = <0xe6138000 0x200>;
 		interrupts = <0 65 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp3_clks SH73A0_CLK_CMT1>;
+		clock-names = "fck";
+		power-domains = <&pd_c5>;
 
 		renesas,channels-mask = <0x3f>;
 
-		clocks = <&mstp3_clks SH73A0_CLK_CMT1>;
-		clock-names = "fck";
 		status = "disabled";
 	};
 
@@ -95,6 +100,7 @@
 			      0 7 IRQ_TYPE_LEVEL_HIGH
 			      0 8 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp5_clks SH73A0_CLK_INTCA0>;
+		power-domains = <&pd_a4s>;
 		control-parent;
 	};
 
@@ -116,6 +122,7 @@
 			      0 15 IRQ_TYPE_LEVEL_HIGH
 			      0 16 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp5_clks SH73A0_CLK_INTCA0>;
+		power-domains = <&pd_a4s>;
 		control-parent;
 	};
 
@@ -137,6 +144,7 @@
 			      0 23 IRQ_TYPE_LEVEL_HIGH
 			      0 24 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp5_clks SH73A0_CLK_INTCA0>;
+		power-domains = <&pd_a4s>;
 		control-parent;
 	};
 
@@ -158,6 +166,7 @@
 			      0 31 IRQ_TYPE_LEVEL_HIGH
 			      0 32 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp5_clks SH73A0_CLK_INTCA0>;
+		power-domains = <&pd_a4s>;
 		control-parent;
 	};
 
@@ -171,6 +180,7 @@
 			      0 169 IRQ_TYPE_LEVEL_HIGH
 			      0 170 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp1_clks SH73A0_CLK_IIC0>;
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -184,6 +194,7 @@
 			      0 53 IRQ_TYPE_LEVEL_HIGH
 			      0 54 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp3_clks SH73A0_CLK_IIC1>;
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -197,6 +208,7 @@
 			      0 173 IRQ_TYPE_LEVEL_HIGH
 			      0 174 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp0_clks SH73A0_CLK_IIC2>;
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -210,6 +222,7 @@
 			      0 185 IRQ_TYPE_LEVEL_HIGH
 			      0 186 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp4_clks SH73A0_CLK_IIC3>;
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -223,6 +236,7 @@
 			      0 189 IRQ_TYPE_LEVEL_HIGH
 			      0 190 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp4_clks SH73A0_CLK_IIC4>;
+		power-domains = <&pd_c5>;
 		status = "disabled";
 	};
 
@@ -232,6 +246,7 @@
 		interrupts = <0 140 IRQ_TYPE_LEVEL_HIGH
 			      0 141 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp3_clks SH73A0_CLK_MMCIF0>;
+		power-domains = <&pd_a3sp>;
 		reg-io-width = <4>;
 		status = "disabled";
 	};
@@ -243,6 +258,7 @@
 			      0 84 IRQ_TYPE_LEVEL_HIGH
 			      0 85 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp3_clks SH73A0_CLK_SDHI0>;
+		power-domains = <&pd_a3sp>;
 		cap-sd-highspeed;
 		status = "disabled";
 	};
@@ -254,6 +270,7 @@
 		interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH
 			      0 89 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp3_clks SH73A0_CLK_SDHI1>;
+		power-domains = <&pd_a3sp>;
 		toshiba,mmc-wrprotect-disable;
 		cap-sd-highspeed;
 		status = "disabled";
@@ -265,6 +282,7 @@
 		interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH
 			      0 105 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp3_clks SH73A0_CLK_SDHI2>;
+		power-domains = <&pd_a3sp>;
 		toshiba,mmc-wrprotect-disable;
 		cap-sd-highspeed;
 		status = "disabled";
@@ -276,6 +294,7 @@
 		interrupts = <0 72 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFA0>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -285,6 +304,7 @@
 		interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFA1>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -294,6 +314,7 @@
 		interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFA2>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -303,6 +324,7 @@
 		interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFA3>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -312,6 +334,7 @@
 		interrupts = <0 78 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFA4>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -321,6 +344,7 @@
 		interrupts = <0 79 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFA5>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -330,6 +354,7 @@
 		interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp3_clks SH73A0_CLK_SCIFA6>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -339,6 +364,7 @@
 		interrupts = <0 143 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFA7>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -348,6 +374,7 @@
 		interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFB>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -366,6 +393,117 @@
 			<&irqpin2 4 0>, <&irqpin2 5 0>, <&irqpin2 6 0>, <&irqpin2 7 0>,
 			<&irqpin3 0 0>, <&irqpin3 1 0>, <&irqpin3 2 0>, <&irqpin3 3 0>,
 			<&irqpin3 4 0>, <&irqpin3 5 0>, <&irqpin3 6 0>, <&irqpin3 7 0>;
+		power-domains = <&pd_c5>;
+	};
+
+	sysc: system-controller@e6180000 {
+		compatible = "renesas,sysc-sh73a0", "renesas,sysc-rmobile";
+		reg = <0xe6180000 0x8000>, <0xe6188000 0x8000>;
+
+		pm-domains {
+			pd_c5: c5 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				#power-domain-cells = <0>;
+
+				pd_c4: c4@0 {
+					reg = <0>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_d4: d4@1 {
+					reg = <1>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_a4bc0: a4bc0@4 {
+					reg = <4>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_a4bc1: a4bc1@5 {
+					reg = <5>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_a4lc0: a4lc0@6 {
+					reg = <6>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_a4lc1: a4lc1@7 {
+					reg = <7>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_a4mp: a4mp@8 {
+					reg = <8>;
+					#address-cells = <1>;
+					#size-cells = <0>;
+					#power-domain-cells = <0>;
+
+					pd_a3mp: a3mp@9 {
+						reg = <9>;
+						#power-domain-cells = <0>;
+					};
+
+					pd_a3vc: a3vc@10 {
+						reg = <10>;
+						#power-domain-cells = <0>;
+					};
+				};
+
+				pd_a4rm: a4rm@12 {
+					reg = <12>;
+					#address-cells = <1>;
+					#size-cells = <0>;
+					#power-domain-cells = <0>;
+
+					pd_a3r: a3r@13 {
+						reg = <13>;
+						#address-cells = <1>;
+						#size-cells = <0>;
+						#power-domain-cells = <0>;
+
+						pd_a2rv: a2rv@14 {
+							reg = <14>;
+							#address-cells = <1>;
+							#size-cells = <0>;
+							#power-domain-cells = <0>;
+						};
+					};
+				};
+
+				pd_a4s: a4s@16 {
+					reg = <16>;
+					#address-cells = <1>;
+					#size-cells = <0>;
+					#power-domain-cells = <0>;
+
+					pd_a3sp: a3sp@17 {
+						reg = <17>;
+						#power-domain-cells = <0>;
+					};
+
+					pd_a3sg: a3sg@18 {
+						reg = <18>;
+						#power-domain-cells = <0>;
+					};
+
+					pd_a3sm: a3sm@19 {
+						reg = <19>;
+						#address-cells = <1>;
+						#size-cells = <0>;
+						#power-domain-cells = <0>;
+
+						pd_a2sl: a2sl@20 {
+							reg = <20>;
+							#power-domain-cells = <0>;
+						};
+					};
+				};
+			};
+		};
 	};
 
 	sh_fsi2: sound@ec230000 {
@@ -373,6 +511,7 @@
 		compatible = "renesas,fsi2-sh73a0", "renesas,sh_fsi2";
 		reg = <0xec230000 0x400>;
 		interrupts = <0 146 0x4>;
+		power-domains = <&pd_a4mp>;
 		status = "disabled";
 	};
 
@@ -384,6 +523,7 @@
 		reg = <0xfec10000 0x400>;
 		interrupts = <0 39 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&zb_clk>;
+		power-domains = <&pd_a4s>;
 	};
 
 	clocks {
-- 
1.9.1


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

* [PATCH v2 5/6] ARM: shmobile: sh73a0 dtsi: Add PM domain support
@ 2015-01-14 12:11   ` Geert Uytterhoeven
  0 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 12:11 UTC (permalink / raw)
  To: linux-arm-kernel

Add a device node for the System Controller, with subnodes that
represent the hardware power area hierarchy.
Hook up all devices to their respective PM domains.

Note that unlike on R-Mobile A1 (r8a7740), PM domain D4 can be powered
down without ill effects on s2ram behavior, just like on SH-Mobile AP4
(sh7372).  Hence we can postpone adding a (minimal) device node for the
Coresight-ETM hardware block.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
  - Drop RFC state,
  - Extract addition of memory-controller nodes into a separate series,
  - Add missing 0x prefix to sysc device node register lengths.
---
 arch/arm/boot/dts/sh73a0.dtsi | 144 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 142 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/sh73a0.dtsi b/arch/arm/boot/dts/sh73a0.dtsi
index 8d9c2ce593745b1f..121bbeba8f3f6695 100644
--- a/arch/arm/boot/dts/sh73a0.dtsi
+++ b/arch/arm/boot/dts/sh73a0.dtsi
@@ -26,12 +26,14 @@
 			compatible = "arm,cortex-a9";
 			reg = <0>;
 			clock-frequency = <1196000000>;
+			power-domains = <&pd_a2sl>;
 		};
 		cpu at 1 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a9";
 			reg = <1>;
 			clock-frequency = <1196000000>;
+			power-domains = <&pd_a2sl>;
 		};
 	};
 
@@ -49,6 +51,7 @@
 		interrupts = <0 37 IRQ_TYPE_LEVEL_HIGH>,
 			     <0 38 IRQ_TYPE_LEVEL_HIGH>;
 		interrupt-names = "sec", "temp";
+		power-domains = <&pd_a4bc1>;
 	};
 
 	sbsc1: memory-controller at fe400000 {
@@ -57,6 +60,7 @@
 		interrupts = <0 35 IRQ_TYPE_LEVEL_HIGH>,
 			     <0 36 IRQ_TYPE_LEVEL_HIGH>;
 		interrupt-names = "sec", "temp";
+		power-domains = <&pd_a4bc0>;
 	};
 
 	pmu {
@@ -69,11 +73,12 @@
 		compatible = "renesas,cmt-48-sh73a0", "renesas,cmt-48";
 		reg = <0xe6138000 0x200>;
 		interrupts = <0 65 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp3_clks SH73A0_CLK_CMT1>;
+		clock-names = "fck";
+		power-domains = <&pd_c5>;
 
 		renesas,channels-mask = <0x3f>;
 
-		clocks = <&mstp3_clks SH73A0_CLK_CMT1>;
-		clock-names = "fck";
 		status = "disabled";
 	};
 
@@ -95,6 +100,7 @@
 			      0 7 IRQ_TYPE_LEVEL_HIGH
 			      0 8 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp5_clks SH73A0_CLK_INTCA0>;
+		power-domains = <&pd_a4s>;
 		control-parent;
 	};
 
@@ -116,6 +122,7 @@
 			      0 15 IRQ_TYPE_LEVEL_HIGH
 			      0 16 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp5_clks SH73A0_CLK_INTCA0>;
+		power-domains = <&pd_a4s>;
 		control-parent;
 	};
 
@@ -137,6 +144,7 @@
 			      0 23 IRQ_TYPE_LEVEL_HIGH
 			      0 24 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp5_clks SH73A0_CLK_INTCA0>;
+		power-domains = <&pd_a4s>;
 		control-parent;
 	};
 
@@ -158,6 +166,7 @@
 			      0 31 IRQ_TYPE_LEVEL_HIGH
 			      0 32 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp5_clks SH73A0_CLK_INTCA0>;
+		power-domains = <&pd_a4s>;
 		control-parent;
 	};
 
@@ -171,6 +180,7 @@
 			      0 169 IRQ_TYPE_LEVEL_HIGH
 			      0 170 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp1_clks SH73A0_CLK_IIC0>;
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -184,6 +194,7 @@
 			      0 53 IRQ_TYPE_LEVEL_HIGH
 			      0 54 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp3_clks SH73A0_CLK_IIC1>;
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -197,6 +208,7 @@
 			      0 173 IRQ_TYPE_LEVEL_HIGH
 			      0 174 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp0_clks SH73A0_CLK_IIC2>;
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -210,6 +222,7 @@
 			      0 185 IRQ_TYPE_LEVEL_HIGH
 			      0 186 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp4_clks SH73A0_CLK_IIC3>;
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -223,6 +236,7 @@
 			      0 189 IRQ_TYPE_LEVEL_HIGH
 			      0 190 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp4_clks SH73A0_CLK_IIC4>;
+		power-domains = <&pd_c5>;
 		status = "disabled";
 	};
 
@@ -232,6 +246,7 @@
 		interrupts = <0 140 IRQ_TYPE_LEVEL_HIGH
 			      0 141 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp3_clks SH73A0_CLK_MMCIF0>;
+		power-domains = <&pd_a3sp>;
 		reg-io-width = <4>;
 		status = "disabled";
 	};
@@ -243,6 +258,7 @@
 			      0 84 IRQ_TYPE_LEVEL_HIGH
 			      0 85 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp3_clks SH73A0_CLK_SDHI0>;
+		power-domains = <&pd_a3sp>;
 		cap-sd-highspeed;
 		status = "disabled";
 	};
@@ -254,6 +270,7 @@
 		interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH
 			      0 89 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp3_clks SH73A0_CLK_SDHI1>;
+		power-domains = <&pd_a3sp>;
 		toshiba,mmc-wrprotect-disable;
 		cap-sd-highspeed;
 		status = "disabled";
@@ -265,6 +282,7 @@
 		interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH
 			      0 105 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp3_clks SH73A0_CLK_SDHI2>;
+		power-domains = <&pd_a3sp>;
 		toshiba,mmc-wrprotect-disable;
 		cap-sd-highspeed;
 		status = "disabled";
@@ -276,6 +294,7 @@
 		interrupts = <0 72 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFA0>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -285,6 +304,7 @@
 		interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFA1>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -294,6 +314,7 @@
 		interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFA2>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -303,6 +324,7 @@
 		interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFA3>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -312,6 +334,7 @@
 		interrupts = <0 78 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFA4>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -321,6 +344,7 @@
 		interrupts = <0 79 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFA5>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -330,6 +354,7 @@
 		interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp3_clks SH73A0_CLK_SCIFA6>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -339,6 +364,7 @@
 		interrupts = <0 143 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFA7>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -348,6 +374,7 @@
 		interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp2_clks SH73A0_CLK_SCIFB>;
 		clock-names = "sci_ick";
+		power-domains = <&pd_a3sp>;
 		status = "disabled";
 	};
 
@@ -366,6 +393,117 @@
 			<&irqpin2 4 0>, <&irqpin2 5 0>, <&irqpin2 6 0>, <&irqpin2 7 0>,
 			<&irqpin3 0 0>, <&irqpin3 1 0>, <&irqpin3 2 0>, <&irqpin3 3 0>,
 			<&irqpin3 4 0>, <&irqpin3 5 0>, <&irqpin3 6 0>, <&irqpin3 7 0>;
+		power-domains = <&pd_c5>;
+	};
+
+	sysc: system-controller at e6180000 {
+		compatible = "renesas,sysc-sh73a0", "renesas,sysc-rmobile";
+		reg = <0xe6180000 0x8000>, <0xe6188000 0x8000>;
+
+		pm-domains {
+			pd_c5: c5 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				#power-domain-cells = <0>;
+
+				pd_c4: c4 at 0 {
+					reg = <0>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_d4: d4 at 1 {
+					reg = <1>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_a4bc0: a4bc0 at 4 {
+					reg = <4>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_a4bc1: a4bc1 at 5 {
+					reg = <5>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_a4lc0: a4lc0 at 6 {
+					reg = <6>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_a4lc1: a4lc1 at 7 {
+					reg = <7>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_a4mp: a4mp at 8 {
+					reg = <8>;
+					#address-cells = <1>;
+					#size-cells = <0>;
+					#power-domain-cells = <0>;
+
+					pd_a3mp: a3mp at 9 {
+						reg = <9>;
+						#power-domain-cells = <0>;
+					};
+
+					pd_a3vc: a3vc at 10 {
+						reg = <10>;
+						#power-domain-cells = <0>;
+					};
+				};
+
+				pd_a4rm: a4rm at 12 {
+					reg = <12>;
+					#address-cells = <1>;
+					#size-cells = <0>;
+					#power-domain-cells = <0>;
+
+					pd_a3r: a3r at 13 {
+						reg = <13>;
+						#address-cells = <1>;
+						#size-cells = <0>;
+						#power-domain-cells = <0>;
+
+						pd_a2rv: a2rv at 14 {
+							reg = <14>;
+							#address-cells = <1>;
+							#size-cells = <0>;
+							#power-domain-cells = <0>;
+						};
+					};
+				};
+
+				pd_a4s: a4s at 16 {
+					reg = <16>;
+					#address-cells = <1>;
+					#size-cells = <0>;
+					#power-domain-cells = <0>;
+
+					pd_a3sp: a3sp at 17 {
+						reg = <17>;
+						#power-domain-cells = <0>;
+					};
+
+					pd_a3sg: a3sg at 18 {
+						reg = <18>;
+						#power-domain-cells = <0>;
+					};
+
+					pd_a3sm: a3sm at 19 {
+						reg = <19>;
+						#address-cells = <1>;
+						#size-cells = <0>;
+						#power-domain-cells = <0>;
+
+						pd_a2sl: a2sl at 20 {
+							reg = <20>;
+							#power-domain-cells = <0>;
+						};
+					};
+				};
+			};
+		};
 	};
 
 	sh_fsi2: sound at ec230000 {
@@ -373,6 +511,7 @@
 		compatible = "renesas,fsi2-sh73a0", "renesas,sh_fsi2";
 		reg = <0xec230000 0x400>;
 		interrupts = <0 146 0x4>;
+		power-domains = <&pd_a4mp>;
 		status = "disabled";
 	};
 
@@ -384,6 +523,7 @@
 		reg = <0xfec10000 0x400>;
 		interrupts = <0 39 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&zb_clk>;
+		power-domains = <&pd_a4s>;
 	};
 
 	clocks {
-- 
1.9.1

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

* [PATCH v2 6/6] drivers: sh: Disable PM runtime for multi-platform sh73a0 with genpd
  2015-01-14 12:11 ` Geert Uytterhoeven
  (?)
@ 2015-01-14 12:11   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 12:11 UTC (permalink / raw)
  To: linux-arm-kernel

If the default PM domain using PM_CLK is used for PM runtime, the real PM
domain(s) cannot be registered from DT later.

Hence do not enable it when running a multi-platform kernel with genpd
support on an sh73a0. The R-Mobile PM domain driver will take care of
PM runtime management of the module clocks.

The default PM domain is still needed for:
  - platforms without genpd support,
  - the legacy (non-DT) case, where genpd may take over later, except
    for the C5 "always on" PM domain.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
  - No changes
---
 drivers/sh/pm_runtime.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/sh/pm_runtime.c b/drivers/sh/pm_runtime.c
index cd4c293f0dd0d375..6b16a67ba618b793 100644
--- a/drivers/sh/pm_runtime.c
+++ b/drivers/sh/pm_runtime.c
@@ -83,6 +83,7 @@ static int __init sh_pm_runtime_init(void)
 		    !of_machine_is_compatible("renesas,r8a73a4") &&
 #ifndef CONFIG_PM_GENERIC_DOMAINS_OF
 		    !of_machine_is_compatible("renesas,r8a7740") &&
+		    !of_machine_is_compatible("renesas,sh73a0") &&
 #endif
 		    !of_machine_is_compatible("renesas,r8a7778") &&
 		    !of_machine_is_compatible("renesas,r8a7779") &&
@@ -91,8 +92,7 @@ static int __init sh_pm_runtime_init(void)
 		    !of_machine_is_compatible("renesas,r8a7792") &&
 		    !of_machine_is_compatible("renesas,r8a7793") &&
 		    !of_machine_is_compatible("renesas,r8a7794") &&
-		    !of_machine_is_compatible("renesas,sh7372") &&
-		    !of_machine_is_compatible("renesas,sh73a0"))
+		    !of_machine_is_compatible("renesas,sh7372"))
 			return 0;
 	}
 
-- 
1.9.1


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

* [PATCH v2 6/6] drivers: sh: Disable PM runtime for multi-platform sh73a0 with genpd
@ 2015-01-14 12:11   ` Geert Uytterhoeven
  0 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 12:11 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm
  Cc: linux-sh, linux-pm, linux-arm-kernel, devicetree, Geert Uytterhoeven

If the default PM domain using PM_CLK is used for PM runtime, the real PM
domain(s) cannot be registered from DT later.

Hence do not enable it when running a multi-platform kernel with genpd
support on an sh73a0. The R-Mobile PM domain driver will take care of
PM runtime management of the module clocks.

The default PM domain is still needed for:
  - platforms without genpd support,
  - the legacy (non-DT) case, where genpd may take over later, except
    for the C5 "always on" PM domain.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
  - No changes
---
 drivers/sh/pm_runtime.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/sh/pm_runtime.c b/drivers/sh/pm_runtime.c
index cd4c293f0dd0d375..6b16a67ba618b793 100644
--- a/drivers/sh/pm_runtime.c
+++ b/drivers/sh/pm_runtime.c
@@ -83,6 +83,7 @@ static int __init sh_pm_runtime_init(void)
 		    !of_machine_is_compatible("renesas,r8a73a4") &&
 #ifndef CONFIG_PM_GENERIC_DOMAINS_OF
 		    !of_machine_is_compatible("renesas,r8a7740") &&
+		    !of_machine_is_compatible("renesas,sh73a0") &&
 #endif
 		    !of_machine_is_compatible("renesas,r8a7778") &&
 		    !of_machine_is_compatible("renesas,r8a7779") &&
@@ -91,8 +92,7 @@ static int __init sh_pm_runtime_init(void)
 		    !of_machine_is_compatible("renesas,r8a7792") &&
 		    !of_machine_is_compatible("renesas,r8a7793") &&
 		    !of_machine_is_compatible("renesas,r8a7794") &&
-		    !of_machine_is_compatible("renesas,sh7372") &&
-		    !of_machine_is_compatible("renesas,sh73a0"))
+		    !of_machine_is_compatible("renesas,sh7372"))
 			return 0;
 	}
 
-- 
1.9.1


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

* [PATCH v2 6/6] drivers: sh: Disable PM runtime for multi-platform sh73a0 with genpd
@ 2015-01-14 12:11   ` Geert Uytterhoeven
  0 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-14 12:11 UTC (permalink / raw)
  To: linux-arm-kernel

If the default PM domain using PM_CLK is used for PM runtime, the real PM
domain(s) cannot be registered from DT later.

Hence do not enable it when running a multi-platform kernel with genpd
support on an sh73a0. The R-Mobile PM domain driver will take care of
PM runtime management of the module clocks.

The default PM domain is still needed for:
  - platforms without genpd support,
  - the legacy (non-DT) case, where genpd may take over later, except
    for the C5 "always on" PM domain.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
  - No changes
---
 drivers/sh/pm_runtime.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/sh/pm_runtime.c b/drivers/sh/pm_runtime.c
index cd4c293f0dd0d375..6b16a67ba618b793 100644
--- a/drivers/sh/pm_runtime.c
+++ b/drivers/sh/pm_runtime.c
@@ -83,6 +83,7 @@ static int __init sh_pm_runtime_init(void)
 		    !of_machine_is_compatible("renesas,r8a73a4") &&
 #ifndef CONFIG_PM_GENERIC_DOMAINS_OF
 		    !of_machine_is_compatible("renesas,r8a7740") &&
+		    !of_machine_is_compatible("renesas,sh73a0") &&
 #endif
 		    !of_machine_is_compatible("renesas,r8a7778") &&
 		    !of_machine_is_compatible("renesas,r8a7779") &&
@@ -91,8 +92,7 @@ static int __init sh_pm_runtime_init(void)
 		    !of_machine_is_compatible("renesas,r8a7792") &&
 		    !of_machine_is_compatible("renesas,r8a7793") &&
 		    !of_machine_is_compatible("renesas,r8a7794") &&
-		    !of_machine_is_compatible("renesas,sh7372") &&
-		    !of_machine_is_compatible("renesas,sh73a0"))
+		    !of_machine_is_compatible("renesas,sh7372"))
 			return 0;
 	}
 
-- 
1.9.1

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

* Re: [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
  2015-01-14 12:11 ` Geert Uytterhoeven
  (?)
@ 2015-01-14 23:53   ` Simon Horman
  -1 siblings, 0 replies; 51+ messages in thread
From: Simon Horman @ 2015-01-14 23:53 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Geert,

On Wed, Jan 14, 2015 at 01:11:18PM +0100, Geert Uytterhoeven wrote:
> 	Hi Simon, Magnus,
> 
> This patch series enables DT support for PM domains on the Renesas
> SH-Mobile AG5 (sh73a0) SoC.
> 
> This series builds further on the DT PM Domain support for R-Mobile A1
> (r8a7740).  Due to the similarity of the SYSC System-Controller on the
> various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
> DT, the same driver can handle sh73a0 after some small modifications,
> without changing the DT bindings.
> 
> Compared to r8a7740, the only significant change is the move of the
> memory-controller(s) to separate PM domains on sh73a0 (and also on
> R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
> these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
> shmobile: Add DT support for memory controllers" I've just sent.
> 
> This series has been sent before, as part of the series "[PATCH RFC
> 0/7] ARM: shmobile: sh73a0: DT PM domain support"
> (https://lkml.org/lkml/2014/11/19/404).
> Changes since v1 (more detailed changelogs in the individual patches):
>   - Factored out addition of the memory-controller in a separate
>     series.
> 
> Dependencies:
>   1. Patches 1-4 (DT binding doc, C code) depend on:
>        a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
>           renesas-dt-pm-for-v3.20 of Simon's repository,

In response to a request from Olof renesas-dt-pm-for-v3.20 has been
withdrawn and the patches split between the soc-for-v3.20 and dt-for-v3.20
branches. I am assuming that the patches that 1-4 depend on are
now all in the soc-for-v3.20 branch. Could you check?

>        b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
> 	   code"
> 	   (http://www.spinics.net/lists/arm-kernel/msg391084.html),

FWIW, I have squashed that patch into the patch that adds the problem
and the result is in the soc-for-v3.20. I will to push that result
a little later today.

>   2. Patch 5 (dtsi) depends on:
>        a. The multiplatform work for sh73a0, queued in branch
>           sh73a0-multiplatform-for-v3.20 of Simon's repository,
>        b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
>           controllers"
> 	  (http://marc.info/?l=linux-sh&m\x142123399414888).

This may be awkward to get into v3.20 unless we can adopt a looser approach
to the dependencies.

To that end I suggest that it could be queued up in the branch that has the
multiplatform work (a) but not the memory controller work (b) as the latter
seems to more naturally fit into the dt branch. What I am hoping that such
an approach would lead to code that compiles and boots in both branches.
And that new functionality becomes available when the branched are combined
(e.g. in v3.20-rcX).

If this is not possible then I can merge the pre-requisites and put
patch 5 on top. But I feel that the ARM SoC maintainers would prefer
that I didn't do that unless it is absolutely necessary.

In case you are wondering: branch gymnastics are not my favourite pass time :^)

>   3. Patch 6 (drivers/sh) depends on all of the above.

That part is clear enough :)

My intention here is to send a pull request to Linus for this change
once all the other patches have hit his tree. With a bit of luck that
would be around v3.20-rc2.

> This was tested on kzm9g-multiplatform.
> 
> Thanks!
> 
> Geert Uytterhoeven (6):
>   PM / Domains: R-Mobile SYSC: Document SH-Mobile AG5 (sh73a0) binding
>   ARM: shmobile: R-Mobile: Consolidate rmobile_pd_suspend_*()
>   ARM: shmobile: R-Mobile: Generalize adding/looking up special PM
>     domains
>   ARM: shmobile: R-Mobile: Special-case PM domains with
>     memory-controllers
>   ARM: shmobile: sh73a0 dtsi: Add PM domain support
>   drivers: sh: Disable PM runtime for multi-platform sh73a0 with genpd
> 
>  .../bindings/power/renesas,sysc-rmobile.txt        |   1 +

>  arch/arm/boot/dts/sh73a0.dtsi                      | 144 ++++++++++++++++++-
>  arch/arm/mach-shmobile/pm-rmobile.c                | 155 +++++++++++++--------
>  drivers/sh/pm_runtime.c                            |   4 +-
>  4 files changed, 242 insertions(+), 62 deletions(-)
> 
> -- 
> 1.9.1
> 
> Gr{oetje,eeting}s,
> 
> 						Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-14 23:53   ` Simon Horman
  0 siblings, 0 replies; 51+ messages in thread
From: Simon Horman @ 2015-01-14 23:53 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Magnus Damm, linux-sh, linux-pm, linux-arm-kernel, devicetree

Hi Geert,

On Wed, Jan 14, 2015 at 01:11:18PM +0100, Geert Uytterhoeven wrote:
> 	Hi Simon, Magnus,
> 
> This patch series enables DT support for PM domains on the Renesas
> SH-Mobile AG5 (sh73a0) SoC.
> 
> This series builds further on the DT PM Domain support for R-Mobile A1
> (r8a7740).  Due to the similarity of the SYSC System-Controller on the
> various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
> DT, the same driver can handle sh73a0 after some small modifications,
> without changing the DT bindings.
> 
> Compared to r8a7740, the only significant change is the move of the
> memory-controller(s) to separate PM domains on sh73a0 (and also on
> R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
> these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
> shmobile: Add DT support for memory controllers" I've just sent.
> 
> This series has been sent before, as part of the series "[PATCH RFC
> 0/7] ARM: shmobile: sh73a0: DT PM domain support"
> (https://lkml.org/lkml/2014/11/19/404).
> Changes since v1 (more detailed changelogs in the individual patches):
>   - Factored out addition of the memory-controller in a separate
>     series.
> 
> Dependencies:
>   1. Patches 1-4 (DT binding doc, C code) depend on:
>        a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
>           renesas-dt-pm-for-v3.20 of Simon's repository,

In response to a request from Olof renesas-dt-pm-for-v3.20 has been
withdrawn and the patches split between the soc-for-v3.20 and dt-for-v3.20
branches. I am assuming that the patches that 1-4 depend on are
now all in the soc-for-v3.20 branch. Could you check?

>        b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
> 	   code"
> 	   (http://www.spinics.net/lists/arm-kernel/msg391084.html),

FWIW, I have squashed that patch into the patch that adds the problem
and the result is in the soc-for-v3.20. I will to push that result
a little later today.

>   2. Patch 5 (dtsi) depends on:
>        a. The multiplatform work for sh73a0, queued in branch
>           sh73a0-multiplatform-for-v3.20 of Simon's repository,
>        b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
>           controllers"
> 	  (http://marc.info/?l=linux-sh&m=142123399414888).

This may be awkward to get into v3.20 unless we can adopt a looser approach
to the dependencies.

To that end I suggest that it could be queued up in the branch that has the
multiplatform work (a) but not the memory controller work (b) as the latter
seems to more naturally fit into the dt branch. What I am hoping that such
an approach would lead to code that compiles and boots in both branches.
And that new functionality becomes available when the branched are combined
(e.g. in v3.20-rcX).

If this is not possible then I can merge the pre-requisites and put
patch 5 on top. But I feel that the ARM SoC maintainers would prefer
that I didn't do that unless it is absolutely necessary.

In case you are wondering: branch gymnastics are not my favourite pass time :^)

>   3. Patch 6 (drivers/sh) depends on all of the above.

That part is clear enough :)

My intention here is to send a pull request to Linus for this change
once all the other patches have hit his tree. With a bit of luck that
would be around v3.20-rc2.

> This was tested on kzm9g-multiplatform.
> 
> Thanks!
> 
> Geert Uytterhoeven (6):
>   PM / Domains: R-Mobile SYSC: Document SH-Mobile AG5 (sh73a0) binding
>   ARM: shmobile: R-Mobile: Consolidate rmobile_pd_suspend_*()
>   ARM: shmobile: R-Mobile: Generalize adding/looking up special PM
>     domains
>   ARM: shmobile: R-Mobile: Special-case PM domains with
>     memory-controllers
>   ARM: shmobile: sh73a0 dtsi: Add PM domain support
>   drivers: sh: Disable PM runtime for multi-platform sh73a0 with genpd
> 
>  .../bindings/power/renesas,sysc-rmobile.txt        |   1 +

>  arch/arm/boot/dts/sh73a0.dtsi                      | 144 ++++++++++++++++++-
>  arch/arm/mach-shmobile/pm-rmobile.c                | 155 +++++++++++++--------
>  drivers/sh/pm_runtime.c                            |   4 +-
>  4 files changed, 242 insertions(+), 62 deletions(-)
> 
> -- 
> 1.9.1
> 
> Gr{oetje,eeting}s,
> 
> 						Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-14 23:53   ` Simon Horman
  0 siblings, 0 replies; 51+ messages in thread
From: Simon Horman @ 2015-01-14 23:53 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Geert,

On Wed, Jan 14, 2015 at 01:11:18PM +0100, Geert Uytterhoeven wrote:
> 	Hi Simon, Magnus,
> 
> This patch series enables DT support for PM domains on the Renesas
> SH-Mobile AG5 (sh73a0) SoC.
> 
> This series builds further on the DT PM Domain support for R-Mobile A1
> (r8a7740).  Due to the similarity of the SYSC System-Controller on the
> various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
> DT, the same driver can handle sh73a0 after some small modifications,
> without changing the DT bindings.
> 
> Compared to r8a7740, the only significant change is the move of the
> memory-controller(s) to separate PM domains on sh73a0 (and also on
> R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
> these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
> shmobile: Add DT support for memory controllers" I've just sent.
> 
> This series has been sent before, as part of the series "[PATCH RFC
> 0/7] ARM: shmobile: sh73a0: DT PM domain support"
> (https://lkml.org/lkml/2014/11/19/404).
> Changes since v1 (more detailed changelogs in the individual patches):
>   - Factored out addition of the memory-controller in a separate
>     series.
> 
> Dependencies:
>   1. Patches 1-4 (DT binding doc, C code) depend on:
>        a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
>           renesas-dt-pm-for-v3.20 of Simon's repository,

In response to a request from Olof renesas-dt-pm-for-v3.20 has been
withdrawn and the patches split between the soc-for-v3.20 and dt-for-v3.20
branches. I am assuming that the patches that 1-4 depend on are
now all in the soc-for-v3.20 branch. Could you check?

>        b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
> 	   code"
> 	   (http://www.spinics.net/lists/arm-kernel/msg391084.html),

FWIW, I have squashed that patch into the patch that adds the problem
and the result is in the soc-for-v3.20. I will to push that result
a little later today.

>   2. Patch 5 (dtsi) depends on:
>        a. The multiplatform work for sh73a0, queued in branch
>           sh73a0-multiplatform-for-v3.20 of Simon's repository,
>        b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
>           controllers"
> 	  (http://marc.info/?l=linux-sh&m=142123399414888).

This may be awkward to get into v3.20 unless we can adopt a looser approach
to the dependencies.

To that end I suggest that it could be queued up in the branch that has the
multiplatform work (a) but not the memory controller work (b) as the latter
seems to more naturally fit into the dt branch. What I am hoping that such
an approach would lead to code that compiles and boots in both branches.
And that new functionality becomes available when the branched are combined
(e.g. in v3.20-rcX).

If this is not possible then I can merge the pre-requisites and put
patch 5 on top. But I feel that the ARM SoC maintainers would prefer
that I didn't do that unless it is absolutely necessary.

In case you are wondering: branch gymnastics are not my favourite pass time :^)

>   3. Patch 6 (drivers/sh) depends on all of the above.

That part is clear enough :)

My intention here is to send a pull request to Linus for this change
once all the other patches have hit his tree. With a bit of luck that
would be around v3.20-rc2.

> This was tested on kzm9g-multiplatform.
> 
> Thanks!
> 
> Geert Uytterhoeven (6):
>   PM / Domains: R-Mobile SYSC: Document SH-Mobile AG5 (sh73a0) binding
>   ARM: shmobile: R-Mobile: Consolidate rmobile_pd_suspend_*()
>   ARM: shmobile: R-Mobile: Generalize adding/looking up special PM
>     domains
>   ARM: shmobile: R-Mobile: Special-case PM domains with
>     memory-controllers
>   ARM: shmobile: sh73a0 dtsi: Add PM domain support
>   drivers: sh: Disable PM runtime for multi-platform sh73a0 with genpd
> 
>  .../bindings/power/renesas,sysc-rmobile.txt        |   1 +

>  arch/arm/boot/dts/sh73a0.dtsi                      | 144 ++++++++++++++++++-
>  arch/arm/mach-shmobile/pm-rmobile.c                | 155 +++++++++++++--------
>  drivers/sh/pm_runtime.c                            |   4 +-
>  4 files changed, 242 insertions(+), 62 deletions(-)
> 
> -- 
> 1.9.1
> 
> Gr{oetje,eeting}s,
> 
> 						Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
  2015-01-14 23:53   ` Simon Horman
  (?)
@ 2015-01-15  9:32     ` Geert Uytterhoeven
  -1 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-15  9:32 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

On Thu, Jan 15, 2015 at 12:53 AM, Simon Horman <horms@verge.net.au> wrote:
> On Wed, Jan 14, 2015 at 01:11:18PM +0100, Geert Uytterhoeven wrote:
>> This patch series enables DT support for PM domains on the Renesas
>> SH-Mobile AG5 (sh73a0) SoC.
>>
>> This series builds further on the DT PM Domain support for R-Mobile A1
>> (r8a7740).  Due to the similarity of the SYSC System-Controller on the
>> various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
>> DT, the same driver can handle sh73a0 after some small modifications,
>> without changing the DT bindings.
>>
>> Compared to r8a7740, the only significant change is the move of the
>> memory-controller(s) to separate PM domains on sh73a0 (and also on
>> R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
>> these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
>> shmobile: Add DT support for memory controllers" I've just sent.
>>
>> This series has been sent before, as part of the series "[PATCH RFC
>> 0/7] ARM: shmobile: sh73a0: DT PM domain support"
>> (https://lkml.org/lkml/2014/11/19/404).
>> Changes since v1 (more detailed changelogs in the individual patches):
>>   - Factored out addition of the memory-controller in a separate
>>     series.
>>
>> Dependencies:
>>   1. Patches 1-4 (DT binding doc, C code) depend on:
>>        a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
>>           renesas-dt-pm-for-v3.20 of Simon's repository,
>
> In response to a request from Olof renesas-dt-pm-for-v3.20 has been
> withdrawn and the patches split between the soc-for-v3.20 and dt-for-v3.20
> branches. I am assuming that the patches that 1-4 depend on are
> now all in the soc-for-v3.20 branch. Could you check?

OK, soc-for-v3.20 now.

>>        b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
>>          code"
>>          (http://www.spinics.net/lists/arm-kernel/msg391084.html),
>
> FWIW, I have squashed that patch into the patch that adds the problem
> and the result is in the soc-for-v3.20. I will to push that result
> a little later today.

Thanks!

>>   2. Patch 5 (dtsi) depends on:
>>        a. The multiplatform work for sh73a0, queued in branch
>>           sh73a0-multiplatform-for-v3.20 of Simon's repository,
>>        b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
>>           controllers"
>>         (http://marc.info/?l=linux-sh&m\x142123399414888).
>
> This may be awkward to get into v3.20 unless we can adopt a looser approach
> to the dependencies.
>
> To that end I suggest that it could be queued up in the branch that has the
> multiplatform work (a) but not the memory controller work (b) as the latter
> seems to more naturally fit into the dt branch. What I am hoping that such
> an approach would lead to code that compiles and boots in both branches.
> And that new functionality becomes available when the branched are combined
> (e.g. in v3.20-rcX).

"ARM: shmobile: sh73a0 dtsi: Add PM domain support" relies on the clocks
properties already being present on all device nodes (incl. the Bus State
Controller), hence it depends on sh73a0-multiplatform-for-v3.20.
"ARM: shmobile: sh73a0 dtsi: Add PM domain support" adds a power-domains
property to the memory-controller node, so it depends on that, too.

Leaving the memory-controller part out makes it unbootable, as the
memory-controller will be powered down when PM domains become
activated. Yes, hardware power domains are even more fun than (common)
clocks when trying to split the commits across multiple branches ;-)

> If this is not possible then I can merge the pre-requisites and put
> patch 5 on top. But I feel that the ARM SoC maintainers would prefer
> that I didn't do that unless it is absolutely necessary.

Merging dt-for-v3.20 into sh73a0-multiplatform-for-v3.20 before applying
patch 5 seems like the only sensible solution.

As soon as that gets combined with soc-for-v3.20, the PM domains are
activated, and patch 6 can be applied.

> In case you are wondering: branch gymnastics are not my favourite pass time :^)
>
>>   3. Patch 6 (drivers/sh) depends on all of the above.
>
> That part is clear enough :)
>
> My intention here is to send a pull request to Linus for this change
> once all the other patches have hit his tree. With a bit of luck that
> would be around v3.20-rc2.

OK, that would be appied to sh-drivers-for-v3.20, right?

Thanks a lot!
My local patch queue has shrunk considerably during the last few days...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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

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

* Re: [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-15  9:32     ` Geert Uytterhoeven
  0 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-15  9:32 UTC (permalink / raw)
  To: Simon Horman
  Cc: Geert Uytterhoeven, Magnus Damm, Linux-sh list, Linux PM list,
	linux-arm-kernel, devicetree

Hi Simon,

On Thu, Jan 15, 2015 at 12:53 AM, Simon Horman <horms@verge.net.au> wrote:
> On Wed, Jan 14, 2015 at 01:11:18PM +0100, Geert Uytterhoeven wrote:
>> This patch series enables DT support for PM domains on the Renesas
>> SH-Mobile AG5 (sh73a0) SoC.
>>
>> This series builds further on the DT PM Domain support for R-Mobile A1
>> (r8a7740).  Due to the similarity of the SYSC System-Controller on the
>> various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
>> DT, the same driver can handle sh73a0 after some small modifications,
>> without changing the DT bindings.
>>
>> Compared to r8a7740, the only significant change is the move of the
>> memory-controller(s) to separate PM domains on sh73a0 (and also on
>> R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
>> these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
>> shmobile: Add DT support for memory controllers" I've just sent.
>>
>> This series has been sent before, as part of the series "[PATCH RFC
>> 0/7] ARM: shmobile: sh73a0: DT PM domain support"
>> (https://lkml.org/lkml/2014/11/19/404).
>> Changes since v1 (more detailed changelogs in the individual patches):
>>   - Factored out addition of the memory-controller in a separate
>>     series.
>>
>> Dependencies:
>>   1. Patches 1-4 (DT binding doc, C code) depend on:
>>        a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
>>           renesas-dt-pm-for-v3.20 of Simon's repository,
>
> In response to a request from Olof renesas-dt-pm-for-v3.20 has been
> withdrawn and the patches split between the soc-for-v3.20 and dt-for-v3.20
> branches. I am assuming that the patches that 1-4 depend on are
> now all in the soc-for-v3.20 branch. Could you check?

OK, soc-for-v3.20 now.

>>        b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
>>          code"
>>          (http://www.spinics.net/lists/arm-kernel/msg391084.html),
>
> FWIW, I have squashed that patch into the patch that adds the problem
> and the result is in the soc-for-v3.20. I will to push that result
> a little later today.

Thanks!

>>   2. Patch 5 (dtsi) depends on:
>>        a. The multiplatform work for sh73a0, queued in branch
>>           sh73a0-multiplatform-for-v3.20 of Simon's repository,
>>        b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
>>           controllers"
>>         (http://marc.info/?l=linux-sh&m=142123399414888).
>
> This may be awkward to get into v3.20 unless we can adopt a looser approach
> to the dependencies.
>
> To that end I suggest that it could be queued up in the branch that has the
> multiplatform work (a) but not the memory controller work (b) as the latter
> seems to more naturally fit into the dt branch. What I am hoping that such
> an approach would lead to code that compiles and boots in both branches.
> And that new functionality becomes available when the branched are combined
> (e.g. in v3.20-rcX).

"ARM: shmobile: sh73a0 dtsi: Add PM domain support" relies on the clocks
properties already being present on all device nodes (incl. the Bus State
Controller), hence it depends on sh73a0-multiplatform-for-v3.20.
"ARM: shmobile: sh73a0 dtsi: Add PM domain support" adds a power-domains
property to the memory-controller node, so it depends on that, too.

Leaving the memory-controller part out makes it unbootable, as the
memory-controller will be powered down when PM domains become
activated. Yes, hardware power domains are even more fun than (common)
clocks when trying to split the commits across multiple branches ;-)

> If this is not possible then I can merge the pre-requisites and put
> patch 5 on top. But I feel that the ARM SoC maintainers would prefer
> that I didn't do that unless it is absolutely necessary.

Merging dt-for-v3.20 into sh73a0-multiplatform-for-v3.20 before applying
patch 5 seems like the only sensible solution.

As soon as that gets combined with soc-for-v3.20, the PM domains are
activated, and patch 6 can be applied.

> In case you are wondering: branch gymnastics are not my favourite pass time :^)
>
>>   3. Patch 6 (drivers/sh) depends on all of the above.
>
> That part is clear enough :)
>
> My intention here is to send a pull request to Linus for this change
> once all the other patches have hit his tree. With a bit of luck that
> would be around v3.20-rc2.

OK, that would be appied to sh-drivers-for-v3.20, right?

Thanks a lot!
My local patch queue has shrunk considerably during the last few days...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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

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

* [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-15  9:32     ` Geert Uytterhoeven
  0 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-15  9:32 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

On Thu, Jan 15, 2015 at 12:53 AM, Simon Horman <horms@verge.net.au> wrote:
> On Wed, Jan 14, 2015 at 01:11:18PM +0100, Geert Uytterhoeven wrote:
>> This patch series enables DT support for PM domains on the Renesas
>> SH-Mobile AG5 (sh73a0) SoC.
>>
>> This series builds further on the DT PM Domain support for R-Mobile A1
>> (r8a7740).  Due to the similarity of the SYSC System-Controller on the
>> various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
>> DT, the same driver can handle sh73a0 after some small modifications,
>> without changing the DT bindings.
>>
>> Compared to r8a7740, the only significant change is the move of the
>> memory-controller(s) to separate PM domains on sh73a0 (and also on
>> R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
>> these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
>> shmobile: Add DT support for memory controllers" I've just sent.
>>
>> This series has been sent before, as part of the series "[PATCH RFC
>> 0/7] ARM: shmobile: sh73a0: DT PM domain support"
>> (https://lkml.org/lkml/2014/11/19/404).
>> Changes since v1 (more detailed changelogs in the individual patches):
>>   - Factored out addition of the memory-controller in a separate
>>     series.
>>
>> Dependencies:
>>   1. Patches 1-4 (DT binding doc, C code) depend on:
>>        a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
>>           renesas-dt-pm-for-v3.20 of Simon's repository,
>
> In response to a request from Olof renesas-dt-pm-for-v3.20 has been
> withdrawn and the patches split between the soc-for-v3.20 and dt-for-v3.20
> branches. I am assuming that the patches that 1-4 depend on are
> now all in the soc-for-v3.20 branch. Could you check?

OK, soc-for-v3.20 now.

>>        b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
>>          code"
>>          (http://www.spinics.net/lists/arm-kernel/msg391084.html),
>
> FWIW, I have squashed that patch into the patch that adds the problem
> and the result is in the soc-for-v3.20. I will to push that result
> a little later today.

Thanks!

>>   2. Patch 5 (dtsi) depends on:
>>        a. The multiplatform work for sh73a0, queued in branch
>>           sh73a0-multiplatform-for-v3.20 of Simon's repository,
>>        b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
>>           controllers"
>>         (http://marc.info/?l=linux-sh&m=142123399414888).
>
> This may be awkward to get into v3.20 unless we can adopt a looser approach
> to the dependencies.
>
> To that end I suggest that it could be queued up in the branch that has the
> multiplatform work (a) but not the memory controller work (b) as the latter
> seems to more naturally fit into the dt branch. What I am hoping that such
> an approach would lead to code that compiles and boots in both branches.
> And that new functionality becomes available when the branched are combined
> (e.g. in v3.20-rcX).

"ARM: shmobile: sh73a0 dtsi: Add PM domain support" relies on the clocks
properties already being present on all device nodes (incl. the Bus State
Controller), hence it depends on sh73a0-multiplatform-for-v3.20.
"ARM: shmobile: sh73a0 dtsi: Add PM domain support" adds a power-domains
property to the memory-controller node, so it depends on that, too.

Leaving the memory-controller part out makes it unbootable, as the
memory-controller will be powered down when PM domains become
activated. Yes, hardware power domains are even more fun than (common)
clocks when trying to split the commits across multiple branches ;-)

> If this is not possible then I can merge the pre-requisites and put
> patch 5 on top. But I feel that the ARM SoC maintainers would prefer
> that I didn't do that unless it is absolutely necessary.

Merging dt-for-v3.20 into sh73a0-multiplatform-for-v3.20 before applying
patch 5 seems like the only sensible solution.

As soon as that gets combined with soc-for-v3.20, the PM domains are
activated, and patch 6 can be applied.

> In case you are wondering: branch gymnastics are not my favourite pass time :^)
>
>>   3. Patch 6 (drivers/sh) depends on all of the above.
>
> That part is clear enough :)
>
> My intention here is to send a pull request to Linus for this change
> once all the other patches have hit his tree. With a bit of luck that
> would be around v3.20-rc2.

OK, that would be appied to sh-drivers-for-v3.20, right?

Thanks a lot!
My local patch queue has shrunk considerably during the last few days...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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

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

* Re: [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
  2015-01-15  9:32     ` Geert Uytterhoeven
  (?)
@ 2015-01-16  1:13       ` Simon Horman
  -1 siblings, 0 replies; 51+ messages in thread
From: Simon Horman @ 2015-01-16  1:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jan 15, 2015 at 10:32:23AM +0100, Geert Uytterhoeven wrote:
> Hi Simon,
> 
> On Thu, Jan 15, 2015 at 12:53 AM, Simon Horman <horms@verge.net.au> wrote:
> > On Wed, Jan 14, 2015 at 01:11:18PM +0100, Geert Uytterhoeven wrote:
> >> This patch series enables DT support for PM domains on the Renesas
> >> SH-Mobile AG5 (sh73a0) SoC.
> >>
> >> This series builds further on the DT PM Domain support for R-Mobile A1
> >> (r8a7740).  Due to the similarity of the SYSC System-Controller on the
> >> various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
> >> DT, the same driver can handle sh73a0 after some small modifications,
> >> without changing the DT bindings.
> >>
> >> Compared to r8a7740, the only significant change is the move of the
> >> memory-controller(s) to separate PM domains on sh73a0 (and also on
> >> R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
> >> these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
> >> shmobile: Add DT support for memory controllers" I've just sent.
> >>
> >> This series has been sent before, as part of the series "[PATCH RFC
> >> 0/7] ARM: shmobile: sh73a0: DT PM domain support"
> >> (https://lkml.org/lkml/2014/11/19/404).
> >> Changes since v1 (more detailed changelogs in the individual patches):
> >>   - Factored out addition of the memory-controller in a separate
> >>     series.
> >>
> >> Dependencies:
> >>   1. Patches 1-4 (DT binding doc, C code) depend on:
> >>        a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
> >>           renesas-dt-pm-for-v3.20 of Simon's repository,
> >
> > In response to a request from Olof renesas-dt-pm-for-v3.20 has been
> > withdrawn and the patches split between the soc-for-v3.20 and dt-for-v3.20
> > branches. I am assuming that the patches that 1-4 depend on are
> > now all in the soc-for-v3.20 branch. Could you check?
> 
> OK, soc-for-v3.20 now.
> 
> >>        b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
> >>          code"
> >>          (http://www.spinics.net/lists/arm-kernel/msg391084.html),
> >
> > FWIW, I have squashed that patch into the patch that adds the problem
> > and the result is in the soc-for-v3.20. I will to push that result
> > a little later today.
> 
> Thanks!
> 
> >>   2. Patch 5 (dtsi) depends on:
> >>        a. The multiplatform work for sh73a0, queued in branch
> >>           sh73a0-multiplatform-for-v3.20 of Simon's repository,
> >>        b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
> >>           controllers"
> >>         (http://marc.info/?l=linux-sh&m\x142123399414888).
> >
> > This may be awkward to get into v3.20 unless we can adopt a looser approach
> > to the dependencies.
> >
> > To that end I suggest that it could be queued up in the branch that has the
> > multiplatform work (a) but not the memory controller work (b) as the latter
> > seems to more naturally fit into the dt branch. What I am hoping that such
> > an approach would lead to code that compiles and boots in both branches.
> > And that new functionality becomes available when the branched are combined
> > (e.g. in v3.20-rcX).
> 
> "ARM: shmobile: sh73a0 dtsi: Add PM domain support" relies on the clocks
> properties already being present on all device nodes (incl. the Bus State
> Controller), hence it depends on sh73a0-multiplatform-for-v3.20.
> "ARM: shmobile: sh73a0 dtsi: Add PM domain support" adds a power-domains
> property to the memory-controller node, so it depends on that, too.
> 
> Leaving the memory-controller part out makes it unbootable, as the
> memory-controller will be powered down when PM domains become
> activated. Yes, hardware power domains are even more fun than (common)
> clocks when trying to split the commits across multiple branches ;-)
> 
> > If this is not possible then I can merge the pre-requisites and put
> > patch 5 on top. But I feel that the ARM SoC maintainers would prefer
> > that I didn't do that unless it is absolutely necessary.
> 
> Merging dt-for-v3.20 into sh73a0-multiplatform-for-v3.20 before applying
> patch 5 seems like the only sensible solution.

Thanks, I understand. I'll see about making it so.

> As soon as that gets combined with soc-for-v3.20, the PM domains are
> activated, and patch 6 can be applied.

Got it.

> > In case you are wondering: branch gymnastics are not my favourite pass time :^)
> >
> >>   3. Patch 6 (drivers/sh) depends on all of the above.
> >
> > That part is clear enough :)
> >
> > My intention here is to send a pull request to Linus for this change
> > once all the other patches have hit his tree. With a bit of luck that
> > would be around v3.20-rc2.
> 
> OK, that would be appied to sh-drivers-for-v3.20, right?

Yes, thats right.

> Thanks a lot!
> My local patch queue has shrunk considerably during the last few days...

:^)

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

* Re: [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-16  1:13       ` Simon Horman
  0 siblings, 0 replies; 51+ messages in thread
From: Simon Horman @ 2015-01-16  1:13 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Geert Uytterhoeven, Magnus Damm, Linux-sh list, Linux PM list,
	linux-arm-kernel, devicetree

On Thu, Jan 15, 2015 at 10:32:23AM +0100, Geert Uytterhoeven wrote:
> Hi Simon,
> 
> On Thu, Jan 15, 2015 at 12:53 AM, Simon Horman <horms@verge.net.au> wrote:
> > On Wed, Jan 14, 2015 at 01:11:18PM +0100, Geert Uytterhoeven wrote:
> >> This patch series enables DT support for PM domains on the Renesas
> >> SH-Mobile AG5 (sh73a0) SoC.
> >>
> >> This series builds further on the DT PM Domain support for R-Mobile A1
> >> (r8a7740).  Due to the similarity of the SYSC System-Controller on the
> >> various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
> >> DT, the same driver can handle sh73a0 after some small modifications,
> >> without changing the DT bindings.
> >>
> >> Compared to r8a7740, the only significant change is the move of the
> >> memory-controller(s) to separate PM domains on sh73a0 (and also on
> >> R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
> >> these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
> >> shmobile: Add DT support for memory controllers" I've just sent.
> >>
> >> This series has been sent before, as part of the series "[PATCH RFC
> >> 0/7] ARM: shmobile: sh73a0: DT PM domain support"
> >> (https://lkml.org/lkml/2014/11/19/404).
> >> Changes since v1 (more detailed changelogs in the individual patches):
> >>   - Factored out addition of the memory-controller in a separate
> >>     series.
> >>
> >> Dependencies:
> >>   1. Patches 1-4 (DT binding doc, C code) depend on:
> >>        a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
> >>           renesas-dt-pm-for-v3.20 of Simon's repository,
> >
> > In response to a request from Olof renesas-dt-pm-for-v3.20 has been
> > withdrawn and the patches split between the soc-for-v3.20 and dt-for-v3.20
> > branches. I am assuming that the patches that 1-4 depend on are
> > now all in the soc-for-v3.20 branch. Could you check?
> 
> OK, soc-for-v3.20 now.
> 
> >>        b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
> >>          code"
> >>          (http://www.spinics.net/lists/arm-kernel/msg391084.html),
> >
> > FWIW, I have squashed that patch into the patch that adds the problem
> > and the result is in the soc-for-v3.20. I will to push that result
> > a little later today.
> 
> Thanks!
> 
> >>   2. Patch 5 (dtsi) depends on:
> >>        a. The multiplatform work for sh73a0, queued in branch
> >>           sh73a0-multiplatform-for-v3.20 of Simon's repository,
> >>        b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
> >>           controllers"
> >>         (http://marc.info/?l=linux-sh&m=142123399414888).
> >
> > This may be awkward to get into v3.20 unless we can adopt a looser approach
> > to the dependencies.
> >
> > To that end I suggest that it could be queued up in the branch that has the
> > multiplatform work (a) but not the memory controller work (b) as the latter
> > seems to more naturally fit into the dt branch. What I am hoping that such
> > an approach would lead to code that compiles and boots in both branches.
> > And that new functionality becomes available when the branched are combined
> > (e.g. in v3.20-rcX).
> 
> "ARM: shmobile: sh73a0 dtsi: Add PM domain support" relies on the clocks
> properties already being present on all device nodes (incl. the Bus State
> Controller), hence it depends on sh73a0-multiplatform-for-v3.20.
> "ARM: shmobile: sh73a0 dtsi: Add PM domain support" adds a power-domains
> property to the memory-controller node, so it depends on that, too.
> 
> Leaving the memory-controller part out makes it unbootable, as the
> memory-controller will be powered down when PM domains become
> activated. Yes, hardware power domains are even more fun than (common)
> clocks when trying to split the commits across multiple branches ;-)
> 
> > If this is not possible then I can merge the pre-requisites and put
> > patch 5 on top. But I feel that the ARM SoC maintainers would prefer
> > that I didn't do that unless it is absolutely necessary.
> 
> Merging dt-for-v3.20 into sh73a0-multiplatform-for-v3.20 before applying
> patch 5 seems like the only sensible solution.

Thanks, I understand. I'll see about making it so.

> As soon as that gets combined with soc-for-v3.20, the PM domains are
> activated, and patch 6 can be applied.

Got it.

> > In case you are wondering: branch gymnastics are not my favourite pass time :^)
> >
> >>   3. Patch 6 (drivers/sh) depends on all of the above.
> >
> > That part is clear enough :)
> >
> > My intention here is to send a pull request to Linus for this change
> > once all the other patches have hit his tree. With a bit of luck that
> > would be around v3.20-rc2.
> 
> OK, that would be appied to sh-drivers-for-v3.20, right?

Yes, thats right.

> Thanks a lot!
> My local patch queue has shrunk considerably during the last few days...

:^)

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

* [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-16  1:13       ` Simon Horman
  0 siblings, 0 replies; 51+ messages in thread
From: Simon Horman @ 2015-01-16  1:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jan 15, 2015 at 10:32:23AM +0100, Geert Uytterhoeven wrote:
> Hi Simon,
> 
> On Thu, Jan 15, 2015 at 12:53 AM, Simon Horman <horms@verge.net.au> wrote:
> > On Wed, Jan 14, 2015 at 01:11:18PM +0100, Geert Uytterhoeven wrote:
> >> This patch series enables DT support for PM domains on the Renesas
> >> SH-Mobile AG5 (sh73a0) SoC.
> >>
> >> This series builds further on the DT PM Domain support for R-Mobile A1
> >> (r8a7740).  Due to the similarity of the SYSC System-Controller on the
> >> various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
> >> DT, the same driver can handle sh73a0 after some small modifications,
> >> without changing the DT bindings.
> >>
> >> Compared to r8a7740, the only significant change is the move of the
> >> memory-controller(s) to separate PM domains on sh73a0 (and also on
> >> R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
> >> these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
> >> shmobile: Add DT support for memory controllers" I've just sent.
> >>
> >> This series has been sent before, as part of the series "[PATCH RFC
> >> 0/7] ARM: shmobile: sh73a0: DT PM domain support"
> >> (https://lkml.org/lkml/2014/11/19/404).
> >> Changes since v1 (more detailed changelogs in the individual patches):
> >>   - Factored out addition of the memory-controller in a separate
> >>     series.
> >>
> >> Dependencies:
> >>   1. Patches 1-4 (DT binding doc, C code) depend on:
> >>        a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
> >>           renesas-dt-pm-for-v3.20 of Simon's repository,
> >
> > In response to a request from Olof renesas-dt-pm-for-v3.20 has been
> > withdrawn and the patches split between the soc-for-v3.20 and dt-for-v3.20
> > branches. I am assuming that the patches that 1-4 depend on are
> > now all in the soc-for-v3.20 branch. Could you check?
> 
> OK, soc-for-v3.20 now.
> 
> >>        b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
> >>          code"
> >>          (http://www.spinics.net/lists/arm-kernel/msg391084.html),
> >
> > FWIW, I have squashed that patch into the patch that adds the problem
> > and the result is in the soc-for-v3.20. I will to push that result
> > a little later today.
> 
> Thanks!
> 
> >>   2. Patch 5 (dtsi) depends on:
> >>        a. The multiplatform work for sh73a0, queued in branch
> >>           sh73a0-multiplatform-for-v3.20 of Simon's repository,
> >>        b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
> >>           controllers"
> >>         (http://marc.info/?l=linux-sh&m=142123399414888).
> >
> > This may be awkward to get into v3.20 unless we can adopt a looser approach
> > to the dependencies.
> >
> > To that end I suggest that it could be queued up in the branch that has the
> > multiplatform work (a) but not the memory controller work (b) as the latter
> > seems to more naturally fit into the dt branch. What I am hoping that such
> > an approach would lead to code that compiles and boots in both branches.
> > And that new functionality becomes available when the branched are combined
> > (e.g. in v3.20-rcX).
> 
> "ARM: shmobile: sh73a0 dtsi: Add PM domain support" relies on the clocks
> properties already being present on all device nodes (incl. the Bus State
> Controller), hence it depends on sh73a0-multiplatform-for-v3.20.
> "ARM: shmobile: sh73a0 dtsi: Add PM domain support" adds a power-domains
> property to the memory-controller node, so it depends on that, too.
> 
> Leaving the memory-controller part out makes it unbootable, as the
> memory-controller will be powered down when PM domains become
> activated. Yes, hardware power domains are even more fun than (common)
> clocks when trying to split the commits across multiple branches ;-)
> 
> > If this is not possible then I can merge the pre-requisites and put
> > patch 5 on top. But I feel that the ARM SoC maintainers would prefer
> > that I didn't do that unless it is absolutely necessary.
> 
> Merging dt-for-v3.20 into sh73a0-multiplatform-for-v3.20 before applying
> patch 5 seems like the only sensible solution.

Thanks, I understand. I'll see about making it so.

> As soon as that gets combined with soc-for-v3.20, the PM domains are
> activated, and patch 6 can be applied.

Got it.

> > In case you are wondering: branch gymnastics are not my favourite pass time :^)
> >
> >>   3. Patch 6 (drivers/sh) depends on all of the above.
> >
> > That part is clear enough :)
> >
> > My intention here is to send a pull request to Linus for this change
> > once all the other patches have hit his tree. With a bit of luck that
> > would be around v3.20-rc2.
> 
> OK, that would be appied to sh-drivers-for-v3.20, right?

Yes, thats right.

> Thanks a lot!
> My local patch queue has shrunk considerably during the last few days...

:^)

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

* Re: [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
  2015-01-16  1:13       ` Simon Horman
  (?)
@ 2015-01-16  2:47         ` Simon Horman
  -1 siblings, 0 replies; 51+ messages in thread
From: Simon Horman @ 2015-01-16  2:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 16, 2015 at 10:13:15AM +0900, Simon Horman wrote:
> On Thu, Jan 15, 2015 at 10:32:23AM +0100, Geert Uytterhoeven wrote:
> > Hi Simon,
> > 
> > On Thu, Jan 15, 2015 at 12:53 AM, Simon Horman <horms@verge.net.au> wrote:
> > > On Wed, Jan 14, 2015 at 01:11:18PM +0100, Geert Uytterhoeven wrote:
> > >> This patch series enables DT support for PM domains on the Renesas
> > >> SH-Mobile AG5 (sh73a0) SoC.
> > >>
> > >> This series builds further on the DT PM Domain support for R-Mobile A1
> > >> (r8a7740).  Due to the similarity of the SYSC System-Controller on the
> > >> various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
> > >> DT, the same driver can handle sh73a0 after some small modifications,
> > >> without changing the DT bindings.
> > >>
> > >> Compared to r8a7740, the only significant change is the move of the
> > >> memory-controller(s) to separate PM domains on sh73a0 (and also on
> > >> R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
> > >> these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
> > >> shmobile: Add DT support for memory controllers" I've just sent.
> > >>
> > >> This series has been sent before, as part of the series "[PATCH RFC
> > >> 0/7] ARM: shmobile: sh73a0: DT PM domain support"
> > >> (https://lkml.org/lkml/2014/11/19/404).
> > >> Changes since v1 (more detailed changelogs in the individual patches):
> > >>   - Factored out addition of the memory-controller in a separate
> > >>     series.
> > >>
> > >> Dependencies:
> > >>   1. Patches 1-4 (DT binding doc, C code) depend on:
> > >>        a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
> > >>           renesas-dt-pm-for-v3.20 of Simon's repository,
> > >
> > > In response to a request from Olof renesas-dt-pm-for-v3.20 has been
> > > withdrawn and the patches split between the soc-for-v3.20 and dt-for-v3.20
> > > branches. I am assuming that the patches that 1-4 depend on are
> > > now all in the soc-for-v3.20 branch. Could you check?
> > 
> > OK, soc-for-v3.20 now.
> > 
> > >>        b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
> > >>          code"
> > >>          (http://www.spinics.net/lists/arm-kernel/msg391084.html),
> > >
> > > FWIW, I have squashed that patch into the patch that adds the problem
> > > and the result is in the soc-for-v3.20. I will to push that result
> > > a little later today.
> > 
> > Thanks!
> > 
> > >>   2. Patch 5 (dtsi) depends on:
> > >>        a. The multiplatform work for sh73a0, queued in branch
> > >>           sh73a0-multiplatform-for-v3.20 of Simon's repository,
> > >>        b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
> > >>           controllers"
> > >>         (http://marc.info/?l=linux-sh&m\x142123399414888).
> > >
> > > This may be awkward to get into v3.20 unless we can adopt a looser approach
> > > to the dependencies.
> > >
> > > To that end I suggest that it could be queued up in the branch that has the
> > > multiplatform work (a) but not the memory controller work (b) as the latter
> > > seems to more naturally fit into the dt branch. What I am hoping that such
> > > an approach would lead to code that compiles and boots in both branches.
> > > And that new functionality becomes available when the branched are combined
> > > (e.g. in v3.20-rcX).
> > 
> > "ARM: shmobile: sh73a0 dtsi: Add PM domain support" relies on the clocks
> > properties already being present on all device nodes (incl. the Bus State
> > Controller), hence it depends on sh73a0-multiplatform-for-v3.20.
> > "ARM: shmobile: sh73a0 dtsi: Add PM domain support" adds a power-domains
> > property to the memory-controller node, so it depends on that, too.
> > 
> > Leaving the memory-controller part out makes it unbootable, as the
> > memory-controller will be powered down when PM domains become
> > activated. Yes, hardware power domains are even more fun than (common)
> > clocks when trying to split the commits across multiple branches ;-)
> > 
> > > If this is not possible then I can merge the pre-requisites and put
> > > patch 5 on top. But I feel that the ARM SoC maintainers would prefer
> > > that I didn't do that unless it is absolutely necessary.
> > 
> > Merging dt-for-v3.20 into sh73a0-multiplatform-for-v3.20 before applying
> > patch 5 seems like the only sensible solution.
> 
> Thanks, I understand. I'll see about making it so.
> 
> > As soon as that gets combined with soc-for-v3.20, the PM domains are
> > activated, and patch 6 can be applied.
> 
> Got it.
> 
> > > In case you are wondering: branch gymnastics are not my favourite pass time :^)
> > >
> > >>   3. Patch 6 (drivers/sh) depends on all of the above.
> > >
> > > That part is clear enough :)
> > >
> > > My intention here is to send a pull request to Linus for this change
> > > once all the other patches have hit his tree. With a bit of luck that
> > > would be around v3.20-rc2.
> > 
> > OK, that would be appied to sh-drivers-for-v3.20, right?
> 
> Yes, thats right.
> 
> > Thanks a lot!
> > My local patch queue has shrunk considerably during the last few days...
> 
> :^)

Please take a look at renesas-next-20150115-v3.19-rc1.
This series should be queued-up there.

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

* Re: [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-16  2:47         ` Simon Horman
  0 siblings, 0 replies; 51+ messages in thread
From: Simon Horman @ 2015-01-16  2:47 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Geert Uytterhoeven, Magnus Damm, Linux-sh list, Linux PM list,
	linux-arm-kernel, devicetree

On Fri, Jan 16, 2015 at 10:13:15AM +0900, Simon Horman wrote:
> On Thu, Jan 15, 2015 at 10:32:23AM +0100, Geert Uytterhoeven wrote:
> > Hi Simon,
> > 
> > On Thu, Jan 15, 2015 at 12:53 AM, Simon Horman <horms@verge.net.au> wrote:
> > > On Wed, Jan 14, 2015 at 01:11:18PM +0100, Geert Uytterhoeven wrote:
> > >> This patch series enables DT support for PM domains on the Renesas
> > >> SH-Mobile AG5 (sh73a0) SoC.
> > >>
> > >> This series builds further on the DT PM Domain support for R-Mobile A1
> > >> (r8a7740).  Due to the similarity of the SYSC System-Controller on the
> > >> various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
> > >> DT, the same driver can handle sh73a0 after some small modifications,
> > >> without changing the DT bindings.
> > >>
> > >> Compared to r8a7740, the only significant change is the move of the
> > >> memory-controller(s) to separate PM domains on sh73a0 (and also on
> > >> R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
> > >> these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
> > >> shmobile: Add DT support for memory controllers" I've just sent.
> > >>
> > >> This series has been sent before, as part of the series "[PATCH RFC
> > >> 0/7] ARM: shmobile: sh73a0: DT PM domain support"
> > >> (https://lkml.org/lkml/2014/11/19/404).
> > >> Changes since v1 (more detailed changelogs in the individual patches):
> > >>   - Factored out addition of the memory-controller in a separate
> > >>     series.
> > >>
> > >> Dependencies:
> > >>   1. Patches 1-4 (DT binding doc, C code) depend on:
> > >>        a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
> > >>           renesas-dt-pm-for-v3.20 of Simon's repository,
> > >
> > > In response to a request from Olof renesas-dt-pm-for-v3.20 has been
> > > withdrawn and the patches split between the soc-for-v3.20 and dt-for-v3.20
> > > branches. I am assuming that the patches that 1-4 depend on are
> > > now all in the soc-for-v3.20 branch. Could you check?
> > 
> > OK, soc-for-v3.20 now.
> > 
> > >>        b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
> > >>          code"
> > >>          (http://www.spinics.net/lists/arm-kernel/msg391084.html),
> > >
> > > FWIW, I have squashed that patch into the patch that adds the problem
> > > and the result is in the soc-for-v3.20. I will to push that result
> > > a little later today.
> > 
> > Thanks!
> > 
> > >>   2. Patch 5 (dtsi) depends on:
> > >>        a. The multiplatform work for sh73a0, queued in branch
> > >>           sh73a0-multiplatform-for-v3.20 of Simon's repository,
> > >>        b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
> > >>           controllers"
> > >>         (http://marc.info/?l=linux-sh&m=142123399414888).
> > >
> > > This may be awkward to get into v3.20 unless we can adopt a looser approach
> > > to the dependencies.
> > >
> > > To that end I suggest that it could be queued up in the branch that has the
> > > multiplatform work (a) but not the memory controller work (b) as the latter
> > > seems to more naturally fit into the dt branch. What I am hoping that such
> > > an approach would lead to code that compiles and boots in both branches.
> > > And that new functionality becomes available when the branched are combined
> > > (e.g. in v3.20-rcX).
> > 
> > "ARM: shmobile: sh73a0 dtsi: Add PM domain support" relies on the clocks
> > properties already being present on all device nodes (incl. the Bus State
> > Controller), hence it depends on sh73a0-multiplatform-for-v3.20.
> > "ARM: shmobile: sh73a0 dtsi: Add PM domain support" adds a power-domains
> > property to the memory-controller node, so it depends on that, too.
> > 
> > Leaving the memory-controller part out makes it unbootable, as the
> > memory-controller will be powered down when PM domains become
> > activated. Yes, hardware power domains are even more fun than (common)
> > clocks when trying to split the commits across multiple branches ;-)
> > 
> > > If this is not possible then I can merge the pre-requisites and put
> > > patch 5 on top. But I feel that the ARM SoC maintainers would prefer
> > > that I didn't do that unless it is absolutely necessary.
> > 
> > Merging dt-for-v3.20 into sh73a0-multiplatform-for-v3.20 before applying
> > patch 5 seems like the only sensible solution.
> 
> Thanks, I understand. I'll see about making it so.
> 
> > As soon as that gets combined with soc-for-v3.20, the PM domains are
> > activated, and patch 6 can be applied.
> 
> Got it.
> 
> > > In case you are wondering: branch gymnastics are not my favourite pass time :^)
> > >
> > >>   3. Patch 6 (drivers/sh) depends on all of the above.
> > >
> > > That part is clear enough :)
> > >
> > > My intention here is to send a pull request to Linus for this change
> > > once all the other patches have hit his tree. With a bit of luck that
> > > would be around v3.20-rc2.
> > 
> > OK, that would be appied to sh-drivers-for-v3.20, right?
> 
> Yes, thats right.
> 
> > Thanks a lot!
> > My local patch queue has shrunk considerably during the last few days...
> 
> :^)

Please take a look at renesas-next-20150115-v3.19-rc1.
This series should be queued-up there.

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

* [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-16  2:47         ` Simon Horman
  0 siblings, 0 replies; 51+ messages in thread
From: Simon Horman @ 2015-01-16  2:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 16, 2015 at 10:13:15AM +0900, Simon Horman wrote:
> On Thu, Jan 15, 2015 at 10:32:23AM +0100, Geert Uytterhoeven wrote:
> > Hi Simon,
> > 
> > On Thu, Jan 15, 2015 at 12:53 AM, Simon Horman <horms@verge.net.au> wrote:
> > > On Wed, Jan 14, 2015 at 01:11:18PM +0100, Geert Uytterhoeven wrote:
> > >> This patch series enables DT support for PM domains on the Renesas
> > >> SH-Mobile AG5 (sh73a0) SoC.
> > >>
> > >> This series builds further on the DT PM Domain support for R-Mobile A1
> > >> (r8a7740).  Due to the similarity of the SYSC System-Controller on the
> > >> various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
> > >> DT, the same driver can handle sh73a0 after some small modifications,
> > >> without changing the DT bindings.
> > >>
> > >> Compared to r8a7740, the only significant change is the move of the
> > >> memory-controller(s) to separate PM domains on sh73a0 (and also on
> > >> R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
> > >> these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
> > >> shmobile: Add DT support for memory controllers" I've just sent.
> > >>
> > >> This series has been sent before, as part of the series "[PATCH RFC
> > >> 0/7] ARM: shmobile: sh73a0: DT PM domain support"
> > >> (https://lkml.org/lkml/2014/11/19/404).
> > >> Changes since v1 (more detailed changelogs in the individual patches):
> > >>   - Factored out addition of the memory-controller in a separate
> > >>     series.
> > >>
> > >> Dependencies:
> > >>   1. Patches 1-4 (DT binding doc, C code) depend on:
> > >>        a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
> > >>           renesas-dt-pm-for-v3.20 of Simon's repository,
> > >
> > > In response to a request from Olof renesas-dt-pm-for-v3.20 has been
> > > withdrawn and the patches split between the soc-for-v3.20 and dt-for-v3.20
> > > branches. I am assuming that the patches that 1-4 depend on are
> > > now all in the soc-for-v3.20 branch. Could you check?
> > 
> > OK, soc-for-v3.20 now.
> > 
> > >>        b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
> > >>          code"
> > >>          (http://www.spinics.net/lists/arm-kernel/msg391084.html),
> > >
> > > FWIW, I have squashed that patch into the patch that adds the problem
> > > and the result is in the soc-for-v3.20. I will to push that result
> > > a little later today.
> > 
> > Thanks!
> > 
> > >>   2. Patch 5 (dtsi) depends on:
> > >>        a. The multiplatform work for sh73a0, queued in branch
> > >>           sh73a0-multiplatform-for-v3.20 of Simon's repository,
> > >>        b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
> > >>           controllers"
> > >>         (http://marc.info/?l=linux-sh&m=142123399414888).
> > >
> > > This may be awkward to get into v3.20 unless we can adopt a looser approach
> > > to the dependencies.
> > >
> > > To that end I suggest that it could be queued up in the branch that has the
> > > multiplatform work (a) but not the memory controller work (b) as the latter
> > > seems to more naturally fit into the dt branch. What I am hoping that such
> > > an approach would lead to code that compiles and boots in both branches.
> > > And that new functionality becomes available when the branched are combined
> > > (e.g. in v3.20-rcX).
> > 
> > "ARM: shmobile: sh73a0 dtsi: Add PM domain support" relies on the clocks
> > properties already being present on all device nodes (incl. the Bus State
> > Controller), hence it depends on sh73a0-multiplatform-for-v3.20.
> > "ARM: shmobile: sh73a0 dtsi: Add PM domain support" adds a power-domains
> > property to the memory-controller node, so it depends on that, too.
> > 
> > Leaving the memory-controller part out makes it unbootable, as the
> > memory-controller will be powered down when PM domains become
> > activated. Yes, hardware power domains are even more fun than (common)
> > clocks when trying to split the commits across multiple branches ;-)
> > 
> > > If this is not possible then I can merge the pre-requisites and put
> > > patch 5 on top. But I feel that the ARM SoC maintainers would prefer
> > > that I didn't do that unless it is absolutely necessary.
> > 
> > Merging dt-for-v3.20 into sh73a0-multiplatform-for-v3.20 before applying
> > patch 5 seems like the only sensible solution.
> 
> Thanks, I understand. I'll see about making it so.
> 
> > As soon as that gets combined with soc-for-v3.20, the PM domains are
> > activated, and patch 6 can be applied.
> 
> Got it.
> 
> > > In case you are wondering: branch gymnastics are not my favourite pass time :^)
> > >
> > >>   3. Patch 6 (drivers/sh) depends on all of the above.
> > >
> > > That part is clear enough :)
> > >
> > > My intention here is to send a pull request to Linus for this change
> > > once all the other patches have hit his tree. With a bit of luck that
> > > would be around v3.20-rc2.
> > 
> > OK, that would be appied to sh-drivers-for-v3.20, right?
> 
> Yes, thats right.
> 
> > Thanks a lot!
> > My local patch queue has shrunk considerably during the last few days...
> 
> :^)

Please take a look at renesas-next-20150115-v3.19-rc1.
This series should be queued-up there.

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

* Re: [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
  2015-01-16  2:47         ` Simon Horman
  (?)
@ 2015-01-16  9:51           ` Geert Uytterhoeven
  -1 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-16  9:51 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

On Fri, Jan 16, 2015 at 3:47 AM, Simon Horman <horms@verge.net.au> wrote:
> On Fri, Jan 16, 2015 at 10:13:15AM +0900, Simon Horman wrote:
>> On Thu, Jan 15, 2015 at 10:32:23AM +0100, Geert Uytterhoeven wrote:
>> > On Thu, Jan 15, 2015 at 12:53 AM, Simon Horman <horms@verge.net.au> wrote:
>> > > On Wed, Jan 14, 2015 at 01:11:18PM +0100, Geert Uytterhoeven wrote:
>> > >> This patch series enables DT support for PM domains on the Renesas
>> > >> SH-Mobile AG5 (sh73a0) SoC.
>> > >>
>> > >> This series builds further on the DT PM Domain support for R-Mobile A1
>> > >> (r8a7740).  Due to the similarity of the SYSC System-Controller on the
>> > >> various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
>> > >> DT, the same driver can handle sh73a0 after some small modifications,
>> > >> without changing the DT bindings.
>> > >>
>> > >> Compared to r8a7740, the only significant change is the move of the
>> > >> memory-controller(s) to separate PM domains on sh73a0 (and also on
>> > >> R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
>> > >> these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
>> > >> shmobile: Add DT support for memory controllers" I've just sent.
>> > >>
>> > >> This series has been sent before, as part of the series "[PATCH RFC
>> > >> 0/7] ARM: shmobile: sh73a0: DT PM domain support"
>> > >> (https://lkml.org/lkml/2014/11/19/404).
>> > >> Changes since v1 (more detailed changelogs in the individual patches):
>> > >>   - Factored out addition of the memory-controller in a separate
>> > >>     series.
>> > >>
>> > >> Dependencies:
>> > >>   1. Patches 1-4 (DT binding doc, C code) depend on:
>> > >>        a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
>> > >>           renesas-dt-pm-for-v3.20 of Simon's repository,
>> > >
>> > > In response to a request from Olof renesas-dt-pm-for-v3.20 has been
>> > > withdrawn and the patches split between the soc-for-v3.20 and dt-for-v3.20
>> > > branches. I am assuming that the patches that 1-4 depend on are
>> > > now all in the soc-for-v3.20 branch. Could you check?
>> >
>> > OK, soc-for-v3.20 now.
>> >
>> > >>        b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
>> > >>          code"
>> > >>          (http://www.spinics.net/lists/arm-kernel/msg391084.html),
>> > >
>> > > FWIW, I have squashed that patch into the patch that adds the problem
>> > > and the result is in the soc-for-v3.20. I will to push that result
>> > > a little later today.
>> >
>> > Thanks!
>> >
>> > >>   2. Patch 5 (dtsi) depends on:
>> > >>        a. The multiplatform work for sh73a0, queued in branch
>> > >>           sh73a0-multiplatform-for-v3.20 of Simon's repository,
>> > >>        b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
>> > >>           controllers"
>> > >>         (http://marc.info/?l=linux-sh&m\x142123399414888).
>> > >
>> > > This may be awkward to get into v3.20 unless we can adopt a looser approach
>> > > to the dependencies.

> Please take a look at renesas-next-20150115-v3.19-rc1.

s/20150115/20150116/?

> This series should be queued-up there.

If you add patch 6 to sh-drivers-for-v3.20 and merge it in -next,
everything is fine!

Thanks!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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

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

* Re: [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-16  9:51           ` Geert Uytterhoeven
  0 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-16  9:51 UTC (permalink / raw)
  To: Simon Horman
  Cc: Geert Uytterhoeven, Magnus Damm, Linux-sh list, Linux PM list,
	linux-arm-kernel, devicetree

Hi Simon,

On Fri, Jan 16, 2015 at 3:47 AM, Simon Horman <horms@verge.net.au> wrote:
> On Fri, Jan 16, 2015 at 10:13:15AM +0900, Simon Horman wrote:
>> On Thu, Jan 15, 2015 at 10:32:23AM +0100, Geert Uytterhoeven wrote:
>> > On Thu, Jan 15, 2015 at 12:53 AM, Simon Horman <horms@verge.net.au> wrote:
>> > > On Wed, Jan 14, 2015 at 01:11:18PM +0100, Geert Uytterhoeven wrote:
>> > >> This patch series enables DT support for PM domains on the Renesas
>> > >> SH-Mobile AG5 (sh73a0) SoC.
>> > >>
>> > >> This series builds further on the DT PM Domain support for R-Mobile A1
>> > >> (r8a7740).  Due to the similarity of the SYSC System-Controller on the
>> > >> various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
>> > >> DT, the same driver can handle sh73a0 after some small modifications,
>> > >> without changing the DT bindings.
>> > >>
>> > >> Compared to r8a7740, the only significant change is the move of the
>> > >> memory-controller(s) to separate PM domains on sh73a0 (and also on
>> > >> R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
>> > >> these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
>> > >> shmobile: Add DT support for memory controllers" I've just sent.
>> > >>
>> > >> This series has been sent before, as part of the series "[PATCH RFC
>> > >> 0/7] ARM: shmobile: sh73a0: DT PM domain support"
>> > >> (https://lkml.org/lkml/2014/11/19/404).
>> > >> Changes since v1 (more detailed changelogs in the individual patches):
>> > >>   - Factored out addition of the memory-controller in a separate
>> > >>     series.
>> > >>
>> > >> Dependencies:
>> > >>   1. Patches 1-4 (DT binding doc, C code) depend on:
>> > >>        a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
>> > >>           renesas-dt-pm-for-v3.20 of Simon's repository,
>> > >
>> > > In response to a request from Olof renesas-dt-pm-for-v3.20 has been
>> > > withdrawn and the patches split between the soc-for-v3.20 and dt-for-v3.20
>> > > branches. I am assuming that the patches that 1-4 depend on are
>> > > now all in the soc-for-v3.20 branch. Could you check?
>> >
>> > OK, soc-for-v3.20 now.
>> >
>> > >>        b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
>> > >>          code"
>> > >>          (http://www.spinics.net/lists/arm-kernel/msg391084.html),
>> > >
>> > > FWIW, I have squashed that patch into the patch that adds the problem
>> > > and the result is in the soc-for-v3.20. I will to push that result
>> > > a little later today.
>> >
>> > Thanks!
>> >
>> > >>   2. Patch 5 (dtsi) depends on:
>> > >>        a. The multiplatform work for sh73a0, queued in branch
>> > >>           sh73a0-multiplatform-for-v3.20 of Simon's repository,
>> > >>        b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
>> > >>           controllers"
>> > >>         (http://marc.info/?l=linux-sh&m=142123399414888).
>> > >
>> > > This may be awkward to get into v3.20 unless we can adopt a looser approach
>> > > to the dependencies.

> Please take a look at renesas-next-20150115-v3.19-rc1.

s/20150115/20150116/?

> This series should be queued-up there.

If you add patch 6 to sh-drivers-for-v3.20 and merge it in -next,
everything is fine!

Thanks!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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

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

* [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-16  9:51           ` Geert Uytterhoeven
  0 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-16  9:51 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

On Fri, Jan 16, 2015 at 3:47 AM, Simon Horman <horms@verge.net.au> wrote:
> On Fri, Jan 16, 2015 at 10:13:15AM +0900, Simon Horman wrote:
>> On Thu, Jan 15, 2015 at 10:32:23AM +0100, Geert Uytterhoeven wrote:
>> > On Thu, Jan 15, 2015 at 12:53 AM, Simon Horman <horms@verge.net.au> wrote:
>> > > On Wed, Jan 14, 2015 at 01:11:18PM +0100, Geert Uytterhoeven wrote:
>> > >> This patch series enables DT support for PM domains on the Renesas
>> > >> SH-Mobile AG5 (sh73a0) SoC.
>> > >>
>> > >> This series builds further on the DT PM Domain support for R-Mobile A1
>> > >> (r8a7740).  Due to the similarity of the SYSC System-Controller on the
>> > >> various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
>> > >> DT, the same driver can handle sh73a0 after some small modifications,
>> > >> without changing the DT bindings.
>> > >>
>> > >> Compared to r8a7740, the only significant change is the move of the
>> > >> memory-controller(s) to separate PM domains on sh73a0 (and also on
>> > >> R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
>> > >> these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
>> > >> shmobile: Add DT support for memory controllers" I've just sent.
>> > >>
>> > >> This series has been sent before, as part of the series "[PATCH RFC
>> > >> 0/7] ARM: shmobile: sh73a0: DT PM domain support"
>> > >> (https://lkml.org/lkml/2014/11/19/404).
>> > >> Changes since v1 (more detailed changelogs in the individual patches):
>> > >>   - Factored out addition of the memory-controller in a separate
>> > >>     series.
>> > >>
>> > >> Dependencies:
>> > >>   1. Patches 1-4 (DT binding doc, C code) depend on:
>> > >>        a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
>> > >>           renesas-dt-pm-for-v3.20 of Simon's repository,
>> > >
>> > > In response to a request from Olof renesas-dt-pm-for-v3.20 has been
>> > > withdrawn and the patches split between the soc-for-v3.20 and dt-for-v3.20
>> > > branches. I am assuming that the patches that 1-4 depend on are
>> > > now all in the soc-for-v3.20 branch. Could you check?
>> >
>> > OK, soc-for-v3.20 now.
>> >
>> > >>        b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
>> > >>          code"
>> > >>          (http://www.spinics.net/lists/arm-kernel/msg391084.html),
>> > >
>> > > FWIW, I have squashed that patch into the patch that adds the problem
>> > > and the result is in the soc-for-v3.20. I will to push that result
>> > > a little later today.
>> >
>> > Thanks!
>> >
>> > >>   2. Patch 5 (dtsi) depends on:
>> > >>        a. The multiplatform work for sh73a0, queued in branch
>> > >>           sh73a0-multiplatform-for-v3.20 of Simon's repository,
>> > >>        b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
>> > >>           controllers"
>> > >>         (http://marc.info/?l=linux-sh&m=142123399414888).
>> > >
>> > > This may be awkward to get into v3.20 unless we can adopt a looser approach
>> > > to the dependencies.

> Please take a look at renesas-next-20150115-v3.19-rc1.

s/20150115/20150116/?

> This series should be queued-up there.

If you add patch 6 to sh-drivers-for-v3.20 and merge it in -next,
everything is fine!

Thanks!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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

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

* Re: [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
  2015-01-16  9:51           ` Geert Uytterhoeven
  (?)
@ 2015-01-16 12:45             ` Simon Horman
  -1 siblings, 0 replies; 51+ messages in thread
From: Simon Horman @ 2015-01-16 12:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 16, 2015 at 10:51:29AM +0100, Geert Uytterhoeven wrote:
> Hi Simon,
> 
> On Fri, Jan 16, 2015 at 3:47 AM, Simon Horman <horms@verge.net.au> wrote:
> > On Fri, Jan 16, 2015 at 10:13:15AM +0900, Simon Horman wrote:
> >> On Thu, Jan 15, 2015 at 10:32:23AM +0100, Geert Uytterhoeven wrote:
> >> > On Thu, Jan 15, 2015 at 12:53 AM, Simon Horman <horms@verge.net.au> wrote:
> >> > > On Wed, Jan 14, 2015 at 01:11:18PM +0100, Geert Uytterhoeven wrote:
> >> > >> This patch series enables DT support for PM domains on the Renesas
> >> > >> SH-Mobile AG5 (sh73a0) SoC.
> >> > >>
> >> > >> This series builds further on the DT PM Domain support for R-Mobile A1
> >> > >> (r8a7740).  Due to the similarity of the SYSC System-Controller on the
> >> > >> various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
> >> > >> DT, the same driver can handle sh73a0 after some small modifications,
> >> > >> without changing the DT bindings.
> >> > >>
> >> > >> Compared to r8a7740, the only significant change is the move of the
> >> > >> memory-controller(s) to separate PM domains on sh73a0 (and also on
> >> > >> R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
> >> > >> these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
> >> > >> shmobile: Add DT support for memory controllers" I've just sent.
> >> > >>
> >> > >> This series has been sent before, as part of the series "[PATCH RFC
> >> > >> 0/7] ARM: shmobile: sh73a0: DT PM domain support"
> >> > >> (https://lkml.org/lkml/2014/11/19/404).
> >> > >> Changes since v1 (more detailed changelogs in the individual patches):
> >> > >>   - Factored out addition of the memory-controller in a separate
> >> > >>     series.
> >> > >>
> >> > >> Dependencies:
> >> > >>   1. Patches 1-4 (DT binding doc, C code) depend on:
> >> > >>        a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
> >> > >>           renesas-dt-pm-for-v3.20 of Simon's repository,
> >> > >
> >> > > In response to a request from Olof renesas-dt-pm-for-v3.20 has been
> >> > > withdrawn and the patches split between the soc-for-v3.20 and dt-for-v3.20
> >> > > branches. I am assuming that the patches that 1-4 depend on are
> >> > > now all in the soc-for-v3.20 branch. Could you check?
> >> >
> >> > OK, soc-for-v3.20 now.
> >> >
> >> > >>        b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
> >> > >>          code"
> >> > >>          (http://www.spinics.net/lists/arm-kernel/msg391084.html),
> >> > >
> >> > > FWIW, I have squashed that patch into the patch that adds the problem
> >> > > and the result is in the soc-for-v3.20. I will to push that result
> >> > > a little later today.
> >> >
> >> > Thanks!
> >> >
> >> > >>   2. Patch 5 (dtsi) depends on:
> >> > >>        a. The multiplatform work for sh73a0, queued in branch
> >> > >>           sh73a0-multiplatform-for-v3.20 of Simon's repository,
> >> > >>        b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
> >> > >>           controllers"
> >> > >>         (http://marc.info/?l=linux-sh&m\x142123399414888).
> >> > >
> >> > > This may be awkward to get into v3.20 unless we can adopt a looser approach
> >> > > to the dependencies.
> 
> > Please take a look at renesas-next-20150115-v3.19-rc1.
> 
> s/20150115/20150116/?
> 
> > This series should be queued-up there.
> 
> If you add patch 6 to sh-drivers-for-v3.20 and merge it in -next,
> everything is fine!

Thanks, I thought I had that one but I must have missed it somehow.

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

* Re: [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-16 12:45             ` Simon Horman
  0 siblings, 0 replies; 51+ messages in thread
From: Simon Horman @ 2015-01-16 12:45 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Geert Uytterhoeven, Magnus Damm, Linux-sh list, Linux PM list,
	linux-arm-kernel, devicetree

On Fri, Jan 16, 2015 at 10:51:29AM +0100, Geert Uytterhoeven wrote:
> Hi Simon,
> 
> On Fri, Jan 16, 2015 at 3:47 AM, Simon Horman <horms@verge.net.au> wrote:
> > On Fri, Jan 16, 2015 at 10:13:15AM +0900, Simon Horman wrote:
> >> On Thu, Jan 15, 2015 at 10:32:23AM +0100, Geert Uytterhoeven wrote:
> >> > On Thu, Jan 15, 2015 at 12:53 AM, Simon Horman <horms@verge.net.au> wrote:
> >> > > On Wed, Jan 14, 2015 at 01:11:18PM +0100, Geert Uytterhoeven wrote:
> >> > >> This patch series enables DT support for PM domains on the Renesas
> >> > >> SH-Mobile AG5 (sh73a0) SoC.
> >> > >>
> >> > >> This series builds further on the DT PM Domain support for R-Mobile A1
> >> > >> (r8a7740).  Due to the similarity of the SYSC System-Controller on the
> >> > >> various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
> >> > >> DT, the same driver can handle sh73a0 after some small modifications,
> >> > >> without changing the DT bindings.
> >> > >>
> >> > >> Compared to r8a7740, the only significant change is the move of the
> >> > >> memory-controller(s) to separate PM domains on sh73a0 (and also on
> >> > >> R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
> >> > >> these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
> >> > >> shmobile: Add DT support for memory controllers" I've just sent.
> >> > >>
> >> > >> This series has been sent before, as part of the series "[PATCH RFC
> >> > >> 0/7] ARM: shmobile: sh73a0: DT PM domain support"
> >> > >> (https://lkml.org/lkml/2014/11/19/404).
> >> > >> Changes since v1 (more detailed changelogs in the individual patches):
> >> > >>   - Factored out addition of the memory-controller in a separate
> >> > >>     series.
> >> > >>
> >> > >> Dependencies:
> >> > >>   1. Patches 1-4 (DT binding doc, C code) depend on:
> >> > >>        a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
> >> > >>           renesas-dt-pm-for-v3.20 of Simon's repository,
> >> > >
> >> > > In response to a request from Olof renesas-dt-pm-for-v3.20 has been
> >> > > withdrawn and the patches split between the soc-for-v3.20 and dt-for-v3.20
> >> > > branches. I am assuming that the patches that 1-4 depend on are
> >> > > now all in the soc-for-v3.20 branch. Could you check?
> >> >
> >> > OK, soc-for-v3.20 now.
> >> >
> >> > >>        b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
> >> > >>          code"
> >> > >>          (http://www.spinics.net/lists/arm-kernel/msg391084.html),
> >> > >
> >> > > FWIW, I have squashed that patch into the patch that adds the problem
> >> > > and the result is in the soc-for-v3.20. I will to push that result
> >> > > a little later today.
> >> >
> >> > Thanks!
> >> >
> >> > >>   2. Patch 5 (dtsi) depends on:
> >> > >>        a. The multiplatform work for sh73a0, queued in branch
> >> > >>           sh73a0-multiplatform-for-v3.20 of Simon's repository,
> >> > >>        b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
> >> > >>           controllers"
> >> > >>         (http://marc.info/?l=linux-sh&m=142123399414888).
> >> > >
> >> > > This may be awkward to get into v3.20 unless we can adopt a looser approach
> >> > > to the dependencies.
> 
> > Please take a look at renesas-next-20150115-v3.19-rc1.
> 
> s/20150115/20150116/?
> 
> > This series should be queued-up there.
> 
> If you add patch 6 to sh-drivers-for-v3.20 and merge it in -next,
> everything is fine!

Thanks, I thought I had that one but I must have missed it somehow.

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

* [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-16 12:45             ` Simon Horman
  0 siblings, 0 replies; 51+ messages in thread
From: Simon Horman @ 2015-01-16 12:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 16, 2015 at 10:51:29AM +0100, Geert Uytterhoeven wrote:
> Hi Simon,
> 
> On Fri, Jan 16, 2015 at 3:47 AM, Simon Horman <horms@verge.net.au> wrote:
> > On Fri, Jan 16, 2015 at 10:13:15AM +0900, Simon Horman wrote:
> >> On Thu, Jan 15, 2015 at 10:32:23AM +0100, Geert Uytterhoeven wrote:
> >> > On Thu, Jan 15, 2015 at 12:53 AM, Simon Horman <horms@verge.net.au> wrote:
> >> > > On Wed, Jan 14, 2015 at 01:11:18PM +0100, Geert Uytterhoeven wrote:
> >> > >> This patch series enables DT support for PM domains on the Renesas
> >> > >> SH-Mobile AG5 (sh73a0) SoC.
> >> > >>
> >> > >> This series builds further on the DT PM Domain support for R-Mobile A1
> >> > >> (r8a7740).  Due to the similarity of the SYSC System-Controller on the
> >> > >> various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
> >> > >> DT, the same driver can handle sh73a0 after some small modifications,
> >> > >> without changing the DT bindings.
> >> > >>
> >> > >> Compared to r8a7740, the only significant change is the move of the
> >> > >> memory-controller(s) to separate PM domains on sh73a0 (and also on
> >> > >> R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
> >> > >> these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
> >> > >> shmobile: Add DT support for memory controllers" I've just sent.
> >> > >>
> >> > >> This series has been sent before, as part of the series "[PATCH RFC
> >> > >> 0/7] ARM: shmobile: sh73a0: DT PM domain support"
> >> > >> (https://lkml.org/lkml/2014/11/19/404).
> >> > >> Changes since v1 (more detailed changelogs in the individual patches):
> >> > >>   - Factored out addition of the memory-controller in a separate
> >> > >>     series.
> >> > >>
> >> > >> Dependencies:
> >> > >>   1. Patches 1-4 (DT binding doc, C code) depend on:
> >> > >>        a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
> >> > >>           renesas-dt-pm-for-v3.20 of Simon's repository,
> >> > >
> >> > > In response to a request from Olof renesas-dt-pm-for-v3.20 has been
> >> > > withdrawn and the patches split between the soc-for-v3.20 and dt-for-v3.20
> >> > > branches. I am assuming that the patches that 1-4 depend on are
> >> > > now all in the soc-for-v3.20 branch. Could you check?
> >> >
> >> > OK, soc-for-v3.20 now.
> >> >
> >> > >>        b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
> >> > >>          code"
> >> > >>          (http://www.spinics.net/lists/arm-kernel/msg391084.html),
> >> > >
> >> > > FWIW, I have squashed that patch into the patch that adds the problem
> >> > > and the result is in the soc-for-v3.20. I will to push that result
> >> > > a little later today.
> >> >
> >> > Thanks!
> >> >
> >> > >>   2. Patch 5 (dtsi) depends on:
> >> > >>        a. The multiplatform work for sh73a0, queued in branch
> >> > >>           sh73a0-multiplatform-for-v3.20 of Simon's repository,
> >> > >>        b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
> >> > >>           controllers"
> >> > >>         (http://marc.info/?l=linux-sh&m=142123399414888).
> >> > >
> >> > > This may be awkward to get into v3.20 unless we can adopt a looser approach
> >> > > to the dependencies.
> 
> > Please take a look at renesas-next-20150115-v3.19-rc1.
> 
> s/20150115/20150116/?
> 
> > This series should be queued-up there.
> 
> If you add patch 6 to sh-drivers-for-v3.20 and merge it in -next,
> everything is fine!

Thanks, I thought I had that one but I must have missed it somehow.

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

* Re: [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
  2015-01-16 12:45             ` Simon Horman
  (?)
@ 2015-01-17  1:14               ` Simon Horman
  -1 siblings, 0 replies; 51+ messages in thread
From: Simon Horman @ 2015-01-17  1:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 16, 2015 at 09:45:03PM +0900, Simon Horman wrote:
> On Fri, Jan 16, 2015 at 10:51:29AM +0100, Geert Uytterhoeven wrote:
> > Hi Simon,
> > 
> > On Fri, Jan 16, 2015 at 3:47 AM, Simon Horman <horms@verge.net.au> wrote:
> > > On Fri, Jan 16, 2015 at 10:13:15AM +0900, Simon Horman wrote:
> > >> On Thu, Jan 15, 2015 at 10:32:23AM +0100, Geert Uytterhoeven wrote:
> > >> > On Thu, Jan 15, 2015 at 12:53 AM, Simon Horman <horms@verge.net.au> wrote:
> > >> > > On Wed, Jan 14, 2015 at 01:11:18PM +0100, Geert Uytterhoeven wrote:
> > >> > >> This patch series enables DT support for PM domains on the Renesas
> > >> > >> SH-Mobile AG5 (sh73a0) SoC.
> > >> > >>
> > >> > >> This series builds further on the DT PM Domain support for R-Mobile A1
> > >> > >> (r8a7740).  Due to the similarity of the SYSC System-Controller on the
> > >> > >> various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
> > >> > >> DT, the same driver can handle sh73a0 after some small modifications,
> > >> > >> without changing the DT bindings.
> > >> > >>
> > >> > >> Compared to r8a7740, the only significant change is the move of the
> > >> > >> memory-controller(s) to separate PM domains on sh73a0 (and also on
> > >> > >> R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
> > >> > >> these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
> > >> > >> shmobile: Add DT support for memory controllers" I've just sent.
> > >> > >>
> > >> > >> This series has been sent before, as part of the series "[PATCH RFC
> > >> > >> 0/7] ARM: shmobile: sh73a0: DT PM domain support"
> > >> > >> (https://lkml.org/lkml/2014/11/19/404).
> > >> > >> Changes since v1 (more detailed changelogs in the individual patches):
> > >> > >>   - Factored out addition of the memory-controller in a separate
> > >> > >>     series.
> > >> > >>
> > >> > >> Dependencies:
> > >> > >>   1. Patches 1-4 (DT binding doc, C code) depend on:
> > >> > >>        a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
> > >> > >>           renesas-dt-pm-for-v3.20 of Simon's repository,
> > >> > >
> > >> > > In response to a request from Olof renesas-dt-pm-for-v3.20 has been
> > >> > > withdrawn and the patches split between the soc-for-v3.20 and dt-for-v3.20
> > >> > > branches. I am assuming that the patches that 1-4 depend on are
> > >> > > now all in the soc-for-v3.20 branch. Could you check?
> > >> >
> > >> > OK, soc-for-v3.20 now.
> > >> >
> > >> > >>        b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
> > >> > >>          code"
> > >> > >>          (http://www.spinics.net/lists/arm-kernel/msg391084.html),
> > >> > >
> > >> > > FWIW, I have squashed that patch into the patch that adds the problem
> > >> > > and the result is in the soc-for-v3.20. I will to push that result
> > >> > > a little later today.
> > >> >
> > >> > Thanks!
> > >> >
> > >> > >>   2. Patch 5 (dtsi) depends on:
> > >> > >>        a. The multiplatform work for sh73a0, queued in branch
> > >> > >>           sh73a0-multiplatform-for-v3.20 of Simon's repository,
> > >> > >>        b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
> > >> > >>           controllers"
> > >> > >>         (http://marc.info/?l=linux-sh&m\x142123399414888).
> > >> > >
> > >> > > This may be awkward to get into v3.20 unless we can adopt a looser approach
> > >> > > to the dependencies.
> > 
> > > Please take a look at renesas-next-20150115-v3.19-rc1.
> > 
> > s/20150115/20150116/?

Yes, 16 :)

> > > This series should be queued-up there.
> > 
> > If you add patch 6 to sh-drivers-for-v3.20 and merge it in -next,
> > everything is fine!
> 
> Thanks, I thought I had that one but I must have missed it somehow.

I have made a second attempt and this time I hope that I haven't missed
anything. Please see renesas-next-20150117-v3.19-rc1.

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

* Re: [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-17  1:14               ` Simon Horman
  0 siblings, 0 replies; 51+ messages in thread
From: Simon Horman @ 2015-01-17  1:14 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Geert Uytterhoeven, Magnus Damm, Linux-sh list, Linux PM list,
	linux-arm-kernel, devicetree

On Fri, Jan 16, 2015 at 09:45:03PM +0900, Simon Horman wrote:
> On Fri, Jan 16, 2015 at 10:51:29AM +0100, Geert Uytterhoeven wrote:
> > Hi Simon,
> > 
> > On Fri, Jan 16, 2015 at 3:47 AM, Simon Horman <horms@verge.net.au> wrote:
> > > On Fri, Jan 16, 2015 at 10:13:15AM +0900, Simon Horman wrote:
> > >> On Thu, Jan 15, 2015 at 10:32:23AM +0100, Geert Uytterhoeven wrote:
> > >> > On Thu, Jan 15, 2015 at 12:53 AM, Simon Horman <horms@verge.net.au> wrote:
> > >> > > On Wed, Jan 14, 2015 at 01:11:18PM +0100, Geert Uytterhoeven wrote:
> > >> > >> This patch series enables DT support for PM domains on the Renesas
> > >> > >> SH-Mobile AG5 (sh73a0) SoC.
> > >> > >>
> > >> > >> This series builds further on the DT PM Domain support for R-Mobile A1
> > >> > >> (r8a7740).  Due to the similarity of the SYSC System-Controller on the
> > >> > >> various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
> > >> > >> DT, the same driver can handle sh73a0 after some small modifications,
> > >> > >> without changing the DT bindings.
> > >> > >>
> > >> > >> Compared to r8a7740, the only significant change is the move of the
> > >> > >> memory-controller(s) to separate PM domains on sh73a0 (and also on
> > >> > >> R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
> > >> > >> these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
> > >> > >> shmobile: Add DT support for memory controllers" I've just sent.
> > >> > >>
> > >> > >> This series has been sent before, as part of the series "[PATCH RFC
> > >> > >> 0/7] ARM: shmobile: sh73a0: DT PM domain support"
> > >> > >> (https://lkml.org/lkml/2014/11/19/404).
> > >> > >> Changes since v1 (more detailed changelogs in the individual patches):
> > >> > >>   - Factored out addition of the memory-controller in a separate
> > >> > >>     series.
> > >> > >>
> > >> > >> Dependencies:
> > >> > >>   1. Patches 1-4 (DT binding doc, C code) depend on:
> > >> > >>        a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
> > >> > >>           renesas-dt-pm-for-v3.20 of Simon's repository,
> > >> > >
> > >> > > In response to a request from Olof renesas-dt-pm-for-v3.20 has been
> > >> > > withdrawn and the patches split between the soc-for-v3.20 and dt-for-v3.20
> > >> > > branches. I am assuming that the patches that 1-4 depend on are
> > >> > > now all in the soc-for-v3.20 branch. Could you check?
> > >> >
> > >> > OK, soc-for-v3.20 now.
> > >> >
> > >> > >>        b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
> > >> > >>          code"
> > >> > >>          (http://www.spinics.net/lists/arm-kernel/msg391084.html),
> > >> > >
> > >> > > FWIW, I have squashed that patch into the patch that adds the problem
> > >> > > and the result is in the soc-for-v3.20. I will to push that result
> > >> > > a little later today.
> > >> >
> > >> > Thanks!
> > >> >
> > >> > >>   2. Patch 5 (dtsi) depends on:
> > >> > >>        a. The multiplatform work for sh73a0, queued in branch
> > >> > >>           sh73a0-multiplatform-for-v3.20 of Simon's repository,
> > >> > >>        b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
> > >> > >>           controllers"
> > >> > >>         (http://marc.info/?l=linux-sh&m=142123399414888).
> > >> > >
> > >> > > This may be awkward to get into v3.20 unless we can adopt a looser approach
> > >> > > to the dependencies.
> > 
> > > Please take a look at renesas-next-20150115-v3.19-rc1.
> > 
> > s/20150115/20150116/?

Yes, 16 :)

> > > This series should be queued-up there.
> > 
> > If you add patch 6 to sh-drivers-for-v3.20 and merge it in -next,
> > everything is fine!
> 
> Thanks, I thought I had that one but I must have missed it somehow.

I have made a second attempt and this time I hope that I haven't missed
anything. Please see renesas-next-20150117-v3.19-rc1.

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

* [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-17  1:14               ` Simon Horman
  0 siblings, 0 replies; 51+ messages in thread
From: Simon Horman @ 2015-01-17  1:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 16, 2015 at 09:45:03PM +0900, Simon Horman wrote:
> On Fri, Jan 16, 2015 at 10:51:29AM +0100, Geert Uytterhoeven wrote:
> > Hi Simon,
> > 
> > On Fri, Jan 16, 2015 at 3:47 AM, Simon Horman <horms@verge.net.au> wrote:
> > > On Fri, Jan 16, 2015 at 10:13:15AM +0900, Simon Horman wrote:
> > >> On Thu, Jan 15, 2015 at 10:32:23AM +0100, Geert Uytterhoeven wrote:
> > >> > On Thu, Jan 15, 2015 at 12:53 AM, Simon Horman <horms@verge.net.au> wrote:
> > >> > > On Wed, Jan 14, 2015 at 01:11:18PM +0100, Geert Uytterhoeven wrote:
> > >> > >> This patch series enables DT support for PM domains on the Renesas
> > >> > >> SH-Mobile AG5 (sh73a0) SoC.
> > >> > >>
> > >> > >> This series builds further on the DT PM Domain support for R-Mobile A1
> > >> > >> (r8a7740).  Due to the similarity of the SYSC System-Controller on the
> > >> > >> various SH-Mobile/R-Mobile SoCs, and the abstraction of PM domains in
> > >> > >> DT, the same driver can handle sh73a0 after some small modifications,
> > >> > >> without changing the DT bindings.
> > >> > >>
> > >> > >> Compared to r8a7740, the only significant change is the move of the
> > >> > >> memory-controller(s) to separate PM domains on sh73a0 (and also on
> > >> > >> R-Mobile APE6 (r8a73a4)). Hence a provision must be made to not turn off
> > >> > >> these PM domains inadvertently, cfr. the series "[PATCH 0/4] ARM:
> > >> > >> shmobile: Add DT support for memory controllers" I've just sent.
> > >> > >>
> > >> > >> This series has been sent before, as part of the series "[PATCH RFC
> > >> > >> 0/7] ARM: shmobile: sh73a0: DT PM domain support"
> > >> > >> (https://lkml.org/lkml/2014/11/19/404).
> > >> > >> Changes since v1 (more detailed changelogs in the individual patches):
> > >> > >>   - Factored out addition of the memory-controller in a separate
> > >> > >>     series.
> > >> > >>
> > >> > >> Dependencies:
> > >> > >>   1. Patches 1-4 (DT binding doc, C code) depend on:
> > >> > >>        a. The R-Mobile DT PM Domain work for r8a7740, queued in tag
> > >> > >>           renesas-dt-pm-for-v3.20 of Simon's repository,
> > >> > >
> > >> > > In response to a request from Olof renesas-dt-pm-for-v3.20 has been
> > >> > > withdrawn and the patches split between the soc-for-v3.20 and dt-for-v3.20
> > >> > > branches. I am assuming that the patches that 1-4 depend on are
> > >> > > now all in the soc-for-v3.20 branch. Could you check?
> > >> >
> > >> > OK, soc-for-v3.20 now.
> > >> >
> > >> > >>        b. "ARM: shmobile: R-Mobile: Fix DT refcount bugs in PM domain
> > >> > >>          code"
> > >> > >>          (http://www.spinics.net/lists/arm-kernel/msg391084.html),
> > >> > >
> > >> > > FWIW, I have squashed that patch into the patch that adds the problem
> > >> > > and the result is in the soc-for-v3.20. I will to push that result
> > >> > > a little later today.
> > >> >
> > >> > Thanks!
> > >> >
> > >> > >>   2. Patch 5 (dtsi) depends on:
> > >> > >>        a. The multiplatform work for sh73a0, queued in branch
> > >> > >>           sh73a0-multiplatform-for-v3.20 of Simon's repository,
> > >> > >>        b. Series "[PATCH 0/4] ARM: shmobile: Add DT support for memory
> > >> > >>           controllers"
> > >> > >>         (http://marc.info/?l=linux-sh&m=142123399414888).
> > >> > >
> > >> > > This may be awkward to get into v3.20 unless we can adopt a looser approach
> > >> > > to the dependencies.
> > 
> > > Please take a look at renesas-next-20150115-v3.19-rc1.
> > 
> > s/20150115/20150116/?

Yes, 16 :)

> > > This series should be queued-up there.
> > 
> > If you add patch 6 to sh-drivers-for-v3.20 and merge it in -next,
> > everything is fine!
> 
> Thanks, I thought I had that one but I must have missed it somehow.

I have made a second attempt and this time I hope that I haven't missed
anything. Please see renesas-next-20150117-v3.19-rc1.

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

* Re: [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-17 14:12                 ` Geert Uytterhoeven
  0 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-17 14:12 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

On Sat, Jan 17, 2015 at 2:14 AM, Simon Horman <horms@verge.net.au> wrote:
>> > If you add patch 6 to sh-drivers-for-v3.20 and merge it in -next,
>> > everything is fine!
>>
>> Thanks, I thought I had that one but I must have missed it somehow.
>
> I have made a second attempt and this time I hope that I haven't missed
> anything. Please see renesas-next-20150117-v3.19-rc1.

Thanks, looks better!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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

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

* Re: [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-17 14:12                 ` Geert Uytterhoeven
  0 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-17 14:12 UTC (permalink / raw)
  To: Simon Horman
  Cc: Geert Uytterhoeven, Magnus Damm, Linux-sh list, Linux PM list,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Hi Simon,

On Sat, Jan 17, 2015 at 2:14 AM, Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org> wrote:
>> > If you add patch 6 to sh-drivers-for-v3.20 and merge it in -next,
>> > everything is fine!
>>
>> Thanks, I thought I had that one but I must have missed it somehow.
>
> I have made a second attempt and this time I hope that I haven't missed
> anything. Please see renesas-next-20150117-v3.19-rc1.

Thanks, looks better!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-17 14:12                 ` Geert Uytterhoeven
  0 siblings, 0 replies; 51+ messages in thread
From: Geert Uytterhoeven @ 2015-01-17 14:12 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

On Sat, Jan 17, 2015 at 2:14 AM, Simon Horman <horms@verge.net.au> wrote:
>> > If you add patch 6 to sh-drivers-for-v3.20 and merge it in -next,
>> > everything is fine!
>>
>> Thanks, I thought I had that one but I must have missed it somehow.
>
> I have made a second attempt and this time I hope that I haven't missed
> anything. Please see renesas-next-20150117-v3.19-rc1.

Thanks, looks better!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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

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

* Re: [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
  2015-01-17 14:12                 ` Geert Uytterhoeven
  (?)
@ 2015-01-22  2:55                   ` Simon Horman
  -1 siblings, 0 replies; 51+ messages in thread
From: Simon Horman @ 2015-01-22  2:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Jan 17, 2015 at 03:12:19PM +0100, Geert Uytterhoeven wrote:
> Hi Simon,
> 
> On Sat, Jan 17, 2015 at 2:14 AM, Simon Horman <horms@verge.net.au> wrote:
> >> > If you add patch 6 to sh-drivers-for-v3.20 and merge it in -next,
> >> > everything is fine!
> >>
> >> Thanks, I thought I had that one but I must have missed it somehow.
> >
> > I have made a second attempt and this time I hope that I haven't missed
> > anything. Please see renesas-next-20150117-v3.19-rc1.
> 
> Thanks, looks better!

For the record: Olof has asked for review comments for the BSC driver and
binding patches. Accordingly I have dropped them, and these patches which
depend on them, from next.

This dependency may be due to the way the branches are arranged, rather
than actual dependencies of the code. But regardless I am dropping all
effected branches for now.

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

* Re: [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-22  2:55                   ` Simon Horman
  0 siblings, 0 replies; 51+ messages in thread
From: Simon Horman @ 2015-01-22  2:55 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Geert Uytterhoeven, Magnus Damm, Linux-sh list, Linux PM list,
	linux-arm-kernel, devicetree

On Sat, Jan 17, 2015 at 03:12:19PM +0100, Geert Uytterhoeven wrote:
> Hi Simon,
> 
> On Sat, Jan 17, 2015 at 2:14 AM, Simon Horman <horms@verge.net.au> wrote:
> >> > If you add patch 6 to sh-drivers-for-v3.20 and merge it in -next,
> >> > everything is fine!
> >>
> >> Thanks, I thought I had that one but I must have missed it somehow.
> >
> > I have made a second attempt and this time I hope that I haven't missed
> > anything. Please see renesas-next-20150117-v3.19-rc1.
> 
> Thanks, looks better!

For the record: Olof has asked for review comments for the BSC driver and
binding patches. Accordingly I have dropped them, and these patches which
depend on them, from next.

This dependency may be due to the way the branches are arranged, rather
than actual dependencies of the code. But regardless I am dropping all
effected branches for now.

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

* [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-22  2:55                   ` Simon Horman
  0 siblings, 0 replies; 51+ messages in thread
From: Simon Horman @ 2015-01-22  2:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Jan 17, 2015 at 03:12:19PM +0100, Geert Uytterhoeven wrote:
> Hi Simon,
> 
> On Sat, Jan 17, 2015 at 2:14 AM, Simon Horman <horms@verge.net.au> wrote:
> >> > If you add patch 6 to sh-drivers-for-v3.20 and merge it in -next,
> >> > everything is fine!
> >>
> >> Thanks, I thought I had that one but I must have missed it somehow.
> >
> > I have made a second attempt and this time I hope that I haven't missed
> > anything. Please see renesas-next-20150117-v3.19-rc1.
> 
> Thanks, looks better!

For the record: Olof has asked for review comments for the BSC driver and
binding patches. Accordingly I have dropped them, and these patches which
depend on them, from next.

This dependency may be due to the way the branches are arranged, rather
than actual dependencies of the code. But regardless I am dropping all
effected branches for now.

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

* Re: [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
  2015-01-22  2:55                   ` Simon Horman
  (?)
@ 2015-01-22  2:58                     ` Simon Horman
  -1 siblings, 0 replies; 51+ messages in thread
From: Simon Horman @ 2015-01-22  2:58 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jan 22, 2015 at 11:55:22AM +0900, Simon Horman wrote:
> On Sat, Jan 17, 2015 at 03:12:19PM +0100, Geert Uytterhoeven wrote:
> > Hi Simon,
> > 
> > On Sat, Jan 17, 2015 at 2:14 AM, Simon Horman <horms@verge.net.au> wrote:
> > >> > If you add patch 6 to sh-drivers-for-v3.20 and merge it in -next,
> > >> > everything is fine!
> > >>
> > >> Thanks, I thought I had that one but I must have missed it somehow.
> > >
> > > I have made a second attempt and this time I hope that I haven't missed
> > > anything. Please see renesas-next-20150117-v3.19-rc1.
> > 
> > Thanks, looks better!
> 
> For the record: Olof has asked for review comments for the BSC driver and
> binding patches. Accordingly I have dropped them, and these patches which
> depend on them, from next.
> 
> This dependency may be due to the way the branches are arranged, rather
> than actual dependencies of the code. But regardless I am dropping all
> effected branches for now.

To clarify, only patches 5 and 6 of this series are affected by the above
statement.

[PATCH v2 5/6] ARM: shmobile: sh73a0 dtsi: Add PM domain support
[PATCH v2 6/6] drivers: sh: Disable PM runtime for multi-platform sh73a0 with genpd

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

* Re: [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-22  2:58                     ` Simon Horman
  0 siblings, 0 replies; 51+ messages in thread
From: Simon Horman @ 2015-01-22  2:58 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Geert Uytterhoeven, Magnus Damm, Linux-sh list, Linux PM list,
	linux-arm-kernel, devicetree

On Thu, Jan 22, 2015 at 11:55:22AM +0900, Simon Horman wrote:
> On Sat, Jan 17, 2015 at 03:12:19PM +0100, Geert Uytterhoeven wrote:
> > Hi Simon,
> > 
> > On Sat, Jan 17, 2015 at 2:14 AM, Simon Horman <horms@verge.net.au> wrote:
> > >> > If you add patch 6 to sh-drivers-for-v3.20 and merge it in -next,
> > >> > everything is fine!
> > >>
> > >> Thanks, I thought I had that one but I must have missed it somehow.
> > >
> > > I have made a second attempt and this time I hope that I haven't missed
> > > anything. Please see renesas-next-20150117-v3.19-rc1.
> > 
> > Thanks, looks better!
> 
> For the record: Olof has asked for review comments for the BSC driver and
> binding patches. Accordingly I have dropped them, and these patches which
> depend on them, from next.
> 
> This dependency may be due to the way the branches are arranged, rather
> than actual dependencies of the code. But regardless I am dropping all
> effected branches for now.

To clarify, only patches 5 and 6 of this series are affected by the above
statement.

[PATCH v2 5/6] ARM: shmobile: sh73a0 dtsi: Add PM domain support
[PATCH v2 6/6] drivers: sh: Disable PM runtime for multi-platform sh73a0 with genpd

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

* [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support
@ 2015-01-22  2:58                     ` Simon Horman
  0 siblings, 0 replies; 51+ messages in thread
From: Simon Horman @ 2015-01-22  2:58 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jan 22, 2015 at 11:55:22AM +0900, Simon Horman wrote:
> On Sat, Jan 17, 2015 at 03:12:19PM +0100, Geert Uytterhoeven wrote:
> > Hi Simon,
> > 
> > On Sat, Jan 17, 2015 at 2:14 AM, Simon Horman <horms@verge.net.au> wrote:
> > >> > If you add patch 6 to sh-drivers-for-v3.20 and merge it in -next,
> > >> > everything is fine!
> > >>
> > >> Thanks, I thought I had that one but I must have missed it somehow.
> > >
> > > I have made a second attempt and this time I hope that I haven't missed
> > > anything. Please see renesas-next-20150117-v3.19-rc1.
> > 
> > Thanks, looks better!
> 
> For the record: Olof has asked for review comments for the BSC driver and
> binding patches. Accordingly I have dropped them, and these patches which
> depend on them, from next.
> 
> This dependency may be due to the way the branches are arranged, rather
> than actual dependencies of the code. But regardless I am dropping all
> effected branches for now.

To clarify, only patches 5 and 6 of this series are affected by the above
statement.

[PATCH v2 5/6] ARM: shmobile: sh73a0 dtsi: Add PM domain support
[PATCH v2 6/6] drivers: sh: Disable PM runtime for multi-platform sh73a0 with genpd

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

end of thread, other threads:[~2015-01-22  2:58 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-14 12:11 [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support Geert Uytterhoeven
2015-01-14 12:11 ` Geert Uytterhoeven
2015-01-14 12:11 ` Geert Uytterhoeven
2015-01-14 12:11 ` [PATCH v2 1/6] PM / Domains: R-Mobile SYSC: Document SH-Mobile AG5 (sh73a0) binding Geert Uytterhoeven
2015-01-14 12:11   ` Geert Uytterhoeven
2015-01-14 12:11   ` Geert Uytterhoeven
2015-01-14 12:11 ` [PATCH v2 2/6] ARM: shmobile: R-Mobile: Consolidate rmobile_pd_suspend_*() Geert Uytterhoeven
2015-01-14 12:11   ` Geert Uytterhoeven
2015-01-14 12:11   ` Geert Uytterhoeven
2015-01-14 12:11 ` [PATCH v2 3/6] ARM: shmobile: R-Mobile: Generalize adding/looking up special PM domains Geert Uytterhoeven
2015-01-14 12:11   ` Geert Uytterhoeven
2015-01-14 12:11   ` Geert Uytterhoeven
2015-01-14 12:11 ` [PATCH v2 4/6] ARM: shmobile: R-Mobile: Special-case PM domains with memory-controllers Geert Uytterhoeven
2015-01-14 12:11   ` Geert Uytterhoeven
2015-01-14 12:11   ` Geert Uytterhoeven
2015-01-14 12:11 ` [PATCH v2 5/6] ARM: shmobile: sh73a0 dtsi: Add PM domain support Geert Uytterhoeven
2015-01-14 12:11   ` Geert Uytterhoeven
2015-01-14 12:11   ` Geert Uytterhoeven
2015-01-14 12:11 ` [PATCH v2 6/6] drivers: sh: Disable PM runtime for multi-platform sh73a0 with genpd Geert Uytterhoeven
2015-01-14 12:11   ` Geert Uytterhoeven
2015-01-14 12:11   ` Geert Uytterhoeven
2015-01-14 23:53 ` [PATCH v2 0/6] ARM: shmobile: sh73a0: DT PM domain support Simon Horman
2015-01-14 23:53   ` Simon Horman
2015-01-14 23:53   ` Simon Horman
2015-01-15  9:32   ` Geert Uytterhoeven
2015-01-15  9:32     ` Geert Uytterhoeven
2015-01-15  9:32     ` Geert Uytterhoeven
2015-01-16  1:13     ` Simon Horman
2015-01-16  1:13       ` Simon Horman
2015-01-16  1:13       ` Simon Horman
2015-01-16  2:47       ` Simon Horman
2015-01-16  2:47         ` Simon Horman
2015-01-16  2:47         ` Simon Horman
2015-01-16  9:51         ` Geert Uytterhoeven
2015-01-16  9:51           ` Geert Uytterhoeven
2015-01-16  9:51           ` Geert Uytterhoeven
2015-01-16 12:45           ` Simon Horman
2015-01-16 12:45             ` Simon Horman
2015-01-16 12:45             ` Simon Horman
2015-01-17  1:14             ` Simon Horman
2015-01-17  1:14               ` Simon Horman
2015-01-17  1:14               ` Simon Horman
2015-01-17 14:12               ` Geert Uytterhoeven
2015-01-17 14:12                 ` Geert Uytterhoeven
2015-01-17 14:12                 ` Geert Uytterhoeven
2015-01-22  2:55                 ` Simon Horman
2015-01-22  2:55                   ` Simon Horman
2015-01-22  2:55                   ` Simon Horman
2015-01-22  2:58                   ` Simon Horman
2015-01-22  2:58                     ` Simon Horman
2015-01-22  2:58                     ` Simon Horman

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.