MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / dtb_node_read_u64

Function dtb_node_read_u64

components/legacy/fdt/src/dtb_access.c:125–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125int dtb_node_read_u64(const struct dtb_node *dn, const char *propname, uint64_t *outp)
126{
127 const uint64_t *val;
128
129 debug("%s: %s: ", __func__, propname);
130 if (!dn)
131 return -EINVAL;
132 val = dtb_node_find_property_value_of_size(dn, propname, sizeof(*outp));
133 if (DTB_IS_ERR(val))
134 {
135 debug("(not found)\n");
136 return DTB_PTR_ERR(val);
137 }
138
139 *outp = fdt64_to_cpu(*val);
140 debug("%#llx (%lld)\n", (unsigned long long)*outp,
141 (unsigned long long)*outp);
142
143 return 0;
144}
145
146uint64_t dtb_node_read_u64_default(const struct dtb_node *node, const char *propname, uint64_t def)
147{

Callers 1

Calls 2

fdt64_to_cpuFunction · 0.50

Tested by

no test coverage detected