Author: wmb Date: Thu Jun 30 10:22:57 2011 New Revision: 2319 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2319
Log: OLPC - added touchpad and keyboard tests to /ap-sp (SP-mediated) keyboard and touchpad drivers. Also auto-created keyboard and mouse aliases depending on which interface has an attached keyboard on XO-1.75.
Modified: cpu/arm/olpc/1.75/fw.bth cpu/x86/pc/olpc/fw.bth cpu/x86/pc/olpc/via/fw.bth dev/olpc/keyboard/selftest.fth dev/olpc/touchpad/syntpad.fth
Modified: cpu/arm/olpc/1.75/fw.bth ============================================================================== --- cpu/arm/olpc/1.75/fw.bth Tue Jun 28 21:37:49 2011 (r2318) +++ cpu/arm/olpc/1.75/fw.bth Thu Jun 30 10:22:57 2011 (r2319) @@ -209,8 +209,18 @@
fload ${BP}/dev/logdev.fth fload ${BP}/cpu/x86/pc/olpc/disptest.fth +dev /ec-spi/keyboard fload ${BP}/dev/olpc/keyboard/selftest.fth \ Keyboard diagnostic +device-end +dev /ap-sp/keyboard +fload ${BP}/dev/olpc/keyboard/selftest.fth \ Keyboard diagnostic +device-end +dev /ec-spi/mouse +fload ${BP}/dev/olpc/touchpad/syntpad.fth \ Touchpad diagnostic +device-end +dev /ap-sp/mouse fload ${BP}/dev/olpc/touchpad/syntpad.fth \ Touchpad diagnostic +device-end fload ${BP}/cpu/x86/pc/olpc/gridmap.fth \ Gridded display tools fload ${BP}/cpu/x86/pc/olpc/via/copynand.fth fload ${BP}/cpu/arm/olpc/1.75/exc7200-touchscreen.fth \ Touchscreen driver and diagnostic @@ -318,15 +328,25 @@
fload ${BP}/dev/hdaudio/noiseburst.fth \ audio-test support package
-0 value sp-kbd-ih +: select-keyboard ( -- ) + " /ap-sp/keyboard" open-dev ?dup 0= if exit then >r ( r: ih ) + " kbd-reset" r@ $call-method ( failed? ) + 0= if + " keyboard" " /ap-sp/keyboard" $devalias + " mouse" " /ap-sp/mouse" $devalias + else + " keyboard" " /ec-spi/keyboard" $devalias + " mouse" " /ec-spi/mouse" $devalias + then + r> close-dev +; + : console-start ( -- ) + select-keyboard install-mux-io cursor-off true to text-on?
- " /ap-sp/keyboard" open-dev to sp-kbd-ih - sp-kbd-ih if sp-kbd-ih add-input then - " //null" open-dev to null-ih \ For text-off state ; : keyboard-off ( -- ) @@ -335,11 +355,6 @@ keyboard-ih close-dev 0 to keyboard-ih then - sp-kbd-ih if - sp-kbd-ih remove-input - sp-kbd-ih close-dev - 0 to sp-kbd-ih - then ; : interpreter-init ( -- ) hex @@ -405,13 +420,14 @@
read-game-keys
- ?update-ec-flash - factory-test? if text-off then
" probe-" do-drop-in
show-child + + ?update-ec-flash + install-alarm ['] sound catch drop
Modified: cpu/x86/pc/olpc/fw.bth ============================================================================== --- cpu/x86/pc/olpc/fw.bth Tue Jun 28 21:37:49 2011 (r2318) +++ cpu/x86/pc/olpc/fw.bth Thu Jun 30 10:22:57 2011 (r2319) @@ -336,7 +336,9 @@ fload ${BP}/cpu/x86/pc/olpc/help.fth fload ${BP}/cpu/x86/pc/olpc/gui.fth fload ${BP}/cpu/x86/pc/olpc/suspend.fth \ Suspend/resume setup +dev /keyboard fload ${BP}/dev/olpc/keyboard/selftest.fth \ Keyboard diagnostic +device-end 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/copynand.fth
Modified: cpu/x86/pc/olpc/via/fw.bth ============================================================================== --- cpu/x86/pc/olpc/via/fw.bth Tue Jun 28 21:37:49 2011 (r2318) +++ cpu/x86/pc/olpc/via/fw.bth Thu Jun 30 10:22:57 2011 (r2319) @@ -373,7 +373,9 @@ fload ${BP}/dev/logdev.fth
fload ${BP}/cpu/x86/pc/olpc/disptest.fth +dev /keyboard fload ${BP}/dev/olpc/keyboard/selftest.fth \ Keyboard diagnostic +device-end 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 Tue Jun 28 21:37:49 2011 (r2318) +++ dev/olpc/keyboard/selftest.fth Thu Jun 30 10:22:57 2011 (r2319) @@ -4,7 +4,7 @@ \needs final-test? 0 value final-test? \needs smt-test? 0 value smt-test?
-dev /keyboard +\ Must be loaded in the keyboard device node hex
\ This is 1 for the original rubber keyboard and 2 for the mechanical keyboard @@ -767,8 +767,6 @@ ; warning !
-device-end - \ LICENSE_BEGIN \ Copyright (c) 2007 FirmWorks \
Modified: dev/olpc/touchpad/syntpad.fth ============================================================================== --- dev/olpc/touchpad/syntpad.fth Tue Jun 28 21:37:49 2011 (r2318) +++ dev/olpc/touchpad/syntpad.fth Thu Jun 30 10:22:57 2011 (r2319) @@ -1,6 +1,5 @@ \ See license at end of file \ Add this code to the existing mouse driver -dev /mouse
h# f800 constant red h# 07e0 constant green @@ -244,10 +243,6 @@ final-test? if selftest-failed? else false then ;
-\ We are finished adding code to the mouse driver. -\ Go back to the main forth context -device-end - \ LICENSE_BEGIN \ Copyright (c) 2010 FirmWorks \
openfirmware@openfirmware.info