Files
opensbi/include/sbi_utils/fdt/fdt_helper.h
Atish Patra 040e4e2ec2 lib: utils: Move fdt fixup helper routines to a different file
FDT helper file contain both fdt fixup and parsing functions.

Split the fixup related functions to a separate file for a better code
organization.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
2020-03-24 13:30:32 +05:30

34 lines
788 B
C

// SPDX-License-Identifier: BSD-2-Clause
/*
* fdt_helper.h - Flat Device Tree parsing helper routines
* Implement helper routines to parse FDT nodes on top of
* libfdt for OpenSBI usage
*
* Copyright (C) 2020 Bin Meng <bmeng.cn@gmail.com>
*/
#ifndef __FDT_HELPER_H__
#define __FDT_HELPER_H__
struct platform_uart_data {
unsigned long addr;
unsigned long freq;
unsigned long baud;
};
struct platform_plic_data {
unsigned long addr;
unsigned long num_src;
};
int fdt_parse_uart8250(void *fdt, struct platform_uart_data *uart,
const char *compatible);
int fdt_parse_plic(void *fdt, struct platform_plic_data *plic,
const char *compatible);
int fdt_parse_clint(void *fdt, unsigned long *clint_addr,
const char *compatible);
#endif /* __FDT_HELPER_H__ */