aboutsummaryrefslogtreecommitdiff
path: root/include/libfdt.h
blob: 7425aefe5c3434348fb18bf7e67b44c6b00d1e5d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#ifndef APOS_LIBFDT_H
#define APOS_LIBFDT_H
#include "../dtc/libfdt/libfdt.h"

#if defined(DEBUG)
void __dbg_fdt(void *fdt, int node_offset, int depth);
#define dbg_fdt(fdt) __dbg_fdt(fdt, 0, 0)
#else
#define dbg_fdt(...)
#endif

#define fdt_load_int_ptr(t, c, p)\
	((c) == 2 ? (t)fdt64_to_cpu(*(fdt64_t *)(p)) : (t)fdt32_to_cpu(*(fdt32_t *)(p)))

#endif