All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert+renesas@glider.be>
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 12/14] drivers: sh: Stop using pm_runtime.c for multi-platform shmobile with genpd
Date: Thu, 28 May 2015 18:53:37 +0000	[thread overview]
Message-ID: <1432839219-475-13-git-send-email-geert+renesas@glider.be> (raw)
In-Reply-To: <1432839219-475-1-git-send-email-geert+renesas@glider.be>

Now most multi-platform ARM shmobile platforms (SH-Mobile, R-Mobile,
R-Car, RZ) use the CPG Clock Domain to take care of PM runtime
management of the module clocks, we no longer need the legacy default PM
domain hack, which also prevented registering the real PM domain.

EMMA Mobile EV2 doesn't have MSTP clocks and doesn't use the CPG Clock
Domain. But all its device drivers manage clocks explicitly, without
relying on Runtime PM, so it doesn't need the legacy default PM hack
neither.

Hence do not compile it when running an ARM multi-platform kernel with
genpd support.

The default PM domain is still needed:
  - for legacy SuperH,
  - for legacy (non-DT) ARM/shmobile platforms
      - without genpd support (r8a7778, r8a7779),
      - with genpd support, for devices in the "C5" always-on power
	area (r8a7740, sh73a0),
  - for the CONFIG_PM=n case.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
---
v2:
  - Add Reviewed-by,
  - Just stop compiling pm_runtime.c instead of using a runtime check,
    as no multi-platform ARM platforms need this anymore.
---
 drivers/sh/Makefile     |  4 ++++
 drivers/sh/pm_runtime.c | 18 ------------------
 2 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/drivers/sh/Makefile b/drivers/sh/Makefile
index 114203f32843216f..786924c34436085e 100644
--- a/drivers/sh/Makefile
+++ b/drivers/sh/Makefile
@@ -8,4 +8,8 @@ endif
 obj-$(CONFIG_MAPLE)			+= maple/
 obj-$(CONFIG_SUPERHYWAY)		+= superhyway/
 
+obj-$(CONFIG_ARCH_SHMOBILE_LEGACY)	+= pm_runtime.o
+obj-$(CONFIG_SUPERH)			+= pm_runtime.o
+ifneq ($(CONFIG_PM),y)
 obj-y					+= pm_runtime.o
+endif
diff --git a/drivers/sh/pm_runtime.c b/drivers/sh/pm_runtime.c
index d3d1891cda3cf9a8..c887ecdaf19b7c10 100644
--- a/drivers/sh/pm_runtime.c
+++ b/drivers/sh/pm_runtime.c
@@ -34,24 +34,6 @@ static struct pm_clk_notifier_block platform_bus_notifier = {
 
 static int __init sh_pm_runtime_init(void)
 {
-	if (IS_ENABLED(CONFIG_ARCH_SHMOBILE_MULTI)) {
-		if (!of_machine_is_compatible("renesas,emev2") &&
-		    !of_machine_is_compatible("renesas,r7s72100") &&
-#ifndef CONFIG_PM_GENERIC_DOMAINS_OF
-		    !of_machine_is_compatible("renesas,r8a73a4") &&
-		    !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") &&
-		    !of_machine_is_compatible("renesas,r8a7790") &&
-		    !of_machine_is_compatible("renesas,r8a7791") &&
-		    !of_machine_is_compatible("renesas,r8a7792") &&
-		    !of_machine_is_compatible("renesas,r8a7793") &&
-		    !of_machine_is_compatible("renesas,r8a7794"))
-			return 0;
-	}
-
 	pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
 	return 0;
 }
-- 
1.9.1


WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Mike Turquette <mturquette@linaro.org>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Simon Horman <horms@verge.net.au>,
	Magnus Damm <magnus.damm@gmail.com>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Kevin Hilman <khilman@kernel.org>,
	Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-clk@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-sh@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH v2 12/14] drivers: sh: Stop using pm_runtime.c for multi-platform shmobile with genpd
