.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * |
---|
3 | 4 | * arch/xtensa/platform/xtavnet/setup.c |
---|
.. | .. |
---|
8 | 9 | * Joe Taylor <joe@tensilica.com> |
---|
9 | 10 | * |
---|
10 | 11 | * 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 | | - * |
---|
17 | 12 | */ |
---|
18 | 13 | #include <linux/stddef.h> |
---|
19 | 14 | #include <linux/kernel.h> |
---|
20 | 15 | #include <linux/init.h> |
---|
| 16 | +#include <linux/io.h> |
---|
21 | 17 | #include <linux/errno.h> |
---|
22 | 18 | #include <linux/reboot.h> |
---|
23 | 19 | #include <linux/kdev_t.h> |
---|
.. | .. |
---|
28 | 24 | #include <linux/of.h> |
---|
29 | 25 | #include <linux/clk-provider.h> |
---|
30 | 26 | #include <linux/of_address.h> |
---|
| 27 | +#include <linux/slab.h> |
---|
31 | 28 | |
---|
32 | 29 | #include <asm/timex.h> |
---|
33 | 30 | #include <asm/processor.h> |
---|
.. | .. |
---|
64 | 61 | /* control never gets here */ |
---|
65 | 62 | } |
---|
66 | 63 | |
---|
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 | | - |
---|
83 | 64 | #ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT |
---|
84 | 65 | |
---|
85 | 66 | void __init platform_calibrate_ccount(void) |
---|
.. | .. |
---|
98 | 79 | u32 freq; |
---|
99 | 80 | |
---|
100 | 81 | if (!base) { |
---|
101 | | - pr_err("%s: invalid address\n", np->name); |
---|
| 82 | + pr_err("%pOFn: invalid address\n", np); |
---|
102 | 83 | return; |
---|
103 | 84 | } |
---|
104 | 85 | |
---|
.. | .. |
---|
107 | 88 | clk = clk_register_fixed_rate(NULL, np->name, NULL, 0, freq); |
---|
108 | 89 | |
---|
109 | 90 | if (IS_ERR(clk)) { |
---|
110 | | - pr_err("%s: clk registration failed\n", np->name); |
---|
| 91 | + pr_err("%pOFn: clk registration failed\n", np); |
---|
111 | 92 | return; |
---|
112 | 93 | } |
---|
113 | 94 | |
---|
114 | 95 | 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); |
---|
116 | 97 | return; |
---|
117 | 98 | } |
---|
118 | 99 | } |
---|
.. | .. |
---|
152 | 133 | |
---|
153 | 134 | if ((eth = of_find_compatible_node(eth, NULL, "opencores,ethoc"))) |
---|
154 | 135 | update_local_mac(eth); |
---|
| 136 | + of_node_put(eth); |
---|
155 | 137 | return 0; |
---|
156 | 138 | } |
---|
157 | 139 | arch_initcall(machine_setup); |
---|