mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-13 11:25:14 +00:00
f8b3347ce76b79b4d57422936fb5b35368eec774
In CL 419909, we add a bypass for FW_OBF bug in npcx5 series. (In
npcx5, setting FW_OBF won't de-assert IRQ1. The bypass emulates a host
read through sib to clear OBF bits in HIKMST and STATUS registers and
de-assert IRQ1.) This bug was already fixed in npcx7 series and later
npcx. This CL restores original mechanism to clear keyboard buffer by
setting FW_OBF bit if chip series is not npcx5.
BRANCH=none
BUG=chrome-os-partner:34346
TEST=No build errors for npcx series. Run the following script "while
true; do ./keypress_emulate_enter_reboot.sh ; sleep 25; done" on grunt
over two days and no symptom occurred.
Here is the content of keypress_emulate_enter_reboot.sh
"#!/bin/bash
TIME="0.5"
DEV=/dev/pts/26
echo "kbpress 11 4 1" > ${DEV}
echo "kbpress 11 4 0" > ${DEV}
echo "kbpress 0 2 1" > ${DEV}
echo "kbpress 10 6 1" > ${DEV}
echo "kbpress 2 3 1" > ${DEV}
echo "kbpress 2 3 0" > ${DEV}
echo "kbpress 10 6 0" > ${DEV}
echo "kbpress 0 2 0" > ${DEV}
sleep 2 # Emulate "Ctrl+Alt+F2"
echo "kbpress 3 7 1" > ${DEV}
echo "kbpress 3 7 0" > ${DEV}
sleep ${TIME}
echo "kbpress 9 7 1" > ${DEV}
echo "kbpress 9 7 0" > ${DEV}
sleep ${TIME}
echo "kbpress 9 7 1" > ${DEV}
echo "kbpress 9 7 0" > ${DEV}
sleep ${TIME}
echo "kbpress 3 2 1" > ${DEV}
echo "kbpress 3 2 0" > ${DEV}
sleep ${TIME}
echo "kbpress 11 4 1" > ${DEV}
echo "kbpress 11 4 0" > ${DEV}
sleep 2 # Emulate "root"
echo "kbpress 3 7 1" > ${DEV}
echo "kbpress 3 7 0" > ${DEV}
sleep ${TIME}
echo "kbpress 2 7 1" > ${DEV}
echo "kbpress 2 7 0" > ${DEV}
sleep ${TIME}
echo "kbpress 3 0 1" > ${DEV}
echo "kbpress 3 0 0" > ${DEV}
sleep ${TIME}
echo "kbpress 9 7 1" > ${DEV}
echo "kbpress 9 7 0" > ${DEV}
sleep ${TIME}
echo "kbpress 9 7 1" > ${DEV}
echo "kbpress 9 7 0" > ${DEV}
sleep ${TIME}
echo "kbpress 3 2 1" > ${DEV}
echo "kbpress 3 2 0" > ${DEV}
sleep ${TIME}
echo "kbpress 11 4 1" > ${DEV}
echo "kbpress 11 4 0" > ${DEV}
sleep 1 # Emulate "reboot""
Change-Id: I9ca11c92c5abb909e2d3f22018cf962e1292f406
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Signed-off-by: CHLin <CHLIN56@nuvoton.com>
Reviewed-on: https://chromium-review.googlesource.com/1059984
Reviewed-by: CH Lin <chlin56@nuvoton.com>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
For an overview of the Embedded Controller firmware, refer to http://www.chromium.org/chromium-os/2014-firmware-summit For instructions on building from source, refer to http://www.chromium.org/chromium-os/ec-development/getting-started-building-ec-images-quickly
Description
Languages
C
64.7%
Lasso
20.7%
ASL
3.6%
JavaScript
3.2%
C#
2.9%
Other
4.6%