linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] SH Driver Updates for v3.15
@ 2014-05-13  7:42 Simon Horman
  2014-05-13  7:42 ` [PATCH] drivers: sh: compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI Simon Horman
  2014-05-26  0:30 ` [GIT PULL] SH Driver Updates for v3.15 Simon Horman
  0 siblings, 2 replies; 3+ messages in thread
From: Simon Horman @ 2014-05-13  7:42 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-sh, linux-kernel, Magnus Damm, Paul Mundt,
	Geert Uytterhoeven, Ben Dooks, Simon Horman

Hi Linus,

Please consider this SH Driver Update for v3.15.

It consists of a single fix for a regression
introduced in v3.14 by bf98c1eac1d4a6bcf00532e4fa41d8126cd6c187.


This is my first pull-request to you for these drivers.

It is my understanding that previously the SH Drivers were maintained by
Paul Mundt as part of his maintenance of the SH architecture and Renesas
ARM Based SoCs. These days the SH architecture is orphaned and the Renesas
ARM Based SoCs are maintained by Magnus Damm and I.

Over the past year or so there have been very few updates to these drivers.
And the few that have been made have generally been taken by other
subsystem maintainers as part of larger patchsets. As this patch
does not fall into that category I would like you to consider pulling it.


The following changes since commit c9eaa447e77efe77b7fa4c953bd62de8297fd6c5:

  Linux 3.15-rc1 (2014-04-13 14:18:35 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-sh-drivers-for-v3.15

for you to fetch changes up to 3c90c55dcde745bed81f6447f24ba96bda43d984:

  drivers: sh: compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI (2014-05-12 16:05:01 +0900)

----------------------------------------------------------------
SH Driver Updates for v3.15

* Compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI

----------------------------------------------------------------
Geert Uytterhoeven (1):
      drivers: sh: compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI

 drivers/Makefile        |  2 +-
 drivers/sh/Makefile     | 14 ++++++++------
 drivers/sh/pm_runtime.c | 20 +++++++++++++++++++-
 3 files changed, 28 insertions(+), 8 deletions(-)


The following changes since commit c9eaa447e77efe77b7fa4c953bd62de8297fd6c5:

  Linux 3.15-rc1 (2014-04-13 14:18:35 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-sh-drivers-for-v3.15

for you to fetch changes up to 3c90c55dcde745bed81f6447f24ba96bda43d984:

  drivers: sh: compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI (2014-05-12 16:05:01 +0900)

----------------------------------------------------------------
SH Driver Update for v3.15

* Compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI

  This resolves a regression introduced in v3.14 by
  bf98c1eac1d4a6 ("ARM: Rename ARCH_SHMOBILE to ARCH_SHMOBILE_LEGACY").

----------------------------------------------------------------
Geert Uytterhoeven (1):
      drivers: sh: compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI

 drivers/Makefile        |  2 +-
 drivers/sh/Makefile     | 14 ++++++++------
 drivers/sh/pm_runtime.c | 20 +++++++++++++++++++-
 3 files changed, 28 insertions(+), 8 deletions(-)

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

* [PATCH] drivers: sh: compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI
  2014-05-13  7:42 [GIT PULL] SH Driver Updates for v3.15 Simon Horman
@ 2014-05-13  7:42 ` Simon Horman
  2014-05-26  0:30 ` [GIT PULL] SH Driver Updates for v3.15 Simon Horman
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2014-05-13  7:42 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-sh, linux-kernel, Magnus Damm, Paul Mundt,
	Geert Uytterhoeven, Ben Dooks, Geert Uytterhoeven, Simon Horman

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

If the kernel is built to support multi-ARM configuration with shmobile
support built in, then drivers/sh is not built. This contains the PM
runtime code in drivers/sh/pm_runtime.c, which implicitly enables the
module clocks for all devices, and thus is quite essential.
Without this, the state of clocks depends on implicit reset state, or on
the bootloader.

If ARCH_SHMOBILE_MULTI then build the drivers/sh directory, but ensure that
bits that may conflict (drivers/sh/clk if the common clock framework is
enabled) or are not used (drivers/sh/intc), are not built.
Also, only enable the PM runtime code when actually running on a shmobile
SoCs that needs it.

ARCH_SHMOBILE_MULTI was added a while ago by commit
efacfce5f8a523457e9419a25d52fe39db00b26a ("ARM: shmobile: Introduce
ARCH_SHMOBILE_MULTI"), but drivers/sh was compiled for both
ARCH_SHMOBILE_LEGACY and ARCH_SHMOBILE_MULTI until commit
bf98c1eac1d4a6bcf00532e4fa41d8126cd6c187 ("ARM: Rename ARCH_SHMOBILE to
ARCH_SHMOBILE_LEGACY").

Inspired by a patch from Ben Dooks <ben.dooks@codethink.co.uk>.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 drivers/Makefile        |  2 +-
 drivers/sh/Makefile     | 14 ++++++++------
 drivers/sh/pm_runtime.c | 20 +++++++++++++++++++-
 3 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index e3ced91..c033798 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -119,7 +119,7 @@ obj-$(CONFIG_SGI_SN)		+= sn/
 obj-y				+= firmware/
 obj-$(CONFIG_CRYPTO)		+= crypto/
 obj-$(CONFIG_SUPERH)		+= sh/
-obj-$(CONFIG_ARCH_SHMOBILE_LEGACY)	+= sh/
+obj-$(CONFIG_ARCH_SHMOBILE)	+= sh/
 ifndef CONFIG_ARCH_USES_GETTIMEOFFSET
 obj-y				+= clocksource/
 endif
diff --git a/drivers/sh/Makefile b/drivers/sh/Makefile
index fc67f56..788ed9b 100644
--- a/drivers/sh/Makefile
+++ b/drivers/sh/Makefile
@@ -1,10 +1,12 @@
 #
 # Makefile for the SuperH specific drivers.
 #
-obj-y	:= intc/
+obj-$(CONFIG_SUPERH)			+= intc/
+obj-$(CONFIG_ARCH_SHMOBILE_LEGACY)	+= intc/
+ifneq ($(CONFIG_COMMON_CLK),y)
+obj-$(CONFIG_HAVE_CLK)			+= clk/
+endif
+obj-$(CONFIG_MAPLE)			+= maple/
+obj-$(CONFIG_SUPERHYWAY)		+= superhyway/
 
-obj-$(CONFIG_HAVE_CLK)		+= clk/
-obj-$(CONFIG_MAPLE)		+= maple/
-obj-$(CONFIG_SUPERHYWAY)	+= superhyway/
-
-obj-y				+= pm_runtime.o
+obj-y					+= pm_runtime.o
diff --git a/drivers/sh/pm_runtime.c b/drivers/sh/pm_runtime.c
index 8afa5a4..10c65eb 100644
--- a/drivers/sh/pm_runtime.c
+++ b/drivers/sh/pm_runtime.c
@@ -50,8 +50,25 @@ static struct pm_clk_notifier_block platform_bus_notifier = {
 	.con_ids = { NULL, },
 };
 
+static bool default_pm_on;
+
 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") &&
+		    !of_machine_is_compatible("renesas,r8a73a4") &&
+		    !of_machine_is_compatible("renesas,r8a7740") &&
+		    !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,sh7372") &&
+		    !of_machine_is_compatible("renesas,sh73a0"))
+			return 0;
+	}
+
+	default_pm_on = true;
 	pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
 	return 0;
 }
@@ -59,7 +76,8 @@ core_initcall(sh_pm_runtime_init);
 
 static int __init sh_pm_runtime_late_init(void)
 {
-	pm_genpd_poweroff_unused();
+	if (default_pm_on)
+		pm_genpd_poweroff_unused();
 	return 0;
 }
 late_initcall(sh_pm_runtime_late_init);
-- 
1.8.5.2


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

* Re: [GIT PULL] SH Driver Updates for v3.15
  2014-05-13  7:42 [GIT PULL] SH Driver Updates for v3.15 Simon Horman
  2014-05-13  7:42 ` [PATCH] drivers: sh: compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI Simon Horman
@ 2014-05-26  0:30 ` Simon Horman
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2014-05-26  0:30 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-sh, linux-kernel, Magnus Damm, Paul Mundt,
	Geert Uytterhoeven, Ben Dooks

[ For the benefit of those watching at home ]

Linus pulled this and it was included in v3.15-rc6.

Thanks Linus, Geert and a cast of 1000s.

On Tue, May 13, 2014 at 04:42:04PM +0900, Simon Horman wrote:
> Hi Linus,
> 
> Please consider this SH Driver Update for v3.15.
> 
> It consists of a single fix for a regression
> introduced in v3.14 by bf98c1eac1d4a6bcf00532e4fa41d8126cd6c187.
> 
> 
> This is my first pull-request to you for these drivers.
> 
> It is my understanding that previously the SH Drivers were maintained by
> Paul Mundt as part of his maintenance of the SH architecture and Renesas
> ARM Based SoCs. These days the SH architecture is orphaned and the Renesas
> ARM Based SoCs are maintained by Magnus Damm and I.
> 
> Over the past year or so there have been very few updates to these drivers.
> And the few that have been made have generally been taken by other
> subsystem maintainers as part of larger patchsets. As this patch
> does not fall into that category I would like you to consider pulling it.
> 
> 
> The following changes since commit c9eaa447e77efe77b7fa4c953bd62de8297fd6c5:
> 
>   Linux 3.15-rc1 (2014-04-13 14:18:35 -0700)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-sh-drivers-for-v3.15
> 
> for you to fetch changes up to 3c90c55dcde745bed81f6447f24ba96bda43d984:
> 
>   drivers: sh: compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI (2014-05-12 16:05:01 +0900)
> 
> ----------------------------------------------------------------
> SH Driver Updates for v3.15
> 
> * Compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI
> 
> ----------------------------------------------------------------
> Geert Uytterhoeven (1):
>       drivers: sh: compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI
> 
>  drivers/Makefile        |  2 +-
>  drivers/sh/Makefile     | 14 ++++++++------
>  drivers/sh/pm_runtime.c | 20 +++++++++++++++++++-
>  3 files changed, 28 insertions(+), 8 deletions(-)
> 
> 
> The following changes since commit c9eaa447e77efe77b7fa4c953bd62de8297fd6c5:
> 
>   Linux 3.15-rc1 (2014-04-13 14:18:35 -0700)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-sh-drivers-for-v3.15
> 
> for you to fetch changes up to 3c90c55dcde745bed81f6447f24ba96bda43d984:
> 
>   drivers: sh: compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI (2014-05-12 16:05:01 +0900)
> 
> ----------------------------------------------------------------
> SH Driver Update for v3.15
> 
> * Compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI
> 
>   This resolves a regression introduced in v3.14 by
>   bf98c1eac1d4a6 ("ARM: Rename ARCH_SHMOBILE to ARCH_SHMOBILE_LEGACY").
> 
> ----------------------------------------------------------------
> Geert Uytterhoeven (1):
>       drivers: sh: compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI
> 
>  drivers/Makefile        |  2 +-
>  drivers/sh/Makefile     | 14 ++++++++------
>  drivers/sh/pm_runtime.c | 20 +++++++++++++++++++-
>  3 files changed, 28 insertions(+), 8 deletions(-)
> 

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

end of thread, other threads:[~2014-05-26  0:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-13  7:42 [GIT PULL] SH Driver Updates for v3.15 Simon Horman
2014-05-13  7:42 ` [PATCH] drivers: sh: compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI Simon Horman
2014-05-26  0:30 ` [GIT PULL] SH Driver Updates for v3.15 Simon Horman

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