summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2022-03-13 08:18:17 -0400
committerTom Rini <[email protected]>2022-03-13 08:18:17 -0400
commitc96137000e4cf486dcb164fd67a1a0b5b2fb99c6 (patch)
treedfed25da9d99b9fd2cfb5d64f4553d88cad6cf27 /cmd
parent6d35c24892c9d2f3eb03bee57c77cc9a3560c134 (diff)
parent66028930dac08f7116b5e3cdba35c3e65676c0cd (diff)
Merge tag 'efi-2022-04-rc3-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2022-04-rc3-2 Documentation: * Fix description for SiFive Unmatched * Add libgnutls28-dev to build dependencies UEFI * Avoid possibly invalid GUID pointers for protocol interfaces Other * Serial console support for cls command
Diffstat (limited to 'cmd')
-rw-r--r--cmd/cls.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/cmd/cls.c b/cmd/cls.c
index eab4e6993bb..bdeb49786d4 100644
--- a/cmd/cls.c
+++ b/cmd/cls.c
@@ -11,17 +11,23 @@
#include <lcd.h>
#include <video.h>
+#define CSI "\x1b["
+
static int do_video_clear(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
-#if defined(CONFIG_DM_VIDEO)
- struct udevice *dev;
+ __maybe_unused struct udevice *dev;
+ /* Send clear screen and home */
+ printf(CSI "2J" CSI "1;1H");
+#if defined(CONFIG_DM_VIDEO)
+#if !defined(CONFIG_VIDEO_ANSI)
if (uclass_first_device_err(UCLASS_VIDEO, &dev))
return CMD_RET_FAILURE;
if (video_clear(dev))
return CMD_RET_FAILURE;
+#endif
#elif defined(CONFIG_CFB_CONSOLE)
video_clear();
#elif defined(CONFIG_LCD)