Author: pgf Date: Tue Nov 8 13:05:09 2011 New Revision: 2672 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2672
Log: reimplement game-key@ using gpio-pin@ rather than keypad-bit
we no longer use the keypad controller
Modified: cpu/arm/olpc/1.75/fw.bth
Modified: cpu/arm/olpc/1.75/fw.bth ============================================================================== --- cpu/arm/olpc/1.75/fw.bth Tue Nov 8 00:19:39 2011 (r2671) +++ cpu/arm/olpc/1.75/fw.bth Tue Nov 8 13:05:09 2011 (r2672) @@ -231,8 +231,10 @@ : close ; end-package
+\ it seems to be difficult to get SoC wakeups from the keypad controller, +\ so we set them up as gpio, instead. +[ifdef] use_mmp2_keypad_control fload ${BP}/cpu/arm/mmp2/keypad.fth -[ifndef] cl2-a1 [ifdef] notdef \ CForth turns on the keypad; resetting it makes it not work stand-init: keypad keypad-on @@ -259,6 +261,7 @@ d# 19 gpio-pin@ 0= if h# 01 or then \ Square d# 20 gpio-pin@ 0= if h# 40 or then \ Rotate [else] +[ifdef] use_mmp2_keypad_control d# 15 gpio-pin@ 0= if button-rotate or then ( n ) scan-keypad ( n keypad ) button-o h# 01 keypad-bit ( n' keypad ) @@ -270,6 +273,17 @@ rocker-down h# 40 keypad-bit ( n' keypad ) rocker-left h# 80 keypad-bit ( n' keypad ) drop ( n ) +[else] + d# 15 gpio-pin@ 0= if button-rotate or then + d# 16 gpio-pin@ 0= if button-o or then + d# 17 gpio-pin@ 0= if button-check or then + d# 18 gpio-pin@ 0= if button-x or then + d# 19 gpio-pin@ 0= if button-square or then + d# 20 gpio-pin@ 0= if rocker-up or then + d# 21 gpio-pin@ 0= if rocker-right or then + d# 22 gpio-pin@ 0= if rocker-down or then + d# 23 gpio-pin@ 0= if rocker-left or then +[then] [then] ;
openfirmware@openfirmware.info