Files
opensbi/include/sbi_utils/serial/fdt_serial.h
Samuel Holland c36801841e lib: utils/serial: Pass the FDT to fdt_serial_init()
Indicate that this function does not modify the FDT blob, and
deduplicate the call to fdt_get_address().

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
2024-08-24 13:03:01 +05:30

31 lines
542 B
C

/*
* 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>
#ifdef CONFIG_FDT_SERIAL
struct fdt_serial {
const struct fdt_match *match_table;
int (*init)(const void *fdt, int nodeoff, const struct fdt_match *match);
};
int fdt_serial_init(const void *fdt);
#else
static inline int fdt_serial_init(const void *fdt) { return 0; }
#endif
#endif