"git@web.lueluesay.top:root/go-libp2p.git" did not exist on "ea5428f97ea2a9222b54266cd992e6638a9b400c"
fdt_wrappers.h 595 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
/*
 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

/* Helper functions to offer easier navigation of Device Tree Blob */

#ifndef __FDT_WRAPPERS__
#define __FDT_WRAPPERS__

/* Number of cells, given total length in bytes. Each cell is 4 bytes long */
13
#define NCELLS(len) ((len) / 4U)
14
15
16
17
18
19

int fdtw_read_cells(const void *dtb, int node, const char *prop,
		unsigned int cells, void *value);
int fdtw_write_inplace_cells(void *dtb, int node, const char *prop,
		unsigned int cells, void *value);
#endif /* __FDT_WRAPPERS__ */