[openfirmware] r1061 - in dev: geode geode/display olpc/dcon

svn at openfirmware.info svn at openfirmware.info
Sun Jan 4 00:37:11 CET 2009


Author: wmb
Date: 2009-01-04 00:37:10 +0100 (Sun, 04 Jan 2009)
New Revision: 1061

Modified:
   dev/geode/display/gxfb.fth
   dev/geode/smi.fth
   dev/olpc/dcon/dcon.fth
Log:
OLPC - Changed the S3 path for Windows to turn off the DCON power,
thus saving power and fixing the problem whereby keyboard activity
during S3 caused the DCON to enable the screen (albeit in blanked black state)>


Modified: dev/geode/display/gxfb.fth
===================================================================
--- dev/geode/display/gxfb.fth	2009-01-03 23:32:33 UTC (rev 1060)
+++ dev/geode/display/gxfb.fth	2009-01-03 23:37:10 UTC (rev 1061)
@@ -168,7 +168,7 @@
    set-dotpll                       ( )
 ;
 
-[ifndef] dcon-init
+[ifndef] dcon-gpio-init
 false to dcon?
 false constant atest?
 \ : tft-mode?  ( -- flag )  h# c000.2001 msr@  drop h# 40 and  0<>  ;
@@ -413,7 +413,7 @@
 
 \ fload ${BP}/dev/mediagx/video/bitblt.fth
 
-[ifdef] dcon-init
+[ifdef] dcon-gpio-init
 
 \ This is a horrible hack to get the DCON PLL started.
 \ What is going on is that you have to start the video timing
@@ -462,9 +462,17 @@
    irq at 905?                     ( flag )
 ;
 
+: dcon-restart  ( -- )
+   dcon-gpio-init
+   d# 50 0  do
+      good-dcon?  if  dcon-setup  h# 11 mode!  leave  then
+   loop
+   set-mode
+;
+
 : probe-dcon  ( -- )
    true to dcon?  set-mode
-   dcon-init   \ GPIO stuff
+   dcon-gpio-init   \ GPIO stuff
    d# 50 0  do
       good-dcon?  if  dcon-enable  maybe-set-cmos  unloop exit  then
    loop

Modified: dev/geode/smi.fth
===================================================================
--- dev/geode/smi.fth	2009-01-03 23:32:33 UTC (rev 1060)
+++ dev/geode/smi.fth	2009-01-03 23:37:10 UTC (rev 1061)
@@ -794,7 +794,11 @@
    resume-debug?  if  debug-me  then
    exit-smi
    resume-debug?  if  ." enter s3" cr  then 
+   dcon-power-off
    s3
+   dcon-power-on
+   d# 10 ms
+   " dcon-restart" screen-ih $call-method
 \   ." Return from S3" cr  interact
 \   noop
    setup-smi

Modified: dev/olpc/dcon/dcon.fth
===================================================================
--- dev/olpc/dcon/dcon.fth	2009-01-03 23:32:33 UTC (rev 1060)
+++ dev/olpc/dcon/dcon.fth	2009-01-03 23:37:10 UTC (rev 1061)
@@ -138,7 +138,7 @@
    h# dc02 =
 ;
 
-: dcon-enable  ( -- )
+: dcon-setup  ( -- )
    \ Switch to OLPC mode
 
    atest?  if    \ A-test boards have a DCON FPGA
@@ -169,6 +169,10 @@
       h# 0101  h# 41 dcon!
       h# 0101  h# 42 dcon!
    then
+   h# 12 mode!
+;
+: dcon-enable  ( -- )
+   dcon-setup
    true set-color
    h# f bright!
 ;
@@ -176,7 +180,7 @@
 dconstat dconblnk or dconirq or  constant in-gpios  
 dconload constant out-gpios
 
-: dcon-init  ( -- )
+: dcon-gpio-init  ( -- )
    out-gpios in-gpios wljoin  OUT_EN gpio!
    in-gpios out-gpios wljoin  IN_EN  gpio!
 




More information about the openfirmware mailing list