[PATCH 20/23] dove: power management cleanup and compilation error fixes when power management disabled

Brad Figg brad.figg at canonical.com
Thu Aug 27 23:21:00 UTC 2009


From: Saeed Bishara <saeed at marvell.com>

Signed-off-by: Saeed Bishara <saeed at marvell.com>
Signed-off-by: Brad Figg <brad.figg at canonical.com>
---
 arch/arm/common/pxa-dma.c                    |    2 +
 arch/arm/mach-dove/common.c                  |    3 +-
 arch/arm/mach-dove/cpuidle.c                 |    2 +-
 arch/arm/mach-dove/dove-db-setup.c           |    1 -
 arch/arm/mach-dove/include/mach/pm.h         |    9 +++++--
 arch/arm/mach-dove/mv_hal_support/mvRules.mk |    2 -
 arch/arm/mach-dove/pm.h                      |   17 --------------
 arch/arm/vfp/vfpmodule.c                     |   30 +++++++++++++-------------
 8 files changed, 26 insertions(+), 40 deletions(-)
 delete mode 100755 arch/arm/mach-dove/pm.h

diff --git a/arch/arm/common/pxa-dma.c b/arch/arm/common/pxa-dma.c
index 7854a60..a017957 100755
--- a/arch/arm/common/pxa-dma.c
+++ b/arch/arm/common/pxa-dma.c
@@ -194,10 +194,12 @@ int __init pxa_init_dma_wins(struct mbus_dram_target_info * dram)
 	DWBR(DMA_MAX_DECODE_WIN - 1) = DOVE_SB_REGS_PHYS_BASE;
 	DWCR(DMA_MAX_DECODE_WIN - 1) = 0x03FF03C1; /* 16M, Attrib=0x03, Target=0xC, WinEn=1 */ 
 
+#ifdef CONFIG_PM
 	for(i = 0; i < DMA_MAX_DECODE_WIN; i++) {
 		pm_registers_add_single(DWBR_ADDR(i));
 		pm_registers_add_single(DWCR_ADDR(i));
 	}
+#endif
 	return 0;
 }
 
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c
index fd10ba0..87a9c9d 100755
--- a/arch/arm/mach-dove/common.c
+++ b/arch/arm/mach-dove/common.c
@@ -1726,9 +1726,10 @@ void __init dove_config_arbitration(void)
 #endif
         writel(sc_dec, DOVE_MC_VIRT_BASE + 0x510);
         /* End of supersection testing */
+#ifdef CONFIG_PM
 	pm_registers_add(dove_arbitration_regs,
 			 ARRAY_SIZE(dove_arbitration_regs));
-
+#endif
 }
 void __init dove_init(void)
 {
diff --git a/arch/arm/mach-dove/cpuidle.c b/arch/arm/mach-dove/cpuidle.c
index aece527..1958323 100644
--- a/arch/arm/mach-dove/cpuidle.c
+++ b/arch/arm/mach-dove/cpuidle.c
@@ -15,7 +15,7 @@
 #include <linux/cpuidle.h>
 #include <asm/io.h>
 #include <asm/proc-fns.h>
-#include "pm.h"
+#include <mach/pm.h>
 
 #define DOVE_IDLE_STATES	2
 
diff --git a/arch/arm/mach-dove/dove-db-setup.c b/arch/arm/mach-dove/dove-db-setup.c
index 31fdb98..8b18968 100755
--- a/arch/arm/mach-dove/dove-db-setup.c
+++ b/arch/arm/mach-dove/dove-db-setup.c
@@ -43,7 +43,6 @@
 #include "common.h"
 #include "clock.h"
 #include "mpp.h"
-#include "pm.h"
 #include "pmu/mvPmu.h"
 #include "pmu/mvPmuRegs.h"
 #include "pdma/mvPdma.h"
diff --git a/arch/arm/mach-dove/include/mach/pm.h b/arch/arm/mach-dove/include/mach/pm.h
index 1f2f801..b3f25c3 100755
--- a/arch/arm/mach-dove/include/mach/pm.h
+++ b/arch/arm/mach-dove/include/mach/pm.h
@@ -1,13 +1,13 @@
 /*
- * include/asm-arm/arch-dove/pm.h
+ * arch/arm/mach-dove/include/mach/pm.h
  *
  * This file is licensed under the terms of the GNU General Public
  * License version 2.  This program is licensed "as is" without any
  * warranty of any kind, whether express or implied.
  */
 
-#ifndef __ASM_ARCH_PM_H
-#define __ASM_ARCH_PM_H
+#ifndef __MACH_PM_H
+#define __MACH_PM_H
 
 #include <asm/errno.h>
 #include <mach/irqs.h>
@@ -62,4 +62,7 @@ int pm_registers_add(u32 *registers, int count);
  * request the pm core to save & restore single register
  */
 int pm_registers_add_single(u32 register_address);
+
+void dove_pm_cpuidle_deepidle (void);
+
 #endif
diff --git a/arch/arm/mach-dove/mv_hal_support/mvRules.mk b/arch/arm/mach-dove/mv_hal_support/mvRules.mk
index f9104e8..5aae699 100755
--- a/arch/arm/mach-dove/mv_hal_support/mvRules.mk
+++ b/arch/arm/mach-dove/mv_hal_support/mvRules.mk
@@ -74,9 +74,7 @@ endif
 ifeq ($(CONFIG_MV_INCLUDE_TS),y)
 HAL_TS_DIR      = $(HAL_DIR)/ts
 endif
-ifeq ($(CONFIG_MV_INCLUDE_PMU),y)
 HAL_PMU_DIR      = $(HAL_DIR)/pmu
-endif
 ifeq ($(CONFIG_MV_INCLUDE_NFC),y)
 HAL_NFC_DIR      = $(HAL_DIR)/nfc
 endif
diff --git a/arch/arm/mach-dove/pm.h b/arch/arm/mach-dove/pm.h
deleted file mode 100755
index b48a7d1..0000000
--- a/arch/arm/mach-dove/pm.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * arch/arm/mach-dove/pm.h
- *
- * PM functions for Marvell Dove MV88F6781 System On Chip
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __ARCH_DOVE_PM_H
-#define __ARCH_DOVE_PM_H
-
-void dove_pm_cpuidle_deepidle (void);
-void dove_pm_register (void);
-
-#endif
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index 538cf97..e20875a 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -383,6 +383,21 @@ static void vfp_pm_init(void)
 	sysdev_register(&vfp_pm_sysdev);
 }
 
+void vfp_save(void)
+{
+	struct pm_message temp;
+	/*
+	 * if VFP was not initialized yet, then do nothing
+	 */
+	if (VFP_arch)
+		vfp_pm_suspend(NULL , temp);
+}
+
+void vfp_restore(void)
+{
+	if (VFP_arch)
+		vfp_pm_resume(NULL);
+}
 
 #else
 static inline void vfp_pm_init(void) { }
@@ -514,18 +529,3 @@ static int __init vfp_init(void)
 
 late_initcall(vfp_init);
 
-void vfp_save(void)
-{
-	struct pm_message temp;
-	/*
-	 * if VFP was not initialized yet, then do nothing
-	 */
-	if (VFP_arch)
-		vfp_pm_suspend(NULL , temp);
-}
-
-void vfp_restore(void)
-{
-	if (VFP_arch)
-		vfp_pm_resume(NULL);
-}
-- 
1.6.0.4





More information about the kernel-team mailing list