hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/arch/xtensa/platforms/xtfpga/setup.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 *
34 * arch/xtensa/platform/xtavnet/setup.c
....@@ -8,16 +9,11 @@
89 * Joe Taylor <joe@tensilica.com>
910 *
1011 * Copyright 2001 - 2006 Tensilica Inc.
11
- *
12
- * This program is free software; you can redistribute it and/or modify it
13
- * under the terms of the GNU General Public License as published by the
14
- * Free Software Foundation; either version 2 of the License, or (at your
15
- * option) any later version.
16
- *
1712 */
1813 #include <linux/stddef.h>
1914 #include <linux/kernel.h>
2015 #include <linux/init.h>
16
+#include <linux/io.h>
2117 #include <linux/errno.h>
2218 #include <linux/reboot.h>
2319 #include <linux/kdev_t.h>
....@@ -28,6 +24,7 @@
2824 #include <linux/of.h>
2925 #include <linux/clk-provider.h>
3026 #include <linux/of_address.h>
27
+#include <linux/slab.h>
3128
3229 #include <asm/timex.h>
3330 #include <asm/processor.h>
....@@ -64,22 +61,6 @@
6461 /* control never gets here */
6562 }
6663
67
-void __init platform_setup(char **cmdline)
68
-{
69
-}
70
-
71
-/* early initialization */
72
-
73
-void __init platform_init(bp_tag_t *first)
74
-{
75
-}
76
-
77
-/* Heartbeat. */
78
-
79
-void platform_heartbeat(void)
80
-{
81
-}
82
-
8364 #ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT
8465
8566 void __init platform_calibrate_ccount(void)
....@@ -98,7 +79,7 @@
9879 u32 freq;
9980
10081 if (!base) {
101
- pr_err("%s: invalid address\n", np->name);
82
+ pr_err("%pOFn: invalid address\n", np);
10283 return;
10384 }
10485
....@@ -107,12 +88,12 @@
10788 clk = clk_register_fixed_rate(NULL, np->name, NULL, 0, freq);
10889
10990 if (IS_ERR(clk)) {
110
- pr_err("%s: clk registration failed\n", np->name);
91
+ pr_err("%pOFn: clk registration failed\n", np);
11192 return;
11293 }
11394
11495 if (of_clk_add_provider(np, of_clk_src_simple_get, clk)) {
115
- pr_err("%s: clk provider registration failed\n", np->name);
96
+ pr_err("%pOFn: clk provider registration failed\n", np);
11697 return;
11798 }
11899 }
....@@ -152,6 +133,7 @@
152133
153134 if ((eth = of_find_compatible_node(eth, NULL, "opencores,ethoc")))
154135 update_local_mac(eth);
136
+ of_node_put(eth);
155137 return 0;
156138 }
157139 arch_initcall(machine_setup);