diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2012-05-10 06:02:57 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2012-06-19 18:22:37 -0400 |
commit | 164e0cbf608214bddc4d28e2777f49e7b3a0f65c (patch) | |
tree | 99990a0a737b7f2f40f50f0424db986df4c4c959 /arch/arm/mach-omap2/Makefile | |
parent | a819c4f16d5a2708c11e708fd59a96565c5384a8 (diff) |
ARM: OMAP3/4: consolidate cpuidle Makefile
The current Makefile compiles the cpuidle34xx.c and cpuidle44xx.c files
even if the cpuidle option is not set in the kernel.
This patch fixes this by creating a section in the Makefile where these
files are compiled only if the CONFIG_CPU_IDLE option is set.
This modification breaks an implicit dependency between CPU_IDLE and PM as
they belong to the same block in the Makefile. This is fixed in the Kconfig
by selecting explicitely PM is CPU_IDLE is set.
The linux coding style recommend to use no-op functions in the headers
when the subsystem is disabled instead of adding big section in C files.
This patch fix this also.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Jean Pihet <j-pihet@ti.com>
Reviewed-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/Makefile')
-rw-r--r-- | arch/arm/mach-omap2/Makefile | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index fa742f3c2629..6be43ac5c35c 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -66,9 +66,7 @@ ifeq ($(CONFIG_PM),y) | |||
66 | obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o | 66 | obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o |
67 | obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o | 67 | obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o |
68 | obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o | 68 | obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o |
69 | obj-$(CONFIG_ARCH_OMAP3) += cpuidle34xx.o | ||
70 | obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o omap-mpuss-lowpower.o | 69 | obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o omap-mpuss-lowpower.o |
71 | obj-$(CONFIG_ARCH_OMAP4) += cpuidle44xx.o | ||
72 | obj-$(CONFIG_PM_DEBUG) += pm-debug.o | 70 | obj-$(CONFIG_PM_DEBUG) += pm-debug.o |
73 | obj-$(CONFIG_OMAP_SMARTREFLEX) += sr_device.o smartreflex.o | 71 | obj-$(CONFIG_OMAP_SMARTREFLEX) += sr_device.o smartreflex.o |
74 | obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3) += smartreflex-class3.o | 72 | obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3) += smartreflex-class3.o |
@@ -82,6 +80,11 @@ endif | |||
82 | 80 | ||
83 | endif | 81 | endif |
84 | 82 | ||
83 | ifeq ($(CONFIG_CPU_IDLE),y) | ||
84 | obj-$(CONFIG_ARCH_OMAP3) += cpuidle34xx.o | ||
85 | obj-$(CONFIG_ARCH_OMAP4) += cpuidle44xx.o | ||
86 | endif | ||
87 | |||
85 | # PRCM | 88 | # PRCM |
86 | obj-y += prm_common.o | 89 | obj-y += prm_common.o |
87 | obj-$(CONFIG_ARCH_OMAP2) += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o | 90 | obj-$(CONFIG_ARCH_OMAP2) += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o |