Changeset 3410


Ignore:
Timestamp:
Nov 2, 2012, 9:43:10 PM (3 years ago)
Author:
wmb
Message:

OLPC XO-4 - suspend/resume code:

(a) Mask off reserved bits in pcr!
(b) Use icu! instead of incorrect addresses in interrupt controller fiddling code
(c) Mask global IRQs in suspend path instead of resume path; not sure why Linux did it in resume

File:
1 edited

Legend:

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

    r3270 r3410  
    159159: port>bit  ( port# -- )  wakeup-masks swap na+ @  ;
    160160
    161 : pcr!       ( value -- )  dup h# 00 mpmu!  h# 1000 mpmu!  ;
     161: pcr!       ( value -- )  dup h# 00 mpmu!  h# 7fff invert and  h# 1000 mpmu!  ;
    162162: pcr-set    ( mask -- )  dup h# 00 mpmu-set  h# 1000 mpmu-set  ;
    163163: pcr-clr    ( mask -- )  dup h# 00 mpmu-clr  h# 1000 mpmu-clr  ;
     
    233233: wakeup-irqs-on  ( -- )
    234234\ 2f is high priority (f), directed to PJ (20)
    235 \  h# 2f  h# 82010 io!  \ IRQ  4 - PMIC
    236    h# 2f  h# 82014 io!  \ IRQ  5 - RTC
    237 \  h# 2f  h# 820c4 io!  \ IRQ 49 - GPIO
     235\  h# 2f  h# 10 icu!  \ IRQ  4 - PMIC
     236   h# 2f  h# 14 icu!  \ IRQ  5 - RTC
     237\  h# 2f  h# c4 icu!  \ IRQ 49 - GPIO
    238238;
    239239: wakeup-irqs-off  ( -- )
    240 \  h#  0  h# 82010 io!  \ IRQ  4 - PMIC
    241    h#  0  h# 82014 io!  \ IRQ  5 - RTC
    242 \  h#  0  h# 820c4 io!  \ IRQ 49 - GPIO
     240\  h#  0  h# 10 icu!  \ IRQ  4 - PMIC
     241   h#  0  h# 14 icu!  \ IRQ  5 - RTC
     242\  h#  0  h# c4 icu!  \ IRQ 49 - GPIO
    243243;
    244244: global-irqs-off  ( -- )
    245245   \ disable global irq of ICU for MP1, MP2, MM
    246    1 h# 82110 io!  \ ICU_GBL_IRQ1_MSK
    247    1 h# 82114 io!  \ ICU_GBL_IRQ2_MSK
    248    1 h# 8410c io!  \ ICU_GBL_IRQ3_MSK
    249    1 h# 84110 io!  \ ICU_GBL_IRQ4_MSK
    250    1 h# 84114 io!  \ ICU_GBL_IRQ5_MSK
    251    1 h# 84190 io!  \ ICU_GBL_IRQ6_MSK
     246   1 h#  110 icu!  \ ICU_GBL_IRQ1_MSK
     247   1 h#  114 icu!  \ ICU_GBL_IRQ2_MSK
     248   1 h# 210c icu!  \ ICU_GBL_IRQ3_MSK
     249   1 h# 2110 icu!  \ ICU_GBL_IRQ4_MSK
     250   1 h# 2114 icu!  \ ICU_GBL_IRQ5_MSK
     251   1 h# 2190 icu!  \ ICU_GBL_IRQ6_MSK
    252252;
    253253
     
    261261
    262262   deep-sleep-on
    263    rtc-wakeup-on
     263\  rtc-wakeup-on  \ Unnecessary; alarm-in-3 does it
    264264
    265265   h# 462 set-idle   \ D2_L2_PWD
     
    271271   \ h# 8000 cc4-set  \ workaround: keep SL2 power on
    272272
    273    wakeup-irqs-on
     273\  wakeup-irqs-on  \ Unnecessary; alarm-in-3 does it
     274
     275   global-irqs-off
    274276
    275277   flush-cache-all
     
    287289   \ I don't think we need this because L2 is off
    288290   \ h# 8000 cc4-clr  \ workaround: keep SL2 power on
    289 
    290    global-irqs-off
    291291
    292292   apcr  h# 1000 mpmu!
Note: See TracChangeset for help on using the changeset viewer.