Changeset 2944


Ignore:
Timestamp:
Apr 17, 2012, 3:04:04 AM (3 years ago)
Author:
quozl
Message:

OLPC XO-1.75 - restore thermal protection after suspend, #11779

Location:
cpu/arm/mmp2
Files:
2 edited

Legend:

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

    r2924 r2944  
    870870   resume-usb 
    871871   enable-interrupts 
     872   init-thermal-sensor 
    872873; 
    873874: strp  ( -- )  ec-rst-pwr  str  ec-max-pwr .d ." mW " soc .%  space  ; 
  • cpu/arm/mmp2/thermal.fth

    r2570 r2944  
    22purpose: Driver for the MMP2 thermal sensor 
    33 
     4\ See also cforth:src/app/arm-xo-1.75/thermal.fth 
    45h# 013200 value thermal-base 
     6: room-temp@  ( -- n )  thermal-base io@  ; 
     7: room-temp!  ( n -- )  thermal-base io!  ; 
     8thermal-base h# 4 +  value wd-thresh 
     9: wd-thresh@  ( -- n )  wd-thresh io@  ; 
     10: wd-thresh!  ( n -- )  wd-thresh io!  ; 
     11\ thermal-base h# 8 +  value lo-thresh 
     12\ thermal-base h# c +  value hi-thresh 
     13thermal-base h# 10 +  value ts-ctrl 
     14: ts-ctrl!  ( n -- )  ts-ctrl io!  ; 
     15 
    516: init-thermal-sensor  ( -- ) 
    617   thermal-base io@ h# 400 and  if  exit  then 
    718   7 h# 90 apbc!   3 h# 90 apbc!  \ Enable clocks to thermal sensor 
    8    h# 10000 thermal-base io!      \ Enable sensing 
     19   h# 10000 room-temp!            \ Enable sensing 
     20   d# 696 wd-thresh!              \ Set thermal watchdog threshold to 85C 
     21   h# 88 ts-ctrl!                 \ Clear thermal watchdog reset status 
     22                                  \ Set thermal watchdog reset enable 
    923; 
    1024 
     
    4660   wdtpcr io! 
    4761; 
    48  
    49 thermal-base h# 4 +  value wd-thresh 
    50 : wd-thresh@  ( -- n )  wd-thresh io@  ; 
    51 : wd-thresh!  ( n -- )  wd-thresh io!  ; 
    5262 
    5363: .c  ( n -- )  (.) type ." C " ; 
Note: See TracChangeset for help on using the changeset viewer.