diff mbox

OMAP3 PM restore observability settings after off mode

Message ID 1255359790-10407-1-git-send-email-peter.de-schrijver@nokia.com (mailing list archive)
State Accepted
Delegated to: Kevin Hilman
Headers show

Commit Message

Peter 'p2' De Schrijver Oct. 12, 2009, 3:03 p.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/debobs.c b/arch/arm/mach-omap2/debobs.c
index 4fbabef..d25b9a2 100644
--- a/arch/arm/mach-omap2/debobs.c
+++ b/arch/arm/mach-omap2/debobs.c
@@ -190,6 +190,15 @@  static inline int __init _new_debobs_pad(struct debobs_pad *pad, char *name,
 
 /* Public functions */
 
+void debobs_restore(void)
+{
+	struct debobs_pad *p = &debobs_pads[0];
+	int i;
+
+	for (i = 0; i < NUM_OF_DEBOBS_PADS; i++, p++)
+		debobs_set(&p->core_obs, p->core_obs.value);
+}
+
 void debug_gpio_set(unsigned gpio, int value)
 {
 	if (!debobs_initialized)
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 553fe02..20c7ea2 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -42,6 +42,7 @@ 
 #include <mach/dma.h>
 #include <mach/gpmc.h>
 #include <mach/dma.h>
+#include <mach/debobs.h>
 #include <asm/tlbflush.h>
 
 #include "cm.h"
@@ -124,6 +125,9 @@  static void omap3_core_restore_context(void)
 	/* Restore the interrupt controller context */
 	omap3_intc_restore_context();
 	omap_dma_global_context_restore();
+	/* restore debobs context */
+	debobs_restore();
+
 }
 
 static void omap3_save_secure_ram_context(u32 target_mpu_state)
diff --git a/arch/arm/plat-omap/include/mach/debobs.h b/arch/arm/plat-omap/include/mach/debobs.h
index 67f765d..1e04bcd 100644
--- a/arch/arm/plat-omap/include/mach/debobs.h
+++ b/arch/arm/plat-omap/include/mach/debobs.h
@@ -3,5 +3,6 @@ 
 
 void debug_gpio_set(unsigned gpio, int value);
 int debug_gpio_get(unsigned gpio);
+void debobs_restore(void);
 
 #endif