hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/mips/generic/init.c
....@@ -1,18 +1,14 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (C) 2016 Imagination Technologies
34 * Author: Paul Burton <paul.burton@mips.com>
4
- *
5
- * This program is free software; you can redistribute it and/or modify it
6
- * under the terms of the GNU General Public License as published by the
7
- * Free Software Foundation; either version 2 of the License, or (at your
8
- * option) any later version.
95 */
106
117 #include <linux/clk.h>
12
-#include <linux/clk-provider.h>
138 #include <linux/clocksource.h>
149 #include <linux/init.h>
1510 #include <linux/irqchip.h>
11
+#include <linux/of_clk.h>
1612 #include <linux/of_fdt.h>
1713
1814 #include <asm/bootinfo.h>
....@@ -24,9 +20,9 @@
2420 #include <asm/smp-ops.h>
2521 #include <asm/time.h>
2622
27
-static __initdata const void *fdt;
28
-static __initdata const struct mips_machine *mach;
29
-static __initdata const void *mach_match_data;
23
+static __initconst const void *fdt;
24
+static __initconst const struct mips_machine *mach;
25
+static __initconst const void *mach_match_data;
3026
3127 void __init prom_init(void)
3228 {
....@@ -43,14 +39,13 @@
4339 /* Already set up */
4440 return (void *)fdt;
4541
46
- if ((fw_arg0 == -2) && !fdt_check_header((void *)fw_arg1)) {
42
+ if (fw_passed_dtb && !fdt_check_header((void *)fw_passed_dtb)) {
4743 /*
48
- * We booted using the UHI boot protocol, so we have been
49
- * provided with the appropriate device tree for the board.
50
- * Make use of it & search for any machine struct based upon
51
- * the root compatible string.
44
+ * We have been provided with the appropriate device tree for
45
+ * the board. Make use of it & search for any machine struct
46
+ * based upon the root compatible string.
5247 */
53
- fdt = (void *)fw_arg1;
48
+ fdt = (void *)fw_passed_dtb;
5449
5550 for_each_mips_machine(check_mach) {
5651 match = mips_machine_is_compatible(check_mach, fdt);
....@@ -110,7 +105,7 @@
110105 if (mach && mach->fixup_fdt)
111106 fdt = mach->fixup_fdt(fdt, mach_match_data);
112107
113
- strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);
108
+ fw_init_cmdline();
114109 __dt_setup_arch((void *)fdt);
115110 }
116111