linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 06/06] ARM: shmobile: Cleanup pm-rmobile.o build using Kconfig
@ 2014-08-20 13:32 Magnus Damm
  2014-08-20 14:33 ` Geert Uytterhoeven
  2014-08-20 14:49 ` Magnus Damm
  0 siblings, 2 replies; 3+ messages in thread
From: Magnus Damm @ 2014-08-20 13:32 UTC (permalink / raw)
  To: linux-sh

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

Add a CONFIG_PM_MOBILE entry and enable it for R-Mobile
SoCs in case CONFIG_PM is set. Consolidate Makefile power
management objects and get rid of #ifdefs in the C code.

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

 This is multiplatform preparation for R-Mobile SoCs.

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

--- 0006/arch/arm/mach-shmobile/Kconfig
+++ work/arch/arm/mach-shmobile/Kconfig	2014-08-19 22:28:58.000000000 +0900
@@ -5,6 +5,9 @@ config ARCH_SHMOBILE
 config PM_RCAR
 	bool
 
+config PM_RMOBILE
+	bool
+
 config ARCH_RCAR_GEN1
 	bool
 	select PM_RCAR if PM || SMP
@@ -19,6 +22,7 @@ config ARCH_RCAR_GEN2
 
 config ARCH_RMOBILE
 	bool
+	select PM_RMOBILE if PM
 	select SYS_SUPPORTS_SH_CMT
 	select SYS_SUPPORTS_SH_TMU
  
--- 0006/arch/arm/mach-shmobile/Makefile
+++ work/arch/arm/mach-shmobile/Makefile	2014-08-19 22:35:23.000000000 +0900
@@ -6,10 +6,10 @@
 obj-y				:= timer.o console.o
 
 # CPU objects
-obj-$(CONFIG_ARCH_SH7372)	+= setup-sh7372.o intc-sh7372.o
-obj-$(CONFIG_ARCH_SH73A0)	+= setup-sh73a0.o intc-sh73a0.o
+obj-$(CONFIG_ARCH_SH7372)	+= setup-sh7372.o intc-sh7372.o pm-sh7372.o
+obj-$(CONFIG_ARCH_SH73A0)	+= setup-sh73a0.o intc-sh73a0.o pm-sh73a0.o
 obj-$(CONFIG_ARCH_R8A73A4)	+= setup-r8a73a4.o
-obj-$(CONFIG_ARCH_R8A7740)	+= setup-r8a7740.o
+obj-$(CONFIG_ARCH_R8A7740)	+= setup-r8a7740.o pm-r8a7740.o
 obj-$(CONFIG_ARCH_R8A7778)	+= setup-r8a7778.o
 obj-$(CONFIG_ARCH_R8A7779)	+= setup-r8a7779.o pm-r8a7779.o
 obj-$(CONFIG_ARCH_R8A7790)	+= setup-r8a7790.o pm-r8a7790.o
@@ -49,12 +49,10 @@ obj-$(CONFIG_SUSPEND)		+= suspend.o
 obj-$(CONFIG_CPU_IDLE)		+= cpuidle.o
 obj-$(CONFIG_CPU_FREQ)		+= cpufreq.o
 obj-$(CONFIG_PM_RCAR)		+= pm-rcar.o
-obj-$(CONFIG_ARCH_SH7372)	+= pm-sh7372.o sleep-sh7372.o pm-rmobile.o
-obj-$(CONFIG_ARCH_SH73A0)	+= pm-sh73a0.o
-obj-$(CONFIG_ARCH_R8A7740)	+= pm-r8a7740.o pm-rmobile.o
+obj-$(CONFIG_PM_RMOBILE)	+= pm-rmobile.o
 
-# IRQ objects
-obj-$(CONFIG_ARCH_SH7372)	+= entry-intc.o
+# special sh7372 handling for IRQ objects and low level sleep code
+obj-$(CONFIG_ARCH_SH7372)	+= entry-intc.o sleep-sh7372.o
 
 # Board objects
 ifdef CONFIG_ARCH_SHMOBILE_MULTI
--- 0001/arch/arm/mach-shmobile/pm-rmobile.c
+++ work/arch/arm/mach-shmobile/pm-rmobile.c	2014-08-19 22:30:37.000000000 +0900
@@ -27,7 +27,6 @@
 #define PSTR_RETRIES	100
 #define PSTR_DELAY_US	10
 
-#ifdef CONFIG_PM
 static int rmobile_pd_power_down(struct generic_pm_domain *genpd)
 {
 	struct rmobile_pm_domain *rmobile_pd = to_rmobile_pd(genpd);
@@ -151,4 +150,3 @@ void rmobile_add_devices_to_domains(stru
 		rmobile_add_device_to_domain_td(data[j].domain_name,
 						data[j].pdev, &latencies);
 }
-#endif /* CONFIG_PM */
--- 0001/arch/arm/mach-shmobile/pm-rmobile.h
+++ work/arch/arm/mach-shmobile/pm-rmobile.h	2014-08-19 22:30:52.000000000 +0900
@@ -36,7 +36,7 @@ struct pm_domain_device {
 	struct platform_device *pdev;
 };
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_RMOBILE
 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_RMOBILE */
 
 #endif /* PM_RMOBILE_H */

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

* Re: [PATCH 06/06] ARM: shmobile: Cleanup pm-rmobile.o build using Kconfig
  2014-08-20 13:32 [PATCH 06/06] ARM: shmobile: Cleanup pm-rmobile.o build using Kconfig Magnus Damm
@ 2014-08-20 14:33 ` Geert Uytterhoeven
  2014-08-20 14:49 ` Magnus Damm
  1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2014-08-20 14:33 UTC (permalink / raw)
  To: linux-sh

On Wed, Aug 20, 2014 at 3:32 PM, Magnus Damm <magnus.damm@gmail.com> wrote:
> Add a CONFIG_PM_MOBILE entry and enable it for R-Mobile

CONFIG_PM_RMOBILE

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] 3+ messages in thread

* Re: [PATCH 06/06] ARM: shmobile: Cleanup pm-rmobile.o build using Kconfig
  2014-08-20 13:32 [PATCH 06/06] ARM: shmobile: Cleanup pm-rmobile.o build using Kconfig Magnus Damm
  2014-08-20 14:33 ` Geert Uytterhoeven
@ 2014-08-20 14:49 ` Magnus Damm
  1 sibling, 0 replies; 3+ messages in thread
From: Magnus Damm @ 2014-08-20 14:49 UTC (permalink / raw)
  To: linux-sh

On Wed, Aug 20, 2014 at 11:33 PM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> On Wed, Aug 20, 2014 at 3:32 PM, Magnus Damm <magnus.damm@gmail.com> wrote:
>> Add a CONFIG_PM_MOBILE entry and enable it for R-Mobile
>
> CONFIG_PM_RMOBILE

Thanks, will fix!

/ magnus

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

end of thread, other threads:[~2014-08-20 14:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-20 13:32 [PATCH 06/06] ARM: shmobile: Cleanup pm-rmobile.o build using Kconfig Magnus Damm
2014-08-20 14:33 ` Geert Uytterhoeven
2014-08-20 14:49 ` Magnus Damm

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).