aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMagnus Damm <damm+renesas@opensource.se>2014-08-24 23:04:01 -0400
committerSimon Horman <horms+renesas@verge.net.au>2014-09-01 20:32:06 -0400
commitabebbc4a026d8cdceb9f65c497b3db445c8ff5e7 (patch)
treea602cbfc386a582e2eacfecc31bef3f8e60d2aad
parent1a950ca536dd5c40167ef58951e738ae430fa96d (diff)
ARM: shmobile: Cleanup pm-rmobile.o build using Kconfig
Add a CONFIG_PM_RMOBILE 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> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r--arch/arm/mach-shmobile/Kconfig4
-rw-r--r--arch/arm/mach-shmobile/Makefile14
-rw-r--r--arch/arm/mach-shmobile/pm-rmobile.c2
-rw-r--r--arch/arm/mach-shmobile/pm-rmobile.h4
4 files changed, 12 insertions, 12 deletions
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index cd13021cda5f..9295776ce136 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -4,6 +4,9 @@ config ARCH_SHMOBILE
4config PM_RCAR 4config PM_RCAR
5 bool 5 bool
6 6
7config PM_RMOBILE
8 bool
9
7config ARCH_RCAR_GEN1 10config ARCH_RCAR_GEN1
8 bool 11 bool
9 select PM_RCAR if PM || SMP 12 select PM_RCAR if PM || SMP
@@ -18,6 +21,7 @@ config ARCH_RCAR_GEN2
18 21
19config ARCH_RMOBILE 22config ARCH_RMOBILE
20 bool 23 bool
24 select PM_RMOBILE if PM
21 select SYS_SUPPORTS_SH_CMT 25 select SYS_SUPPORTS_SH_CMT
22 select SYS_SUPPORTS_SH_TMU 26 select SYS_SUPPORTS_SH_TMU
23 27
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index c9ad16910f0a..7b259ce60beb 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -8,10 +8,10 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/mach-shmobile/incl
8obj-y := timer.o console.o 8obj-y := timer.o console.o
9 9
10# CPU objects 10# CPU objects
11obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o intc-sh7372.o 11obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o intc-sh7372.o pm-sh7372.o
12obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o intc-sh73a0.o 12obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o intc-sh73a0.o pm-sh73a0.o
13obj-$(CONFIG_ARCH_R8A73A4) += setup-r8a73a4.o 13obj-$(CONFIG_ARCH_R8A73A4) += setup-r8a73a4.o
14obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o 14obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o pm-r8a7740.o
15obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.o 15obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.o
16obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o pm-r8a7779.o 16obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o pm-r8a7779.o
17obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o pm-r8a7790.o 17obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o pm-r8a7790.o
@@ -52,12 +52,10 @@ obj-$(CONFIG_SUSPEND) += suspend.o
52obj-$(CONFIG_CPU_IDLE) += cpuidle.o 52obj-$(CONFIG_CPU_IDLE) += cpuidle.o
53obj-$(CONFIG_CPU_FREQ) += cpufreq.o 53obj-$(CONFIG_CPU_FREQ) += cpufreq.o
54obj-$(CONFIG_PM_RCAR) += pm-rcar.o 54obj-$(CONFIG_PM_RCAR) += pm-rcar.o
55obj-$(CONFIG_ARCH_SH7372) += pm-sh7372.o sleep-sh7372.o pm-rmobile.o 55obj-$(CONFIG_PM_RMOBILE) += pm-rmobile.o
56obj-$(CONFIG_ARCH_SH73A0) += pm-sh73a0.o
57obj-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o pm-rmobile.o
58 56
59# IRQ objects 57# special sh7372 handling for IRQ objects and low level sleep code
60obj-$(CONFIG_ARCH_SH7372) += entry-intc.o 58obj-$(CONFIG_ARCH_SH7372) += entry-intc.o sleep-sh7372.o
61 59
62# Board objects 60# Board objects
63ifdef CONFIG_ARCH_SHMOBILE_MULTI 61ifdef CONFIG_ARCH_SHMOBILE_MULTI
diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c
index ebdd16e94a84..a88079af7914 100644
--- a/arch/arm/mach-shmobile/pm-rmobile.c
+++ b/arch/arm/mach-shmobile/pm-rmobile.c
@@ -27,7 +27,6 @@
27#define PSTR_RETRIES 100 27#define PSTR_RETRIES 100
28#define PSTR_DELAY_US 10 28#define PSTR_DELAY_US 10
29 29
30#ifdef CONFIG_PM
31static int rmobile_pd_power_down(struct generic_pm_domain *genpd) 30static int rmobile_pd_power_down(struct generic_pm_domain *genpd)
32{ 31{
33 struct rmobile_pm_domain *rmobile_pd = to_rmobile_pd(genpd); 32 struct rmobile_pm_domain *rmobile_pd = to_rmobile_pd(genpd);
@@ -151,4 +150,3 @@ void rmobile_add_devices_to_domains(struct pm_domain_device data[],
151 rmobile_add_device_to_domain_td(data[j].domain_name, 150 rmobile_add_device_to_domain_td(data[j].domain_name,
152 data[j].pdev, &latencies); 151 data[j].pdev, &latencies);
153} 152}
154#endif /* CONFIG_PM */
diff --git a/arch/arm/mach-shmobile/pm-rmobile.h b/arch/arm/mach-shmobile/pm-rmobile.h
index 690553a06887..8f66b343162b 100644
--- a/arch/arm/mach-shmobile/pm-rmobile.h
+++ b/arch/arm/mach-shmobile/pm-rmobile.h
@@ -36,7 +36,7 @@ struct pm_domain_device {
36 struct platform_device *pdev; 36 struct platform_device *pdev;
37}; 37};
38 38
39#ifdef CONFIG_PM 39#ifdef CONFIG_PM_RMOBILE
40extern void rmobile_init_domains(struct rmobile_pm_domain domains[], int num); 40extern void rmobile_init_domains(struct rmobile_pm_domain domains[], int num);
41extern void rmobile_add_device_to_domain_td(const char *domain_name, 41extern void rmobile_add_device_to_domain_td(const char *domain_name,
42 struct platform_device *pdev, 42 struct platform_device *pdev,
@@ -58,6 +58,6 @@ extern void rmobile_add_devices_to_domains(struct pm_domain_device data[],
58 58
59static inline void rmobile_add_devices_to_domains(struct pm_domain_device d[], 59static inline void rmobile_add_devices_to_domains(struct pm_domain_device d[],
60 int size) {} 60 int size) {}
61#endif /* CONFIG_PM */ 61#endif /* CONFIG_PM_RMOBILE */
62 62
63#endif /* PM_RMOBILE_H */ 63#endif /* PM_RMOBILE_H */