From cbaa9b0333517b3c25bea8d1c71ac8005ff1f727 Mon Sep 17 00:00:00 2001 From: Jun Liang Tan Date: Wed, 17 Aug 2022 23:40:56 +0800 Subject: lib: utils: serial: Add Cadence UART driver Add Cadence UART driver Signed-off-by: Jun Liang Tan Signed-off-by: Wei Liang Lim Reviewed-by: Andrew Jones Reviewed-by: Anup Patel --- include/sbi_utils/fdt/fdt_helper.h | 4 ++-- include/sbi_utils/serial/cadence-uart.h | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 include/sbi_utils/serial/cadence-uart.h (limited to 'include') diff --git a/include/sbi_utils/fdt/fdt_helper.h b/include/sbi_utils/fdt/fdt_helper.h index c60af35b..bcd49961 100644 --- a/include/sbi_utils/fdt/fdt_helper.h +++ b/include/sbi_utils/fdt/fdt_helper.h @@ -65,8 +65,8 @@ int fdt_parse_shakti_uart_node(void *fdt, int nodeoffset, int fdt_parse_sifive_uart_node(void *fdt, int nodeoffset, struct platform_uart_data *uart); -int fdt_parse_uart8250_node(void *fdt, int nodeoffset, - struct platform_uart_data *uart); +int fdt_parse_uart_node(void *fdt, int nodeoffset, + struct platform_uart_data *uart); int fdt_parse_uart8250(void *fdt, struct platform_uart_data *uart, const char *compatible); diff --git a/include/sbi_utils/serial/cadence-uart.h b/include/sbi_utils/serial/cadence-uart.h new file mode 100644 index 00000000..e75fb951 --- /dev/null +++ b/include/sbi_utils/serial/cadence-uart.h @@ -0,0 +1,16 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2022 StarFive Technology Co., Ltd. + * + * Author: Jun Liang Tan + */ + +#ifndef __SERIAL_CADENCE_UART_H__ +#define __SERIAL_CADENCE_UART_H__ + +#include + +int cadence_uart_init(unsigned long base, u32 in_freq, u32 baudrate); + +#endif -- cgit v1.3.1