summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2024-01-04 08:10:38 -0700
committerTom Rini <trini@konsulko.com>2024-04-10 20:01:33 -0600
commita469c8e854e2d75436a44e81364b46d74909265c (patch)
treeff1389eff98a30b66833cf8b9875722947c93562 /drivers/video
parent9e95e909f6a6f9d17555d0ae1967fb3c6375b110 (diff)
downloadu-boot-a469c8e854e2d75436a44e81364b46d74909265c.tar.gz
u-boot-a469c8e854e2d75436a44e81364b46d74909265c.tar.bz2
u-boot-a469c8e854e2d75436a44e81364b46d74909265c.zip
video: Drop unnecessary truetype operations from SPL
Saving and restoring entries is used for expo and for the command line, which we don't use in SPL. Drop these methods. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/console_truetype.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/video/console_truetype.c b/drivers/video/console_truetype.c
index 14fb81e956..602133575f 100644
--- a/drivers/video/console_truetype.c
+++ b/drivers/video/console_truetype.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <log.h>
#include <malloc.h>
+#include <spl.h>
#include <video.h>
#include <video_console.h>
@@ -799,6 +800,9 @@ static int truetype_entry_save(struct udevice *dev, struct abuf *buf)
struct console_tt_store store;
const uint size = sizeof(store);
+ if (spl_phase() <= PHASE_SPL)
+ return -ENOSYS;
+
/*
* store the whole priv structure as it is simpler that picking out
* what we need
@@ -820,6 +824,9 @@ static int truetype_entry_restore(struct udevice *dev, struct abuf *buf)
struct console_tt_priv *priv = dev_get_priv(dev);
struct console_tt_store store;
+ if (spl_phase() <= PHASE_SPL)
+ return -ENOSYS;
+
memcpy(&store, abuf_data(buf), sizeof(store));
vc_priv->xcur_frac = store.cur.xpos_frac;
@@ -844,6 +851,9 @@ static int truetype_set_cursor_visible(struct udevice *dev, bool visible,
uint out, val;
int ret;
+ if (spl_phase() <= PHASE_SPL)
+ return -ENOSYS;
+
if (!visible)
return 0;