Date: Thu, 28 May 2015 20:53:37 +0200	[thread overview]
Message-ID: <1432839219-475-13-git-send-email-geert+renesas@glider.be> (raw)
In-Reply-To: <1432839219-475-1-git-send-email-geert+renesas@glider.be>

Now most multi-platform ARM shmobile platforms (SH-Mobile, R-Mobile,
R-Car, RZ) use the CPG Clock Domain to take care of PM runtime
management of the module clocks, we no longer need the legacy default PM
domain hack, which also prevented registering the real PM domain.

EMMA Mobile EV2 doesn't have MSTP clocks and doesn't use the CPG Clock
Domain. But all its device drivers manage clocks explicitly, without
relying on Runtime PM, so it doesn't need the legacy default PM hack
neither.

Hence do not compile it when running an ARM multi-platform kernel with
genpd support.

The default PM domain is still needed:
  - for legacy SuperH,
  - for legacy (non-DT) ARM/shmobile platforms
      - without genpd support (r8a7778, r8a7779),
      - with genpd support, for devices in the "C5" always-on power
	area (r8a7740, sh73a0),
  - for the CONFIG_PM=n case.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
---
v2:
  - Add Reviewed-by,
  - Just stop compiling pm_runtime.c instead of using a runtime check,
    as no multi-platform ARM platforms need this anymore.
---
 drivers/sh/Makefile     |  4 ++++
 drivers/sh/pm_runtime.c | 18 ------------------
 2 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/drivers/sh/Makefile b/drivers/sh/Makefile
index 114203f32843216f..786924c34436085e 100644
--- a/drivers/sh/Makefile
+++ b/drivers/sh/Makefile
@@ -8,4 +8,8 @@ endif
 obj-$(CONFIG_MAPLE)			+= maple/
 obj-$(CONFIG_SUPERHYWAY)		+= superhyway/
 
+obj-$(CONFIG_ARCH_SHMOBILE_LEGACY)	+= pm_runtime.o
+obj-$(CONFIG_SUPERH)			+= pm_runtime.o
+ifneq ($(CONFIG_PM),y)
 obj-y					+= pm_runtime.o
+endif
diff --git a/drivers/sh/pm_runtime.c b/drivers/sh/pm_runtime.c
index d3d1891cda3cf9a8..c887ecdaf19b7c10 100644
--- a/drivers/sh/pm_runtime.c
+++ b/drivers/sh/pm_runtime.c
@@ -34,24 +34,6 @@ static struct pm_clk_notifier_block platform_bus_notifier = {
 
 static int __init sh_pm_runtime_init(void)
 {
-	if (IS_ENABLED(CONFIG_ARCH_SHMOBILE_MULTI)) {
-		if (!of_machine_is_compatible("renesas,emev2") &&
-		    !of_machine_is_compatible("renesas,r7s72100") &&
-#ifndef CONFIG_PM_GENERIC_DOMAINS_OF
-		    !of_machine_is_compatible("renesas,r8a73a4") &&
-		    !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") &&
-		    !of_machine_is_compatible("renesas,r8a7790") &&
-		    !of_machine_is_compatible("renesas,r8a7791") &&
-		    !of_machine_is_compatible("renesas,r8a7792") &&
-		    !of_machine_is_compatible("renesas,r8a7793") &&
-		    !of_machine_is_compatible("renesas,r8a7794"))
-			return 0;
-	}
-
 	pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
 	return 0;
 }
-- 
1.9.1


WARNING: multiple messages have this Message-ID (diff)
From: geert+renesas@glider.be (Geert Uytterhoeven)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 12/14] drivers: sh: Stop using pm_runtime.c for multi-platform shmobile with genpd
Date: Thu, 28 May 2015 20:53:37 +0200	[thread overview]
Message-ID: <1432839219-475-13-git-send-email-geert+renesas@glider.be> (raw)
In-Reply-To: <1432839219-475-1-git-send-email-geert+renesas@glider.be>

