summaryrefslogtreecommitdiff
path: root/drivers/fpga/intel_sdm_mb.c
diff options
context:
space:
mode:
authorWeijie Gao <weijie.gao@mediatek.com>2024-10-29 17:47:10 +0800
committerTom Rini <trini@konsulko.com>2024-11-04 16:41:38 -0600
commitddac69885efaffc68a71c1a159dc2b3ff4b9fda3 (patch)
treea82f58b73c9b08406760085697fb5b264865b288 /drivers/fpga/intel_sdm_mb.c
parent4ef5664f81e1c9d847a166891a808b5a501907af (diff)
menu: fix the logic checking whether ESC key is pressed
It's observed that the bootmenu on a serial console sometimes incorrectly quitted with superfluous characters filled to command line input: > *** U-Boot Boot Menu *** > > 1. Startup system (Default) > 2. Upgrade firmware > 3. Upgrade ATF BL2 > 4. Upgrade ATF FIP > 5. Load image > 0. U-Boot console > > > Press UP/DOWN to move, ENTER to select, ESC to quit >MT7988> [B Analysis shows it was caused by the wrong logic of bootmenu_loop: At first the bootmenu_loop received the first ESC char correctly. However, during the second call to bootmenu_loop, there's no data in the UART Rx FIFO. Due to the low baudrate, the second char of the down array key sequence hasn't be fully received. But bootmenu_loop just did a mdelay(10), and then treated it as a single ESC key press event. It didn't even try tstc() again after the 10ms timeout. This patch fixes this issue by letting bootmenu_loop check tstc() twice. Tested-By: E Shattow <lucent@gmail.com> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com> Reviewed-by: Daniel Golle <daniel@makrotopia.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/fpga/intel_sdm_mb.c')
0 files changed, 0 insertions, 0 deletions