aboutsummaryrefslogtreecommitdiffstats
path: root/roms/opensbi/include/sbi_utils/serial
diff options
context:
space:
mode:
Diffstat (limited to 'roms/opensbi/include/sbi_utils/serial')
-rw-r--r--roms/opensbi/include/sbi_utils/serial/fdt_serial.h28
-rw-r--r--roms/opensbi/include/sbi_utils/serial/shakti-uart.h18
-rw-r--r--roms/opensbi/include/sbi_utils/serial/sifive-uart.h21
-rw-r--r--roms/opensbi/include/sbi_utils/serial/uart8250.h22
4 files changed, 89 insertions, 0 deletions
diff --git a/roms/opensbi/include/sbi_utils/serial/fdt_serial.h b/roms/opensbi/include/sbi_utils/serial/fdt_serial.h
new file mode 100644
index 000000000..08f97996f
--- /dev/null
+++ b/roms/opensbi/include/sbi_utils/serial/fdt_serial.h
@@ -0,0 +1,28 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2020 Western Digital Corporation or its affiliates.
+ *
+ * Authors:
+ * Anup Patel <anup.patel@wdc.com>
+ */
+
+#ifndef __FDT_SERIAL_H__
+#define __FDT_SERIAL_H__
+
+#include <sbi/sbi_types.h>
+
+struct fdt_serial {
+ const struct fdt_match *match_table;
+ int (*init)(void *fdt, int nodeoff, const struct fdt_match *match);
+ void (*putc)(char ch);
+ int (*getc)(void);
+};
+
+void fdt_serial_putc(char ch);
+
+int fdt_serial_getc(void);
+
+int fdt_serial_init(void);
+
+#endif
diff --git a/roms/opensbi/include/sbi_utils/serial/shakti-uart.h b/roms/opensbi/include/sbi_utils/serial/shakti-uart.h
new file mode 100644
index 000000000..08043be11
--- /dev/null
+++ b/roms/opensbi/include/sbi_utils/serial/shakti-uart.h
@@ -0,0 +1,18 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2020 Vijai Kumar K <vijai@behindbytes.com>
+ */
+
+#ifndef __SERIAL_SHAKTI_UART_H__
+#define __SERIAL_SHAKTI_UART_H__
+
+#include <sbi/sbi_types.h>
+
+void shakti_uart_putc(char ch);
+
+int shakti_uart_getc(void);
+
+int shakti_uart_init(unsigned long base, u32 in_freq, u32 baudrate);
+
+#endif
diff --git a/roms/opensbi/include/sbi_utils/serial/sifive-uart.h b/roms/opensbi/include/sbi_utils/serial/sifive-uart.h
new file mode 100644
index 000000000..f3233921f
--- /dev/null
+++ b/roms/opensbi/include/sbi_utils/serial/sifive-uart.h
@@ -0,0 +1,21 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2019 Western Digital Corporation or its affiliates.
+ *
+ * Authors:
+ * Anup Patel <anup.patel@wdc.com>
+ */
+
+#ifndef __SERIAL_SIFIVE_UART_H__
+#define __SERIAL_SIFIVE_UART_H__
+
+#include <sbi/sbi_types.h>
+
+void sifive_uart_putc(char ch);
+
+int sifive_uart_getc(void);
+
+int sifive_uart_init(unsigned long base, u32 in_freq, u32 baudrate);
+
+#endif
diff --git a/roms/opensbi/include/sbi_utils/serial/uart8250.h b/roms/opensbi/include/sbi_utils/serial/uart8250.h
new file mode 100644
index 000000000..0a1b5d368
--- /dev/null
+++ b/roms/opensbi/include/sbi_utils/serial/uart8250.h
@@ -0,0 +1,22 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2019 Western Digital Corporation or its affiliates.
+ *
+ * Authors:
+ * Anup Patel <anup.patel@wdc.com>
+ */
+
+#ifndef __SERIAL_UART8250_H__
+#define __SERIAL_UART8250_H__
+
+#include <sbi/sbi_types.h>
+
+void uart8250_putc(char ch);
+
+int uart8250_getc(void);
+
+int uart8250_init(unsigned long base, u32 in_freq, u32 baudrate, u32 reg_shift,
+ u32 reg_width);
+
+#endif