hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/sh/boards/of-generic.c
....@@ -1,11 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * SH generic board support, using device tree
34 *
45 * Copyright (C) 2015-2016 Smart Energy Instruments, Inc.
5
- *
6
- * This file is subject to the terms and conditions of the GNU General Public
7
- * License. See the file "COPYING" in the main directory of this archive
8
- * for more details.
96 */
107
118 #include <linux/of.h>
....@@ -52,7 +49,7 @@
5249
5350 extern const struct of_cpu_method __cpu_method_of_table[];
5451 const struct of_cpu_method __cpu_method_of_table_sentinel
55
- __section(__cpu_method_of_table_end);
52
+ __section("__cpu_method_of_table_end");
5653
5754 static void sh_of_smp_probe(void)
5855 {
....@@ -64,7 +61,7 @@
6461
6562 init_cpu_possible(cpumask_of(0));
6663
67
- for_each_node_by_type(np, "cpu") {
64
+ for_each_of_cpu_node(np) {
6865 const __be32 *cell = of_get_property(np, "reg", NULL);
6966 u64 id = -1;
7067 if (cell) id = of_read_number(cell, of_n_addr_cells(np));
....@@ -117,17 +114,9 @@
117114 early_init_fdt_scan_reserved_mem();
118115 }
119116
120
-static void __init sh_of_time_init(void)
121
-{
122
- pr_info("SH generic board support: scanning for clocksource devices\n");
123
- timer_probe();
124
-}
125
-
126117 static void __init sh_of_setup(char **cmdline_p)
127118 {
128119 struct device_node *root;
129
-
130
- board_time_init = sh_of_time_init;
131120
132121 sh_mv.mv_name = "Unknown SH model";
133122 root = of_find_node_by_path("/");