aboutsummaryrefslogtreecommitdiff
path: root/platform/common/include
diff options
context:
space:
mode:
authorAtish Patra <atish.patra@wdc.com>2019-02-27 17:42:17 -0800
committerAnup Patel <anup@brainfault.org>2019-03-05 14:05:12 +0530
commit86cc9b8633bea3bc6fbda145424f871ea553af9e (patch)
treedd63e0eee35ed225059db03f36405842715792bb /platform/common/include
parent05602e2bf4812533adcb7acb1a67e43726c0e7bb (diff)
downloadopensbi-86cc9b8633bea3bc6fbda145424f871ea553af9e.tar.gz
opensbi-86cc9b8633bea3bc6fbda145424f871ea553af9e.tar.bz2
opensbi-86cc9b8633bea3bc6fbda145424f871ea553af9e.zip
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 <xerpi.g.12@gmail.com> Suggested-by:Thadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br> Signed-off-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'platform/common/include')
-rw-r--r--platform/common/include/plat/serial/sifive-uart.h2
-rw-r--r--platform/common/include/plat/serial/uart8250.h2
2 files changed, 2 insertions, 2 deletions
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,