Hello Rajendra, one more comment from me... "ext Rajendra Nayak" <rnayak@xxxxxx> writes: > struct omap3_processor_cx omap3_power_states[OMAP3_MAX_STATES]; > Index: linux-omap-2.6/arch/arm/mach-omap2/pm34xx.c > =================================================================== > --- linux-omap-2.6.orig/arch/arm/mach-omap2/pm34xx.c 2008-09-01 > 18:23:19.000000000 +0530 > +++ linux-omap-2.6/arch/arm/mach-omap2/pm34xx.c 2008-09-01 18:24:02.000000000 > +0530 > @@ -27,10 +27,13 @@ > #include <mach/gpio.h> > #include <mach/sram.h> > #include <mach/pm.h> > +#include <mach/prcm.h> > #include <mach/clockdomain.h> > #include <mach/powerdomain.h> > #include <mach/common.h> > #include <mach/control.h> > +#include <mach/serial.h> > +#include <mach/gpio.h> > #include <asm/tlbflush.h> > > #include "cm.h" > @@ -58,6 +61,7 @@ static struct powerdomain *mpu_pwrdm, *n > static struct powerdomain *core_pwrdm, *per_pwrdm; > > int set_pwrdm_state(struct powerdomain *pwrdm, u32 state); > +void omap3_restore_sram_ctx(void); > > u32 context_mem[128]; > > @@ -91,6 +95,16 @@ static void gpio_fclk_mask(u32 *fclk) > *fclk &= ~(0x1f << 13); > } > > +void omap3_save_per_ctx(void) > +{ > + omap3_gpio_save(); > +} > + > +void omap3_restore_per_ctx(void) > +{ > + omap3_gpio_restore(); > +} > + > /* PRCM Interrupt Handler for wakeups */ > static irqreturn_t prcm_interrupt_handler (int irq, void *dev_id) > { > @@ -225,6 +239,7 @@ void omap_sram_idle(void) > int mpu_next_state = PWRDM_POWER_ON; > int per_next_state = PWRDM_POWER_ON; > int core_next_state = PWRDM_POWER_ON; > + int core_prev_state, per_prev_state; > > if (!_omap_sram_idle) > return; > @@ -261,15 +276,27 @@ void omap_sram_idle(void) > /* PER changes only with core */ > per_next_state = pwrdm_read_next_pwrst(per_pwrdm); > if (per_next_state < PWRDM_POWER_ON) { > + if (per_next_state == PWRDM_POWER_OFF) { > + omap3_save_per_ctx(); > + omap3_save_uart_ctx(2); > + } > if (clocks_off_while_idle) { > per_gpio_clk_disable(); > omap_serial_enable_clocks(0, 2); > } > } > + if (core_next_state == PWRDM_POWER_OFF) { > + omap3_save_core_ctx(); > + omap3_save_prcm_ctx(); Prcm is saved twice, once here... > + omap3_save_uart_ctx(0); > + omap3_save_uart_ctx(1); > + } > if (clocks_off_while_idle) { > omap_serial_enable_clocks(0, 0); > omap_serial_enable_clocks(0, 1); > } > + if (core_next_state == PWRDM_POWER_OFF) > + omap3_save_prcm_ctx(); And then again here. -- Jouni Högander -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html