@@ -53,22 +53,38 @@ obj-$(CONFIG_ARCH_OMAP2) += sdrc2xxx.o
# Power Management
# Includes core PM, powerdomain, clockdomain, smartreflex, voltagedomain, OPP
ifeq ($(CONFIG_PM),y)
-obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o
-obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o pm_bus.o
-obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o \
- cpuidle34xx.o pm_bus.o
-obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o pm_bus.o
-obj-$(CONFIG_PM_DEBUG) += pm-debug.o
+
+obj-y += pm_bus.o
+ifeq ($(CONFIG_PM_VERBOSE),y)
+CFLAGS_pm_bus.o += -DDEBUG
+endif
+
+ifeq ($(CONFIG_PM_DEBUG),y)
+obj-$(CONFIG_OMAP_PM) += omap_pm_debug.o
+omap_pm_debug-y := pm-debug.o
+endif
+
+ifeq ($(CONFIG_ARCH_OMAP2),y)
+obj-$(CONFIG_OMAP_PM) += omap2_pm.o
+omap2_pm-y := pm24xx.o sleep24xx.o
+endif
+
+ifeq ($(CONFIG_ARCH_OMAP3),y)
+obj-$(CONFIG_OMAP_PM) += omap3_pm.o
+omap3_pm-y := pm34xx.o sleep34xx.o cpuidle34xx.o
+endif
+
+ifeq ($(CONFIG_ARCH_OMAP4),y)
+obj-$(CONFIG_OMAP_PM) += omap4_pm.o
+omap4_pm-y := pm44xx.o
+endif
+
obj-$(CONFIG_OMAP_SMARTREFLEX) += sr_device.o smartreflex.o
obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3) += smartreflex-class3.o
AFLAGS_sleep24xx.o :=-Wa,-march=armv6
AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a$(plus_sec)
-ifeq ($(CONFIG_PM_VERBOSE),y)
-CFLAGS_pm_bus.o += -DDEBUG
-endif
-
# OMAP voltage domains
voltagedomain-common := voltage.o
obj-$(CONFIG_ARCH_OMAP2) += $(voltagedomain-common)
@@ -204,6 +204,15 @@ config OMAP_SERIAL_WAKE
to data on the serial RX line. This allows you to wake the
system from serial console.
+config OMAP_PM
+ tristate "OMAP PM support"
+ depends on ARCH_OMAP2PLUS && PM
+ default y
+ help
+ Select this option if you want to have OMAP2+ PM support enabled.
+ Can also be set to 'm' for the whole OMAP2+ PM to be built
+ as a module.
+
choice
prompt "OMAP PM layer selection"
depends on ARCH_OMAP