Changeset 3358


Ignore:
Timestamp:
Oct 11, 2012, 12:12:48 AM (19 months ago)
Author:
rsmith
Message:

OLPC ARM: Update strp so it gets a valid suspend power reading

Use the ec-sus-pwr command rather than ec-max-pwr for getting the
power when the host is in suspend. ec-sus-pwr only takes a reading if
the EC thinks the host is in suspend.
Even with that a more delay was required for the time spent in
suspend than what wake1 was providing. The EC only samples the gauge
every 100ms and the gauge itself only updates every 88ms. Wake1 was
setting up a 1 second rtc wakeup but by the time the host actually
makes it into suspend the EC didn't have enough time left to get a
good consistent reading.
This patch makes a wake2 with a 2 second target and updates the
suspend test to use it.

Location:
cpu/arm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpu/arm/mmp2/rtc.fth

    r3282 r3358  
    4141; 
    4242: wake1  ( -- )  ['] cancel-alarm 1 rtc-wake  ; 
     43: wake2  ( -- )  ['] cancel-alarm 2 rtc-wake  ; 
    4344: alarm-in-3  ( -- )  ['] take-alarm 3 rtc-wake  ; 
    4445: wakeup-loop  ( -- ) 
     
    4748      5 0  do 
    4849         cr i . 
    49          wake1  strp 
     50         wake2  strp 
    5051         d# 500 ms 
    5152         key? if unloop unloop exit  then 
  • cpu/arm/olpc/4.0/ec-version.fth

    r3312 r3358  
    11\ The EC microcode 
    22macro: EC_PLATFORM cl4 
    3 macro: EC_VERSION 7_0_2_02 
     3macro: EC_VERSION 7_0_2_03 
    44 
    55\ Alternate command for getting EC microcode, for testing new versions. 
  • cpu/arm/olpc/suspend.fth

    r3270 r3358  
    216216; 
    217217 
    218 : strp  ( -- )  ec-rst-pwr  str  ec-max-pwr .d ." mW " soc .%  space  ; 
     218: strp  ( -- )  ec-rst-pwr  str  ec-sus-pwr .d ." mW " soc .%  space  ; 
Note: See TracChangeset for help on using the changeset viewer.