Author: quozl Date: Mon Nov 14 04:24:06 2011 New Revision: 2683 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2683
Log: OLPC - enable the keyboard interrupt on mechanical keyboards, using the del key, see #10318.
Modified: cpu/arm/olpc/1.75/fw.bth cpu/x86/pc/olpc/sound.fth cpu/x86/pc/olpc/via/fw.bth dev/olpc/keyboard/selftest.fth
Modified: cpu/arm/olpc/1.75/fw.bth ============================================================================== --- cpu/arm/olpc/1.75/fw.bth Mon Nov 14 01:58:24 2011 (r2682) +++ cpu/arm/olpc/1.75/fw.bth Mon Nov 14 04:24:06 2011 (r2683) @@ -285,6 +285,9 @@ dev /ap-sp/keyboard fload ${BP}/dev/olpc/keyboard/selftest.fth \ Keyboard diagnostic device-end +stand-init: Keyboard + " /ap-sp/keyboard" " set-keyboard-type" execute-device-method drop +; dev /ap-sp/mouse fload ${BP}/dev/olpc/touchpad/syntpad.fth \ Touchpad diagnostic device-end
Modified: cpu/x86/pc/olpc/sound.fth ============================================================================== --- cpu/x86/pc/olpc/sound.fth Mon Nov 14 01:58:24 2011 (r2682) +++ cpu/x86/pc/olpc/sound.fth Mon Nov 14 04:24:06 2011 (r2683) @@ -56,13 +56,13 @@
dev /keyboard 0 value waiting-up? -: olpc-check-abort ( scan-code -- abort? ) \ Square pressed? +: olpc-check-abort ( scan-code -- abort? ) \ an abort key pressed? last-scan over to last-scan ( scan-code old-scan-code ) h# e0 <> if drop false exit then ( scan-code )
check-abort? 0= if drop false exit then ( scan-code )
- dup h# 7f and h# 5d <> if drop false exit then ( scan-code ) + dup h# 7f and abort-key <> if drop false exit then ( scan-code )
h# 80 and if \ Up false to waiting-up?
Modified: cpu/x86/pc/olpc/via/fw.bth ============================================================================== --- cpu/x86/pc/olpc/via/fw.bth Mon Nov 14 01:58:24 2011 (r2682) +++ cpu/x86/pc/olpc/via/fw.bth Mon Nov 14 04:24:06 2011 (r2683) @@ -386,6 +386,9 @@ dev /keyboard fload ${BP}/dev/olpc/keyboard/selftest.fth \ Keyboard diagnostic device-end +stand-init: Keyboard + " /keyboard" " set-keyboard-type" execute-device-method drop +; fload ${BP}/dev/olpc/touchpad/touchpad.fth \ Touchpad diagnostic fload ${BP}/cpu/x86/pc/olpc/gridmap.fth \ Gridded display tools fload ${BP}/cpu/x86/pc/olpc/via/copynand.fth
Modified: dev/olpc/keyboard/selftest.fth ============================================================================== --- dev/olpc/keyboard/selftest.fth Mon Nov 14 01:58:24 2011 (r2682) +++ dev/olpc/keyboard/selftest.fth Mon Nov 14 04:24:06 2011 (r2683) @@ -10,6 +10,9 @@ \ This is 1 for the original rubber keyboard and 2 for the mechanical keyboard 1 value keyboard-type
+\ Scan code of abort key +h# 5d value abort-key + \ There are two scancode tables: \ 1. simple scancode (down values); up value is f0 + scancode \ 2. e0 + scancode (down values); up value is e0 + f0 + scancode @@ -712,12 +715,20 @@ else " KM" find-tag if ( adr len ) -null ( adr' len' ) - " olpcm" $= if 2 else 1 then ( type ) + " olpcm" $= if + h# 53 to abort-key \ del + 2 + else + 1 + then ( type ) else ( ) 1 ( type ) then ( type ) then to keyboard-type +; + +: use-keyboard-type ( -- ) keyboard-type case
0 of ['] make-buttons ['] ibm#s0 ['] /ibm#s0 ['] all-tested?0 endof @@ -733,6 +744,7 @@ open 0= if true exit then
set-keyboard-type + use-keyboard-type
make-keys
openfirmware@openfirmware.info