From 86cc9b8633bea3bc6fbda145424f871ea553af9e Mon Sep 17 00:00:00 2001 From: Atish Patra Date: Wed, 27 Feb 2019 17:42:17 -0800 Subject: lib:platform: Fix sbi_getc return type. As per the current SBI specification, sbi_getc should return an int instead of char. In case of FIFO is empty, return -1 as per the specification. Reported-by: Sergi Granell Suggested-by:Thadeu Lima de Souza Cascardo Signed-off-by: Atish Patra --- platform/common/include/plat/serial/sifive-uart.h | 2 +- platform/common/include/plat/serial/uart8250.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'platform/common/include') diff --git a/platform/common/include/plat/serial/sifive-uart.h b/platform/common/include/plat/serial/sifive-uart.h index 2c4e7f3d..6a645951 100644 --- a/platform/common/include/plat/serial/sifive-uart.h +++ b/platform/common/include/plat/serial/sifive-uart.h @@ -14,7 +14,7 @@ void sifive_uart_putc(char ch); -char sifive_uart_getc(void); +int sifive_uart_getc(void); int sifive_uart_init(unsigned long base, u32 in_freq, u32 baudrate); diff --git a/platform/common/include/plat/serial/uart8250.h b/platform/common/include/plat/serial/uart8250.h index c1ffc0d7..3d58050a 100644 --- a/platform/common/include/plat/serial/uart8250.h +++ b/platform/common/include/plat/serial/uart8250.h @@ -14,7 +14,7 @@ void uart8250_putc(char ch); -char uart8250_getc(void); +int uart8250_getc(void); int uart8250_init(unsigned long base, u32 in_freq, u32 baudrate, -- cgit v1.3.1