forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/powerpc/platforms/cell/setup.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * linux/arch/powerpc/platforms/cell/cell_setup.c
34 *
....@@ -6,11 +7,6 @@
67 * Modified by Cort Dougan (cort@cs.nmt.edu)
78 * Modified by PPC64 Team, IBM Corp
89 * Modified by Cell Team, IBM Deutschland Entwicklung GmbH
9
- *
10
- * This program is free software; you can redistribute it and/or
11
- * modify it under the terms of the GNU General Public License
12
- * as published by the Free Software Foundation; either version
13
- * 2 of the License, or (at your option) any later version.
1410 */
1511 #undef DEBUG
1612
....@@ -35,7 +31,6 @@
3531 #include <asm/mmu.h>
3632 #include <asm/processor.h>
3733 #include <asm/io.h>
38
-#include <asm/pgtable.h>
3934 #include <asm/prom.h>
4035 #include <asm/rtas.h>
4136 #include <asm/pci-bridge.h>
....@@ -131,7 +126,7 @@
131126
132127 np = phb->dn;
133128 model = of_get_property(np, "model", NULL);
134
- if (model == NULL || strcmp(np->name, "pci"))
129
+ if (model == NULL || !of_node_name_eq(np, "pci"))
135130 return 0;
136131
137132 /* Setup workarounds for spider */
....@@ -168,8 +163,7 @@
168163 * platform devices for the PCI host bridges
169164 */
170165 for_each_child_of_node(root, np) {
171
- if (np->type == NULL || (strcmp(np->type, "pci") != 0 &&
172
- strcmp(np->type, "pciex") != 0))
166
+ if (!of_node_is_type(np, "pci") && !of_node_is_type(np, "pciex"))
173167 continue;
174168 of_platform_device_create(np, NULL, NULL);
175169 }
....@@ -245,9 +239,6 @@
245239 init_pci_config_tokens();
246240
247241 cbe_pervasive_init();
248
-#ifdef CONFIG_DUMMY_CONSOLE
249
- conswitchp = &dummy_con;
250
-#endif
251242
252243 mmio_nvram_init();
253244 }