Author: quozl Date: Thu Dec 13 08:42:39 2012 New Revision: 3493 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3493
Log: OLPC XO-4 - avoid opening touchscreen on non-touchscreen SKUs, by detecting the state of the TOUCH_HD# pin, #12391
Modified: cpu/arm/olpc/nn-touchscreen.fth
Modified: cpu/arm/olpc/nn-touchscreen.fth ============================================================================== --- cpu/arm/olpc/nn-touchscreen.fth Thu Dec 13 01:34:47 2012 (r3492) +++ cpu/arm/olpc/nn-touchscreen.fth Thu Dec 13 08:42:39 2012 (r3493) @@ -70,6 +70,7 @@ : reset ( -- ) touch-rst-gpio# dup gpio-clr gpio-set d# 250 ms ; : hold-reset ( -- ) touch-rst-gpio# gpio-clr ; : no-data? ( -- no-data? ) touch-int-gpio# gpio-pin@ ; +: absent? ( -- flag ) touch-hd-gpio# gpio-pin@ 0= ;
d# 250 constant /pbuf 0 value pbuf @@ -160,6 +161,7 @@ variable refcount 0 refcount !
: open ( -- okay? ) + absent? if ." no touchscreen expected" cr false exit then my-unit " set-address" $call-parent refcount @ 0= if pbuf-alloc @@ -1034,6 +1036,7 @@ ;
: selftest ( -- error? ) + absent? if ." No touchscreen expected" cr false exit then
0 to faults
openfirmware@openfirmware.info