From 117fb6dcb147913034fe82d0ed038fa7a05f1a1d Mon Sep 17 00:00:00 2001 From: Daniel Cederman Date: Fri, 30 Apr 2021 08:35:56 +0200 Subject: lib: utils/serial: Add support for Gaisler APBUART This patch adds support for the UART used by the NOEL-V processor. Cobham Gaisler's NOEL-V RISC-V processor IP is available under GPL and commercial license and is described in more detail at https://www.gaisler.com/noelv. Signed-off-by: Daniel Cederman Reviewed-by: Anup Patel Reviewed-by: Bin Meng --- include/sbi_utils/fdt/fdt_helper.h | 3 +++ include/sbi_utils/serial/gaisler-uart.h | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 include/sbi_utils/serial/gaisler-uart.h (limited to 'include/sbi_utils') diff --git a/include/sbi_utils/fdt/fdt_helper.h b/include/sbi_utils/fdt/fdt_helper.h index f5222de..c89f2e6 100644 --- a/include/sbi_utils/fdt/fdt_helper.h +++ b/include/sbi_utils/fdt/fdt_helper.h @@ -39,6 +39,9 @@ int fdt_parse_hart_id(void *fdt, int cpu_offset, u32 *hartid); int fdt_parse_max_hart_id(void *fdt, u32 *max_hartid); +int fdt_parse_gaisler_uart_node(void *fdt, int nodeoffset, + struct platform_uart_data *uart); + int fdt_parse_shakti_uart_node(void *fdt, int nodeoffset, struct platform_uart_data *uart); diff --git a/include/sbi_utils/serial/gaisler-uart.h b/include/sbi_utils/serial/gaisler-uart.h new file mode 100644 index 0000000..11d1f20 --- /dev/null +++ b/include/sbi_utils/serial/gaisler-uart.h @@ -0,0 +1,17 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2021 Cobham Gaisler AB. + * + * Authors: + * Daniel Cederman + */ + +#ifndef __SERIAL_GAISLER_APBUART_H__ +#define __SERIAL_GAISLER_APBUART_H__ + +#include + +int gaisler_uart_init(unsigned long base, u32 in_freq, u32 baudrate); + +#endif -- cgit v1.2.3