[openfirmware] [commit] r2463 - dev/olpc/dcon
repository service
svn at openfirmware.info
Wed Aug 17 03:47:50 CEST 2011
Author: wmb
Date: Wed Aug 17 03:47:50 2011
New Revision: 2463
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2463
Log:
OLPC XO-1.75 - Enable/disable DCON freezing based on presence of DCON RAM (in turn based on board ID). If RAM is absent, the /display/dcon device node now has a "no-freeze" property.
Modified:
dev/olpc/dcon/mmp2dcon.fth
Modified: dev/olpc/dcon/mmp2dcon.fth
==============================================================================
--- dev/olpc/dcon/mmp2dcon.fth Tue Aug 16 03:06:53 2011 (r2462)
+++ dev/olpc/dcon/mmp2dcon.fth Wed Aug 17 03:47:50 2011 (r2463)
@@ -1,11 +1,28 @@
\ See license at end of file
\ " dcon" device-name
+also forth definitions
+: has-dcon-ram? ( -- flag )
+ board-revision h# 1b18 = if true exit then
+ board-revision h# 1b48 >= if true exit then
+ false
+;
+previous definitions
+
new-device
" dcon" device-name
" olpc,xo1-dcon" +compatible
+" olpc,xo1.75-dcon" +compatible
finish-device
+stand-init:
+ has-dcon-ram? 0= if
+ " /dcon? find-device
+ 0 0 " no-freeze" property
+ device-end
+ then
+;
+
\ DCON internal registers, accessed via I2C
\ 0 constant DCON_ID
\ 1 constant DCON_MODE
@@ -103,14 +120,16 @@
d# 25 ms \ Ensure that that DCON sees the DCONLOAD high
\ display-on
else
- begin ( )
- dcon-unload \ Put the DCON in self-refresh mode
- lock[ wait-dcon-mode ]unlock ( retry? )
-\ display-off ( retry? )
- while ( )
- \ We got a false ack from the DCON so start over from LOAD state
- dcon-load d# 25 ms ( )
- repeat ( )
+ has-dcon-ram? if
+ begin ( )
+ dcon-unload \ Put the DCON in self-refresh mode
+ lock[ wait-dcon-mode ]unlock ( retry? )
+ \ display-off ( retry? )
+ while ( )
+ \ We got a false ack from the DCON so start over from LOAD state
+ dcon-load d# 25 ms ( )
+ repeat ( )
+ then
then
;
More information about the openfirmware
mailing list