Author: wmb Date: Fri Aug 17 19:27:24 2012 New Revision: 3194 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3194
Log: OLPC - made a new word $call-dcon to break the assumption that the DCON driver is part of the screen node. It is implemented differently on different platforms, depending on the actual location of the DCON driver. For old platforms, it's equivalent to $call-screen .
Modified: cpu/arm/mmp2/dramrecal.fth cpu/arm/olpc/build-fw.fth cpu/x86/pc/olpc/fw.bth cpu/x86/pc/olpc/gui.fth cpu/x86/pc/olpc/via/fw.bth
Modified: cpu/arm/mmp2/dramrecal.fth ============================================================================== --- cpu/arm/mmp2/dramrecal.fth Fri Aug 17 19:24:13 2012 (r3193) +++ cpu/arm/mmp2/dramrecal.fth Fri Aug 17 19:27:24 2012 (r3194) @@ -767,7 +767,7 @@ sleep-mask 1 and if \ DCON power down dcon-freeze else - " dcon-suspend" $call-screen + " dcon-suspend" $call-dcon then " sleep" $call-screen " set-ack" $call-ec @@ -793,7 +793,7 @@ sleep-mask 1 and if \ DCON power up dcon-unfreeze else - " dcon-resume" $call-screen + " dcon-resume" $call-dcon then ;
Modified: cpu/arm/olpc/build-fw.fth ============================================================================== --- cpu/arm/olpc/build-fw.fth Fri Aug 17 19:24:13 2012 (r3193) +++ cpu/arm/olpc/build-fw.fth Fri Aug 17 19:27:24 2012 (r3194) @@ -41,6 +41,9 @@ : poll-tty ( -- ) ubreak? if user-abort then ; \ BREAK detection : install-abort ( -- ) ['] poll-tty d# 100 alarm ;
+0 value dcon-ih +: $call-dcon ( ... -- ... ) dcon-ih $call-method ; + 0 value keyboard-ih
fload ${BP}/ofw/core/muxdev.fth \ I/O collection/distribution device @@ -171,9 +174,7 @@ ' stand-power-off to power-off
: olpc-reset-all ( -- ) - " screen" " dcon-off" ['] execute-device-method catch if - 2drop 2drop - then + " dcon-off" $call-dcon ec-power-cycle begin wfi again ; @@ -510,6 +511,7 @@ fload ${BP}/cpu/arm/olpc/banner.fth
: console-start ( -- ) + " /dcon" open-dev to dcon-ih install-mux-io cursor-off true to text-on?
Modified: cpu/x86/pc/olpc/fw.bth ============================================================================== --- cpu/x86/pc/olpc/fw.bth Fri Aug 17 19:24:13 2012 (r3193) +++ cpu/x86/pc/olpc/fw.bth Fri Aug 17 19:27:24 2012 (r3194) @@ -305,6 +305,9 @@ time&date .date space .time ." UTC" cr ;
+\ The DCON methods are in the screen node on this system +: $call-dcon ( ... -- ... ) screen-ih $call-method ; + fload ${BP}/cpu/x86/pc/olpc/banner.fth fload ${BP}/ofw/gui/loadmenu.fth fload ${BP}/cpu/x86/pc/olpc/via/mfgtest.fth
Modified: cpu/x86/pc/olpc/gui.fth ============================================================================== --- cpu/x86/pc/olpc/gui.fth Fri Aug 17 19:24:13 2012 (r3193) +++ cpu/x86/pc/olpc/gui.fth Fri Aug 17 19:27:24 2012 (r3194) @@ -355,9 +355,9 @@ $show ( ) ;
-: frozen? ( -- flag ) " vga?" $call-screen 0= ; -: dcon-freeze ( -- ) 0 " set-source" $call-screen d# 30 ms ; -: dcon-unfreeze ( -- ) 1 " set-source" $call-screen d# 30 ms ; +: frozen? ( -- flag ) " vga?" $call-dcon 0= ; +: dcon-freeze ( -- ) 0 " set-source" $call-dcon d# 30 ms ; +: dcon-unfreeze ( -- ) 1 " set-source" $call-dcon d# 30 ms ;
\ === Stuff moved from security.fth ===
@@ -380,7 +380,7 @@ : show-going ( -- ) background-rgb rgb>565 progress-xy ?adjust d# 500 d# 100 " fill-rectangle" $call-screen d# 588 d# 638 set-icon-xy " bigdot" show-icon - " vga?" $call-screen 0= if dcon-unfreeze dcon-freeze then + frozen? if dcon-unfreeze dcon-freeze then ;
: show-no-power ( -- ) \ chip, battery, overlaid sad face
Modified: cpu/x86/pc/olpc/via/fw.bth ============================================================================== --- cpu/x86/pc/olpc/via/fw.bth Fri Aug 17 19:24:13 2012 (r3193) +++ cpu/x86/pc/olpc/via/fw.bth Fri Aug 17 19:27:24 2012 (r3194) @@ -359,6 +359,9 @@
fload ${BP}/cpu/x86/pc/olpc/setwp.fth
+\ The DCON methods are in the screen node on this system +: $call-dcon ( ... -- ... ) screen-ih $call-method ; + fload ${BP}/cpu/x86/pc/olpc/via/help.fth \ Help for common user tasks fload ${BP}/cpu/x86/pc/olpc/gui.fth fload ${BP}/cpu/x86/pc/olpc/via/suspend.fth \ Suspend/resume setup