Author: quozl Date: Tue Feb 12 06:19:52 2013 New Revision: 3543 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3543
Log: OLPC ARM - dcon, power cycle on hang, fix for #12377.
Modified: dev/olpc/dcon/mmp2dcon.fth
Modified: dev/olpc/dcon/mmp2dcon.fth ============================================================================== --- dev/olpc/dcon/mmp2dcon.fth Mon Feb 11 05:58:33 2013 (r3542) +++ dev/olpc/dcon/mmp2dcon.fth Tue Feb 12 06:19:52 2013 (r3543) @@ -100,6 +100,7 @@ : mark-time ( -- start-time ) get-msecs ; : delta-ms ( start-time -- elapsed-ms ) mark-time swap - ;
+defer dcon-unjam : wait-output ( -- ) mark-time ( start-time ) setup-dcon-irq scanint-on ( ) @@ -116,8 +117,8 @@ dup delta-ms d# 100 > ( start-time reached? ) until ( start-time ) drop ( ) - ." Timeout leaving DCON mode" cr ( ) scanint-off ( ) + dcon-unjam ;
: wait-dcon-mode ( -- retry? ) @@ -136,8 +137,7 @@ dup delta-ms d# 100 > ( start-time reached? ) \ 100 ms timeout until ( start-time ) drop - ." Timeout entering DCON mode" cr - \ We say false here because we don't want to retry; it probably won't succeed + dcon-unjam false ;
@@ -293,6 +293,8 @@ saved-dcon-mode mode! saved-brightness bright! ; +: (dcon-unjam) dcon-suspend d# 10 ms dcon-resume ; +' (dcon-unjam) to dcon-unjam
end-package
openfirmware@openfirmware.info