linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: horms+renesas@verge.net.au (Simon Horman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/9] ARM: shmobile: Cleanup pm-rcar.o build using Kconfig
Date: Thu,  4 Sep 2014 10:12:35 +0900	[thread overview]
Message-ID: <1a950ca536dd5c40167ef58951e738ae430fa96d.1409792454.git.horms+renesas@verge.net.au> (raw)
In-Reply-To: <cover.1409792454.git.horms+renesas@verge.net.au>

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

Add a CONFIG_PM_RCAR entry and enable it for R-Car
Generation 1 or 2 in case CONFIG_PM or CONFIG_SMP
is set. Consolidate power management objects and
get rid of #ifdefs in the C code.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/mach-shmobile/Kconfig   |  5 +++++
 arch/arm/mach-shmobile/Makefile  | 10 ++++------
 arch/arm/mach-shmobile/pm-rcar.c |  4 ----
 3 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 73d6d3d..cd13021 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -1,13 +1,18 @@
 config ARCH_SHMOBILE
 	bool
 
+config PM_RCAR
+	bool
+
 config ARCH_RCAR_GEN1
 	bool
+	select PM_RCAR if PM || SMP
 	select RENESAS_INTC_IRQPIN
 	select SYS_SUPPORTS_SH_TMU
 
 config ARCH_RCAR_GEN2
 	bool
+	select PM_RCAR if PM || SMP
 	select RENESAS_IRQC
 	select SYS_SUPPORTS_SH_CMT
 
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index ddc91fd..c9ad169 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -13,9 +13,9 @@ obj-$(CONFIG_ARCH_SH73A0)	+= setup-sh73a0.o intc-sh73a0.o
 obj-$(CONFIG_ARCH_R8A73A4)	+= setup-r8a73a4.o
 obj-$(CONFIG_ARCH_R8A7740)	+= setup-r8a7740.o
 obj-$(CONFIG_ARCH_R8A7778)	+= setup-r8a7778.o
-obj-$(CONFIG_ARCH_R8A7779)	+= setup-r8a7779.o
-obj-$(CONFIG_ARCH_R8A7790)	+= setup-r8a7790.o
-obj-$(CONFIG_ARCH_R8A7791)	+= setup-r8a7791.o
+obj-$(CONFIG_ARCH_R8A7779)	+= setup-r8a7779.o pm-r8a7779.o
+obj-$(CONFIG_ARCH_R8A7790)	+= setup-r8a7790.o pm-r8a7790.o
+obj-$(CONFIG_ARCH_R8A7791)	+= setup-r8a7791.o pm-r8a7791.o
 obj-$(CONFIG_ARCH_EMEV2)	+= setup-emev2.o
 obj-$(CONFIG_ARCH_R7S72100)	+= setup-r7s72100.o
 
@@ -51,12 +51,10 @@ smp-$(CONFIG_ARCH_EMEV2)	+= smp-emev2.o headsmp-scu.o platsmp-scu.o
 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_ARCH_R8A7779)	+= pm-r8a7779.o pm-rcar.o
-obj-$(CONFIG_ARCH_R8A7790)	+= pm-r8a7790.o pm-rcar.o
-obj-$(CONFIG_ARCH_R8A7791)	+= pm-r8a7791.o pm-rcar.o
 
 # IRQ objects
 obj-$(CONFIG_ARCH_SH7372)	+= entry-intc.o
diff --git a/arch/arm/mach-shmobile/pm-rcar.c b/arch/arm/mach-shmobile/pm-rcar.c
index 34b8a56..00022ee 100644
--- a/arch/arm/mach-shmobile/pm-rcar.c
+++ b/arch/arm/mach-shmobile/pm-rcar.c
@@ -31,8 +31,6 @@
 #define SYSCISR_RETRIES 1000
 #define SYSCISR_DELAY_US 1
 
-#if defined(CONFIG_PM) || defined(CONFIG_SMP)
-
 static void __iomem *rcar_sysc_base;
 static DEFINE_SPINLOCK(rcar_sysc_lock); /* SMP CPUs + I/O devices */
 
@@ -137,5 +135,3 @@ void __iomem *rcar_sysc_init(phys_addr_t base)
 
 	return rcar_sysc_base;
 }
-
-#endif /* CONFIG_PM || CONFIG_SMP */
-- 
2.0.1

  parent reply	other threads:[~2014-09-04  1:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-04  1:12 [GIT PULL] Renesas ARM Based SoC Kconfig Cleanups for v3.18 Simon Horman
2014-09-04  1:12 ` [PATCH 1/9] ARM: shmobile: Introduce a Kconfig entry for R-Mobile Simon Horman
2014-09-04  1:12 ` [PATCH 2/9] ARM: shmobile: Introduce a Kconfig entry for R-Car Gen1 Simon Horman
2014-09-04  1:12 ` [PATCH 3/9] ARM: shmobile: Introduce a Kconfig entry for R-Car Gen2 Simon Horman
2014-09-04  1:12 ` Simon Horman [this message]
2014-09-04  1:12 ` [PATCH 5/9] ARM: shmobile: Cleanup pm-rmobile.o build using Kconfig Simon Horman
2014-09-04  1:12 ` [PATCH 6/9] ARM: shmobile: Only select PM_RMOBILE for legacy case Simon Horman
2014-09-04  1:12 ` [PATCH 7/9] ARM: shmobile: Consolidate Legacy CPU_V7 Kconfig Simon Horman
2014-09-04  1:12 ` [PATCH 8/9] ARM: shmobile: Consolidate Legacy SH_CLK_CPG Kconfig Simon Horman
2014-09-04  1:12 ` [PATCH 9/9] ARM: shmobile: r8a7791 is now called "R-Car M2-W" Simon Horman
2014-09-05 16:15 ` [GIT PULL] Renesas ARM Based SoC Kconfig Cleanups for v3.18 Arnd Bergmann

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=1a950ca536dd5c40167ef58951e738ae430fa96d.1409792454.git.horms+renesas@verge.net.au \
    --to=horms+renesas@verge.net.au \
    --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 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).