Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
* cpuidle omap 4430, some clarifications please?
@ 2011-01-10  5:05 Etienne Le Sueur
  2011-01-10  7:41 ` Santosh Shilimkar
  0 siblings, 1 reply; 3+ messages in thread
From: Etienne Le Sueur @ 2011-01-10  5:05 UTC (permalink / raw)
  To: linux-omap

Hello,

I'm using linux-2.6.35.3 on a pandaboard taking power measurements in different idle states (I've written a userspace governor for cpuidle).

It seems like the code which is supposed to put the cores in deep sleep never actually gets called, see code below with my comments...

Taken from arch/arm/mach-omap2/cpuidle44xx.c, omap4_enter_idle, which gets called by cpuidle:

===============

     /*
      * Do only WFI for non-boot CPU(aux cores)
      */
     if (dev->cpu) {
         wmb();
         do_wfi();
         goto return_sleep_time;
     }

So on OMAP 4430, CPU1 never goes deeper than WFI?

     /*
      * Do only a WFI as long as CPU1 is online
      */
     if (num_online_cpus() > 1) {
         wmb();
         do_wfi();
         goto return_sleep_time;
     }

So while CPU1 is online (it never goes offline due to the above code) CPU0 will never go deeper than WFI?

     /*
      * Hold on till CPU1 hits OFF
      */
     cpu1_state = pwrdm_read_pwrst(cpu1_pd);
     if (cpu1_state != PWRDM_POWER_OFF) {
         wmb();
         do_wfi();
         goto return_sleep_time;
     }

It seems like CPU1 will never 'hit off' ?

     if (cx->type > OMAP4_STATE_C1)
         clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu_id);

#ifdef CONFIG_PM_DEBUG
     pwrdm_pre_transition();
#endif

The code below never gets called, therefore neither CPU0, CPU1 nor the MPU go into a deeper sleep state?

     pwrdm_set_logic_retst(mpu_pd, cx->mpu_logic_state);
     omap4_set_pwrdm_state(mpu_pd, cx->mpu_state);

     omap4_set_pwrdm_state(core_pd, cx->core_state);

     omap4_enter_sleep(dev->cpu, cx->cpu0_state);

=================

Can someone clarify for me?

Cheers,
Etienne Le Sueur

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-10  9:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-10  5:05 cpuidle omap 4430, some clarifications please? Etienne Le Sueur
2011-01-10  7:41 ` Santosh Shilimkar
2011-01-10  9:33   ` Etienne Le Sueur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox