forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/arch/powerpc/platforms/cell/cbe_regs.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * cbe_regs.c
34 *
....@@ -11,9 +12,9 @@
1112 #include <linux/export.h>
1213 #include <linux/of_device.h>
1314 #include <linux/of_platform.h>
15
+#include <linux/pgtable.h>
1416
1517 #include <asm/io.h>
16
-#include <asm/pgtable.h>
1718 #include <asm/prom.h>
1819 #include <asm/ptrace.h>
1920 #include <asm/cell-regs.h>
....@@ -53,7 +54,7 @@
5354 int i;
5455 struct device_node *tmp_np;
5556
56
- if (strcasecmp(np->type, "spe")) {
57
+ if (!of_node_is_type(np, "spe")) {
5758 for (i = 0; i < cbe_regs_map_count; i++)
5859 if (cbe_regs_maps[i].cpu_node == np ||
5960 cbe_regs_maps[i].be_node == np)
....@@ -70,8 +71,8 @@
7071 tmp_np = tmp_np->parent;
7172 /* on a correct devicetree we wont get up to root */
7273 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"));
7576
7677 np->data = cbe_find_map(tmp_np);
7778