mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-16 00:37:04 +08:00
@@ -76,6 +76,8 @@ of_property_read_u32(const struct device_node *dn, const char *name, u32 *val)
|
|||||||
return (of_property_read_u32_array(dn, name, val, 1));
|
return (of_property_read_u32_array(dn, name, val, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint64_t of_read_number(const uint32_t *cell, int size);
|
||||||
|
|
||||||
struct device_node *of_parse_phandle(struct device_node *dns,
|
struct device_node *of_parse_phandle(struct device_node *dns,
|
||||||
struct device_node *dn, const char *phandle_name, int index);
|
struct device_node *dn, const char *phandle_name, int index);
|
||||||
|
|
||||||
|
@@ -121,6 +121,22 @@ of_find_compatible_node(struct device_node *dns, const struct device_node *dn,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint64_t
|
||||||
|
of_read_number(const uint32_t *cell, int size)
|
||||||
|
{
|
||||||
|
uint64_t number;
|
||||||
|
|
||||||
|
number = 0;
|
||||||
|
|
||||||
|
while (size > 0) {
|
||||||
|
number = (number << 32) | fdt32_to_cpu(*cell);
|
||||||
|
++cell;
|
||||||
|
--size;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (number);
|
||||||
|
}
|
||||||
|
|
||||||
struct device_node *
|
struct device_node *
|
||||||
of_parse_phandle(struct device_node *dns, struct device_node *dn,
|
of_parse_phandle(struct device_node *dns, struct device_node *dn,
|
||||||
const char *phandle_name, int index)
|
const char *phandle_name, int index)
|
||||||
|
Reference in New Issue
Block a user