forked from Mirrors/opensbi
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>
This commit is contained in:
@@ -178,11 +178,6 @@ static unsigned long semihosting_puts(const char *str, unsigned long len)
|
|||||||
return (ret < 0) ? 0 : ret;
|
return (ret < 0) ? 0 : ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void semihosting_putc(char ch)
|
|
||||||
{
|
|
||||||
semihosting_puts(&ch, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int semihosting_getc(void)
|
static int semihosting_getc(void)
|
||||||
{
|
{
|
||||||
char ch = 0;
|
char ch = 0;
|
||||||
@@ -199,7 +194,6 @@ static int semihosting_getc(void)
|
|||||||
|
|
||||||
static struct sbi_console_device semihosting_console = {
|
static struct sbi_console_device semihosting_console = {
|
||||||
.name = "semihosting",
|
.name = "semihosting",
|
||||||
.console_putc = semihosting_putc,
|
|
||||||
.console_puts = semihosting_puts,
|
.console_puts = semihosting_puts,
|
||||||
.console_getc = semihosting_getc
|
.console_getc = semihosting_getc
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user