Lines Matching defs:node
26 * Returns the hart ID of the given device tree node, or -ENODEV if the node
27 * isn't an enabled and valid RISC-V hart node.
29 int riscv_of_processor_hartid(struct device_node *node, unsigned long *hart)
33 *hart = (unsigned long)of_get_cpu_hwid(node, 0);
49 int __init riscv_early_of_processor_hartid(struct device_node *node, unsigned long *hart)
53 if (!of_device_is_compatible(node, "riscv")) {
58 *hart = (unsigned long)of_get_cpu_hwid(node, 0);
64 if (!of_device_is_available(node)) {
69 if (of_property_read_string(node, "riscv,isa-base", &isa))
82 if (!of_property_present(node, "riscv,isa-extensions"))
85 if (of_property_match_string(node, "riscv,isa-extensions", "i") < 0 ||
86 of_property_match_string(node, "riscv,isa-extensions", "m") < 0 ||
87 of_property_match_string(node, "riscv,isa-extensions", "a") < 0) {
101 if (of_property_read_string(node, "riscv,isa", &isa)) {
121 * Find hart ID of the CPU DT node under which given DT node falls.
124 * RISC-V core (HART) node and extract the cpuid from it.
126 int riscv_of_parent_hartid(struct device_node *node, unsigned long *hartid)
128 for (; node; node = node->parent) {
129 if (of_device_is_compatible(node, "riscv")) {
130 *hartid = (unsigned long)of_get_cpu_hwid(node, 0);
274 struct device_node *node;
291 node = of_get_cpu_node(cpu_id, NULL);
293 if (!of_property_read_string(node, "compatible", &compat) &&
297 of_node_put(node);