.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * cbe_regs.c |
---|
3 | 4 | * |
---|
.. | .. |
---|
11 | 12 | #include <linux/export.h> |
---|
12 | 13 | #include <linux/of_device.h> |
---|
13 | 14 | #include <linux/of_platform.h> |
---|
| 15 | +#include <linux/pgtable.h> |
---|
14 | 16 | |
---|
15 | 17 | #include <asm/io.h> |
---|
16 | | -#include <asm/pgtable.h> |
---|
17 | 18 | #include <asm/prom.h> |
---|
18 | 19 | #include <asm/ptrace.h> |
---|
19 | 20 | #include <asm/cell-regs.h> |
---|
.. | .. |
---|
53 | 54 | int i; |
---|
54 | 55 | struct device_node *tmp_np; |
---|
55 | 56 | |
---|
56 | | - if (strcasecmp(np->type, "spe")) { |
---|
| 57 | + if (!of_node_is_type(np, "spe")) { |
---|
57 | 58 | for (i = 0; i < cbe_regs_map_count; i++) |
---|
58 | 59 | if (cbe_regs_maps[i].cpu_node == np || |
---|
59 | 60 | cbe_regs_maps[i].be_node == np) |
---|
.. | .. |
---|
70 | 71 | tmp_np = tmp_np->parent; |
---|
71 | 72 | /* on a correct devicetree we wont get up to root */ |
---|
72 | 73 | BUG_ON(!tmp_np); |
---|
73 | | - } while (strcasecmp(tmp_np->type, "cpu") && |
---|
74 | | - strcasecmp(tmp_np->type, "be")); |
---|
| 74 | + } while (!of_node_is_type(tmp_np, "cpu") || |
---|
| 75 | + !of_node_is_type(tmp_np, "be")); |
---|
75 | 76 | |
---|
76 | 77 | np->data = cbe_find_map(tmp_np); |
---|
77 | 78 | |
---|