Now most multi-platform ARM shmobile platforms (SH-Mobile, R-Mobile,
R-Car, RZ) use the CPG Clock Domain to take care of PM runtime
management of the module clocks, we no longer need the legacy default PM
domain hack, which also prevented registering the real PM domain.

EMMA Mobile EV2 doesn't have MSTP clocks and doesn't use the CPG Clock
Domain. But all its device drivers manage clocks explicitly, without
relying on Runtime PM, so it doesn't need the legacy default PM hack
neither.

Hence do not compile it when running an ARM multi-platform kernel with
genpd support.

The default PM domain is still needed:
  - for legacy SuperH,
  - for legacy (non-DT) ARM/shmobile platforms
      - without genpd support (r8a7778, r8a7779),
      - with genpd support, for devices in the "C5" always-on power
	area (r8a7740, sh73a0),
  - for the CONFIG_PM=n case.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
---
v2:
  - Add Reviewed-by,
  - Just stop compiling pm_runtime.c instead of using a runtime check,
    as no multi-platform ARM platforms need this anymore.
---
 drivers/sh/Makefile     |  4 ++++
 drivers/sh/pm_runtime.c | 18 ------------------
 2 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/drivers/sh/Makefile b/drivers/sh/Makefile
index 114203f32843216f..786924c34436085e 100644
--- a/drivers/sh/Makefile
+++ b/drivers/sh/Makefile
@@ -8,4 +8,8 @@ endif
 obj-$(CONFIG_MAPLE)			+= maple/
 obj-$(CONFIG_SUPERHYWAY)		+= superhyway/
 
+obj-$(CONFIG_ARCH_SHMOBILE_LEGACY)	+= pm_runtime.o
+obj-$(CONFIG_SUPERH)			+= pm_runtime.o
+ifneq ($(CONFIG_PM),y)
 obj-y					+= pm_runtime.o
