Author: wmb Date: Wed Aug 31 10:24:22 2011 New Revision: 2493 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2493
Log: XO-1.75 - DCON driver - Use GPIO edge detection hardware to avoid the need for disabling interrupts while waiting for DCON freeze - prevents audio buffer underrun.
Modified: dev/olpc/dcon/mmp2dcon.fth
Modified: dev/olpc/dcon/mmp2dcon.fth ============================================================================== --- dev/olpc/dcon/mmp2dcon.fth Wed Aug 31 10:22:38 2011 (r2492) +++ dev/olpc/dcon/mmp2dcon.fth Wed Aug 31 10:24:22 2011 (r2493) @@ -75,7 +75,8 @@ [then] \ : dcon-blnk? ( -- flag ) ; \ Not hooked up : dcon-stat@ ( -- n ) h# 019100 io@ 4 rshift 3 and ; -: dcon-irq? ( -- flag ) d# 124 gpio-pin@ 0= ; +: setup-dcon-irq ( -- ) d# 124 dup gpio-set-fer gpio-clr-edge ; +: dcon-irq? ( -- flag ) d# 124 gpio-edge@ ;
\ DCONSTAT values: 0 SCANINT 1 SCANINT_DCON 2 DISPLAYLOAD 3 MISSED
@@ -122,8 +123,9 @@ else has-dcon-ram? if begin ( ) + setup-dcon-irq dcon-unload \ Put the DCON in self-refresh mode - lock[ wait-dcon-mode ]unlock ( retry? ) + wait-dcon-mode ( retry? ) \ display-off ( retry? ) while ( ) \ We got a false ack from the DCON so start over from LOAD state
openfirmware@openfirmware.info