mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
npcx: lpc: Fix KB malfunction after power-key off and then on
The original thought of setting LRESET_PLTRST_MODE to 1 is to remove the need to reinitialize host module registers whenever LRESET# occurs in order to save time when boot-up. However, some of these registers will be reset by core domain reset. It means every time LRESET is de-asserted, we need to initialize the host setting again. Therefore, setting LRESET_PLTRST_MODE to 1 is unnecessary and sometimes dangerous. If BIOS believes LRESET will reset ec's host state machine to default but ec not, it will cause unexpected behavior. Modified drivers: 1. lpc.c: allow LRESET/PLTRST generate host domain reset BUG=chrome-os-partner:60211 BRANCH:none TEST=make buildall. run "dut-control pwr_button:press; sleep 11; dut-control pwr_button:release; sleep 7; dut-control pwr_button:press; sleep 1; dut-control pwr_button:release". Verify keyboard works normally. Change-Id: I94d428cde69f828468547c44844983f25686ea04 Signed-off-by: CHLin <CHLIN56@nuvoton.com> Reviewed-on: https://chromium-review.googlesource.com/417745 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
This commit is contained in:
@@ -811,9 +811,6 @@ void host_register_init(void)
|
||||
/* enable SHM */
|
||||
lpc_sib_write_reg(SIO_OFFSET, 0x30, 0x01);
|
||||
|
||||
/* An active LRESET or PLTRST does not generate host domain reset */
|
||||
SET_BIT(NPCX_RSTCTL, NPCX_RSTCTL_LRESET_PLTRST_MODE);
|
||||
|
||||
CPRINTS("Host settings are done!");
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user