All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: shmobile: Partial build of pm-rmobile.c for multiplatform
@ 2014-08-08 10:59 Magnus Damm
  2014-08-11  1:03 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Magnus Damm @ 2014-08-08 10:59 UTC (permalink / raw)
  To: linux-sh

From: Magnus Damm <damm+renesas@opensource.se>

Disconnect Multiplatform PM domain enablement and
SoC specific Multiplatform enablement by allowing
to build pm-rmobile.c with parts of it disabled.

This way it is possible to start using r8a7740
with Multiplatform before PM domain DT is ready.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---

 Built on top of renesas-devel-v3.16-20140808

 arch/arm/mach-shmobile/pm-rmobile.c |    4 ++--
 arch/arm/mach-shmobile/pm-rmobile.h |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

--- 0001/arch/arm/mach-shmobile/pm-rmobile.c
+++ work/arch/arm/mach-shmobile/pm-rmobile.c	2014-08-07 15:36:40.000000000 +0900
@@ -27,7 +27,7 @@
 #define PSTR_RETRIES	100
 #define PSTR_DELAY_US	10
 
-#ifdef CONFIG_PM
+#if defined(CONFIG_PM) && !defined(CONFIG_ARCH_MULTIPLATFORM)
 static int rmobile_pd_power_down(struct generic_pm_domain *genpd)
 {
 	struct rmobile_pm_domain *rmobile_pd = to_rmobile_pd(genpd);
@@ -151,4 +151,4 @@ void rmobile_add_devices_to_domains(stru
 		rmobile_add_device_to_domain_td(data[j].domain_name,
 						data[j].pdev, &latencies);
 }
-#endif /* CONFIG_PM */
+#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */
--- 0001/arch/arm/mach-shmobile/pm-rmobile.h
+++ work/arch/arm/mach-shmobile/pm-rmobile.h	2014-08-07 15:34:58.000000000 +0900
@@ -36,7 +36,7 @@ struct pm_domain_device {
 	struct platform_device *pdev;
 };
 
-#ifdef CONFIG_PM
+#if defined(CONFIG_PM) && !defined(CONFIG_ARCH_MULTIPLATFORM)
 extern void rmobile_init_domains(struct rmobile_pm_domain domains[], int num);
 extern void rmobile_add_device_to_domain_td(const char *domain_name,
 					    struct platform_device *pdev,
@@ -58,6 +58,6 @@ extern void rmobile_add_devices_to_domai
 
 static inline void rmobile_add_devices_to_domains(struct pm_domain_device d[],
 						  int size) {}
-#endif /* CONFIG_PM */
+#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */
 
 #endif /* PM_RMOBILE_H */

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

* Re: [PATCH] ARM: shmobile: Partial build of pm-rmobile.c for multiplatform
  2014-08-08 10:59 [PATCH] ARM: shmobile: Partial build of pm-rmobile.c for multiplatform Magnus Damm
@ 2014-08-11  1:03 ` Simon Horman
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2014-08-11  1:03 UTC (permalink / raw)
  To: linux-sh

On Fri, Aug 08, 2014 at 07:59:23PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm+renesas@opensource.se>
> 
> Disconnect Multiplatform PM domain enablement and
> SoC specific Multiplatform enablement by allowing
> to build pm-rmobile.c with parts of it disabled.
> 
> This way it is possible to start using r8a7740
> with Multiplatform before PM domain DT is ready.

This seems to disconnect PM domain enablement and
all Multiplatform enablement. It doesn't seem very SoC specific to me.

Would it be possible to define a new Kconfig symbol,
say PM_RMOBILE, which is only selected when the code in
pm-rmobile.c is wanted?

It could even be used in the Makefile to allow us
to get rid of the big #ifdef in pm-rmobile.c.


Alternatively, if you want to keep the code as below perhaps
you could update the changelog to note that the intersection
of multiplatform and pm-rmobile only occurs on the
r8a7740 at this time and is not likely to occur anywhere else in
the forseeable future.

> 
> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
> ---
> 
>  Built on top of renesas-devel-v3.16-20140808
> 
>  arch/arm/mach-shmobile/pm-rmobile.c |    4 ++--
>  arch/arm/mach-shmobile/pm-rmobile.h |    4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> --- 0001/arch/arm/mach-shmobile/pm-rmobile.c
> +++ work/arch/arm/mach-shmobile/pm-rmobile.c	2014-08-07 15:36:40.000000000 +0900
> @@ -27,7 +27,7 @@
>  #define PSTR_RETRIES	100
>  #define PSTR_DELAY_US	10
>  
> -#ifdef CONFIG_PM
> +#if defined(CONFIG_PM) && !defined(CONFIG_ARCH_MULTIPLATFORM)
>  static int rmobile_pd_power_down(struct generic_pm_domain *genpd)
>  {
>  	struct rmobile_pm_domain *rmobile_pd = to_rmobile_pd(genpd);
> @@ -151,4 +151,4 @@ void rmobile_add_devices_to_domains(stru
>  		rmobile_add_device_to_domain_td(data[j].domain_name,
>  						data[j].pdev, &latencies);
>  }
> -#endif /* CONFIG_PM */
> +#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */
> --- 0001/arch/arm/mach-shmobile/pm-rmobile.h
> +++ work/arch/arm/mach-shmobile/pm-rmobile.h	2014-08-07 15:34:58.000000000 +0900
> @@ -36,7 +36,7 @@ struct pm_domain_device {
>  	struct platform_device *pdev;
>  };
>  
> -#ifdef CONFIG_PM
> +#if defined(CONFIG_PM) && !defined(CONFIG_ARCH_MULTIPLATFORM)
>  extern void rmobile_init_domains(struct rmobile_pm_domain domains[], int num);
>  extern void rmobile_add_device_to_domain_td(const char *domain_name,
>  					    struct platform_device *pdev,
> @@ -58,6 +58,6 @@ extern void rmobile_add_devices_to_domai
>  
>  static inline void rmobile_add_devices_to_domains(struct pm_domain_device d[],
>  						  int size) {}
> -#endif /* CONFIG_PM */
> +#endif /* CONFIG_PM && !CONFIG_ARCH_MULTIPLATFORM */
>  
>  #endif /* PM_RMOBILE_H */
> 

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

end of thread, other threads:[~2014-08-11  1:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-08 10:59 [PATCH] ARM: shmobile: Partial build of pm-rmobile.c for multiplatform Magnus Damm
2014-08-11  1:03 ` 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.