+endif
diff --git a/drivers/sh/pm_runtime.c b/drivers/sh/pm_runtime.c
index d3d1891cda3cf9a8..c887ecdaf19b7c10 100644
--- a/drivers/sh/pm_runtime.c
+++ b/drivers/sh/pm_runtime.c
@@ -34,24 +34,6 @@ static struct pm_clk_notifier_block platform_bus_notifier = {
 
 static int __init sh_pm_runtime_init(void)
 {
-	if (IS_ENABLED(CONFIG_ARCH_SHMOBILE_MULTI)) {
-		if (!of_machine_is_compatible("renesas,emev2") &&
-		    !of_machine_is_compatible("renesas,r7s72100") &&
-#ifndef CONFIG_PM_GENERIC_DOMAINS_OF
-		    !of_machine_is_compatible("renesas,r8a73a4") &&
-		    !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") &&
-		    !of_machine_is_compatible("renesas,r8a7790") &&
-		    !of_machine_is_compatible("renesas,r8a7791") &&
-		    !of_machine_is_compatible("renesas,r8a7792") &&
-		    !of_machine_is_compatible("renesas,r8a7793") &&
-		    !of_machine_is_compatible("renesas,r8a7794"))
-			return 0;
-	}
-
 	pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
 	return 0;
 }
-- 
1.9.1

  parent reply	other threads:[~2015-05-28 18:53 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28 18:53 [PATCH v2 00/14] ARM: shmobile: Add CPG Clock Domains Geert Uytterhoeven
2015-05-28 18:53 ` Geert Uytterhoeven
2015-05-28 18:53 ` Geert Uytterhoeven
2015-05-28 18:53 ` Geert Uytterhoeven
2015-05-28 18:53 ` [PATCH v2 01/14] clk: shmobile: Add CPG Clock Domain support Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-06-22 15:07   ` Geert Uytterhoeven
2015-06-22 15:07     ` Geert Uytterhoeven
2015-06-22 15:07     ` Geert Uytterhoeven
2015-06-22 15:07     ` Geert Uytterhoeven
2015-06-22 15:07     ` Geert Uytterhoeven
2015-05-28 18:53 ` [PATCH v2 02/14] clk: shmobile: r8a7778: " Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53 ` [PATCH v2 03/14] clk: shmobile: r8a7779: " Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53 ` [PATCH v2 04/14] clk: shmobile: rcar-gen2: " Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53 ` [PATCH v2 05/14] clk: shmobile: rz: " Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53 ` [PATCH v2 06/14] ARM: shmobile: r7s72100 dtsi: Add CPG Clock Domain Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53 ` [PATCH v2 07/14] ARM: shmobile: r8a7778 " Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53 ` [PATCH v2 08/14] ARM: shmobile: r8a7779 " Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53 ` [PATCH v2 09/14] ARM: shmobile: r8a7790 " Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53 ` [PATCH v2 10/14] ARM: shmobile: r8a7791 " Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53 ` [PATCH v2 11/14] ARM: shmobile: r8a7794 " Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53 ` Geert Uytterhoeven [this message]
2015-05-28 18:53   ` [PATCH v2 12/14] drivers: sh: Stop using pm_runtime.c for multi-platform shmobile with genpd Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-06-15 19:44   ` Geert Uytterhoeven
2015-06-15 19:44     ` Geert Uytterhoeven
2015-06-15 19:44     ` Geert Uytterhoeven
2015-06-15 19:44     ` Geert Uytterhoeven
2015-05-28 18:53 ` [PATCH v2 13/14] clk: shmobile: mstp: Consider "zb_clk" suitable for power management Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-06-22 20:05   ` Michael Turquette
2015-06-22 20:05     ` Michael Turquette
2015-06-22 20:05     ` Michael Turquette
2015-06-22 20:05     ` Michael Turquette
2015-06-22 20:05     ` Michael Turquette
2015-06-22 20:17     ` Geert Uytterhoeven
2015-06-22 20:17       ` Geert Uytterhoeven
2015-06-22 20:17       ` Geert Uytterhoeven
2015-06-22 20:17       ` Geert Uytterhoeven
2015-06-22 20:17       ` Geert Uytterhoeven
2015-05-28 18:53 ` [PATCH v2 14/14] ARM: shmobile: R-Mobile: Use CPG Clock Domain attach/detach helpers Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-05-28 18:53   ` Geert Uytterhoeven
2015-06-08 21:42 ` [PATCH v2 00/14] ARM: shmobile: Add CPG Clock Domains Stephen Boyd
2015-06-08 21:42   ` Stephen Boyd
2015-06-08 21:42   ` Stephen Boyd
2015-06-15 16:15 ` Geert Uytterhoeven
2015-06-15 16:15   ` Geert Uytterhoeven
2015-06-15 16:15   ` Geert Uytterhoeven
2015-06-15 16:15   ` Geert Uytterhoeven
2015-06-15 16:15   ` Geert Uytterhoeven
2015-06-15 18:39   ` Kevin Hilman
2015-06-15 18:39     ` Kevin Hilman
2015-06-15 18:39     ` Kevin Hilman
2015-06-15 18:39     ` Kevin Hilman
2015-06-15 18:39     ` Kevin Hilman
2015-06-22 20:46   ` Michael Turquette
2015-06-22 20:46     ` Michael Turquette
2015-06-22 20:46     ` Michael Turquette
2015-06-22 20:46     ` Michael Turquette
2015-06-23  8:59     ` Geert Uytterhoeven
2015-06-23  8:59       ` Geert Uytterhoeven
2015-06-23  8:59       ` Geert Uytterhoeven
2015-06-23  8:59       ` Geert Uytterhoeven

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=1432839219-475-13-git-send-email-geert+renesas@glider.be \
    --to=geert+renesas@glider.be \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

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

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