aboutsummaryrefslogtreecommitdiff
path: root/lib/utils/serial/semihosting.c
diff options
context:
space:
mode:
authorXiang W <wxjstz@126.com>2023-11-17 09:03:59 +0800
committerAnup Patel <anup@brainfault.org>2023-11-17 16:03:24 +0530
commitdc0bb19bd2f969e8c2b8c55a71b3ae569eedfaf6 (patch)
tree32c485fa55e474ee76f68b9b6ab7a37f8db123b0 /lib/utils/serial/semihosting.c
parent3aaed4fadfce9e02823c813bd5a69a84376b3397 (diff)
downloadopensbi-dc0bb19bd2f969e8c2b8c55a71b3ae569eedfaf6.zip
opensbi-dc0bb19bd2f969e8c2b8c55a71b3ae569eedfaf6.tar.gz
opensbi-dc0bb19bd2f969e8c2b8c55a71b3ae569eedfaf6.tar.bz2
lib: utils/serial: remove semihosting_putc
For some debuggers that do not implement SYSWRITEC and SYSREADC operations, we have to use SYSWRITE and SYSREAD. Instead of implementing semihosting_putc() using SYSWRITE, let us simply remove semihosting_putc() because console_putc/console_puts are now interchangeable. Signed-off-by: Chen Pei <cp0613@linux.alibaba.com> Signed-off-by: Xiang W <wxjstz@126.com> Reviewed-by: Guo Ren <guoren@kernel.org> Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'lib/utils/serial/semihosting.c')
-rw-r--r--lib/utils/serial/semihosting.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/utils/serial/semihosting.c b/lib/utils/serial/semihosting.c
index a27c69e..19ebaa0 100644
--- a/lib/utils/serial/semihosting.c
+++ b/lib/utils/serial/semihosting.c
@@ -178,11 +178,6 @@ static unsigned long semihosting_puts(const char *str, unsigned long len)
return (ret < 0) ? 0 : ret;
}
-static void semihosting_putc(char ch)
-{
- semihosting_puts(&ch, 1);
-}
-
static int semihosting_getc(void)
{
char ch = 0;
@@ -199,7 +194,6 @@ static int semihosting_getc(void)
static struct sbi_console_device semihosting_console = {
.name = "semihosting",
- .console_putc = semihosting_putc,
.console_puts = semihosting_puts,
.console_getc = semihosting_getc
};