#include <common.h>
#include <command.h>
#include <dm.h>
-#include <lcd.h>
#include <video.h>
#define CSI "\x1b["
/* 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_LCD)
- lcd_clear();
-#else
- return CMD_RET_FAILURE;
-#endif
+ if (CONFIG_IS_ENABLED(DM_VIDEO) && !CONFIG_IS_ENABLED(VIDEO_ANSI)) {
+ if (uclass_first_device_err(UCLASS_VIDEO, &dev))
+ return CMD_RET_FAILURE;
+ if (video_clear(dev))
+ return CMD_RET_FAILURE;
+ }
return CMD_RET_SUCCESS;
}