diff options
| author | Magnus Damm <damm+renesas@opensource.se> | 2014-08-24 23:04:01 -0400 |
|---|---|---|
| committer | Simon Horman <horms+renesas@verge.net.au> | 2014-09-01 20:32:06 -0400 |
| commit | abebbc4a026d8cdceb9f65c497b3db445c8ff5e7 (patch) | |
| tree | a602cbfc386a582e2eacfecc31bef3f8e60d2aad | |
| parent | 1a950ca536dd5c40167ef58951e738ae430fa96d (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/Kconfig | 4 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/Makefile | 14 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/pm-rmobile.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/pm-rmobile.h | 4 |
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 | |||
| 4 | config PM_RCAR | 4 | config PM_RCAR |
| 5 | bool | 5 | bool |
| 6 | 6 | ||
| 7 | config PM_RMOBILE | ||
| 8 | bool | ||
| 9 | |||
| 7 | config ARCH_RCAR_GEN1 | 10 | config 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 | ||
| 19 | config ARCH_RMOBILE | 22 | config 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 | |||
| 8 | obj-y := timer.o console.o | 8 | obj-y := timer.o console.o |
| 9 | 9 | ||
| 10 | # CPU objects | 10 | # CPU objects |
| 11 | obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o intc-sh7372.o | 11 | obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o intc-sh7372.o pm-sh7372.o |
| 12 | obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o intc-sh73a0.o | 12 | obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o intc-sh73a0.o pm-sh73a0.o |
| 13 | obj-$(CONFIG_ARCH_R8A73A4) += setup-r8a73a4.o | 13 | obj-$(CONFIG_ARCH_R8A73A4) += setup-r8a73a4.o |
| 14 | obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o | 14 | obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o pm-r8a7740.o |
| 15 | obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.o | 15 | obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.o |
| 16 | obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o pm-r8a7779.o | 16 | obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o pm-r8a7779.o |
| 17 | obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o pm-r8a7790.o | 17 | obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o pm-r8a7790.o |
| @@ -52,12 +52,10 @@ obj-$(CONFIG_SUSPEND) += suspend.o | |||
| 52 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o | 52 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o |
| 53 | obj-$(CONFIG_CPU_FREQ) += cpufreq.o | 53 | obj-$(CONFIG_CPU_FREQ) += cpufreq.o |
| 54 | obj-$(CONFIG_PM_RCAR) += pm-rcar.o | 54 | obj-$(CONFIG_PM_RCAR) += pm-rcar.o |
| 55 | obj-$(CONFIG_ARCH_SH7372) += pm-sh7372.o sleep-sh7372.o pm-rmobile.o | 55 | obj-$(CONFIG_PM_RMOBILE) += pm-rmobile.o |
| 56 | obj-$(CONFIG_ARCH_SH73A0) += pm-sh73a0.o | ||
| 57 | obj-$(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 |
| 60 | obj-$(CONFIG_ARCH_SH7372) += entry-intc.o | 58 | obj-$(CONFIG_ARCH_SH7372) += entry-intc.o sleep-sh7372.o |
| 61 | 59 | ||
| 62 | # Board objects | 60 | # Board objects |
| 63 | ifdef CONFIG_ARCH_SHMOBILE_MULTI | 61 | ifdef 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 | ||
| 31 | static int rmobile_pd_power_down(struct generic_pm_domain *genpd) | 30 | static 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 |
| 40 | extern void rmobile_init_domains(struct rmobile_pm_domain domains[], int num); | 40 | extern void rmobile_init_domains(struct rmobile_pm_domain domains[], int num); |
| 41 | extern void rmobile_add_device_to_domain_td(const char *domain_name, | 41 | extern 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 | ||
| 59 | static inline void rmobile_add_devices_to_domains(struct pm_domain_device d[], | 59 | static 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 */ |
