24 if (len !=
sizeof(*c))
38 val =
fdt_cells(fdt, nodeoffset,
"#address-cells");
50 val =
fdt_cells(fdt, nodeoffset,
"#size-cells");
60 int addr_cells, size_cells, ret;
75 if (addr_cells == 1) {
76 if ((addr > UINT32_MAX) || (((
uint64_t) UINT32_MAX + 1 - addr) <
size))
80 }
else if (addr_cells == 2) {
87 prop += addr_cells *
sizeof(
fdt32_t);
88 if (size_cells == 1) {
89 if (
size > UINT32_MAX)
93 }
else if (size_cells == 2) {
100 (addr_cells + size_cells) *
sizeof(
fdt32_t));
int fdt_size_cells(const void *fdt, int nodeoffset)
int fdt_appendprop_addrrange(void *fdt, int parent, int nodeoffset, const char *name, uint64_t addr, uint64_t size)
static int fdt_cells(const void *fdt, int nodeoffset, const char *name)
int fdt_address_cells(const void *fdt, int nodeoffset)
const void * fdt_getprop(const void *fdt, int nodeoffset, const char *name, int *lenp)
int fdt_appendprop(void *fdt, int nodeoffset, const char *name, const void *val, int len)
static void fdt64_st(void *property, uint64_t value)
static void fdt32_st(void *property, uint32_t value)
#define FDT_ERR_BADNCELLS
static uint32_t fdt32_to_cpu(fdt32_t x)
unsigned long long uint64_t