.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * tsi108/109 device setup code |
---|
3 | 4 | * |
---|
4 | 5 | * Maintained by Roy Zang < tie-fei.zang@freescale.com > |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify it |
---|
7 | | - * under the terms of the GNU General Public License as published by the |
---|
8 | | - * Free Software Foundation; either version 2 of the License, or (at your |
---|
9 | | - * option) any later version. |
---|
10 | 6 | */ |
---|
11 | 7 | |
---|
12 | 8 | #include <linux/stddef.h> |
---|
.. | .. |
---|
18 | 14 | #include <linux/irq.h> |
---|
19 | 15 | #include <linux/export.h> |
---|
20 | 16 | #include <linux/device.h> |
---|
| 17 | +#include <linux/etherdevice.h> |
---|
21 | 18 | #include <linux/platform_device.h> |
---|
22 | 19 | #include <linux/of_net.h> |
---|
23 | 20 | #include <asm/tsi108.h> |
---|
.. | .. |
---|
51 | 48 | const void *prop = of_get_property(tsi, "reg", &size); |
---|
52 | 49 | tsi108_csr_base = of_translate_address(tsi, prop); |
---|
53 | 50 | of_node_put(tsi); |
---|
54 | | - }; |
---|
| 51 | + } |
---|
55 | 52 | return tsi108_csr_base; |
---|
56 | 53 | } |
---|
57 | 54 | |
---|
.. | .. |
---|
105 | 102 | } |
---|
106 | 103 | |
---|
107 | 104 | mac_addr = of_get_mac_address(np); |
---|
108 | | - if (mac_addr) |
---|
109 | | - memcpy(tsi_eth_data.mac_addr, mac_addr, 6); |
---|
| 105 | + if (!IS_ERR(mac_addr)) |
---|
| 106 | + ether_addr_copy(tsi_eth_data.mac_addr, mac_addr); |
---|
110 | 107 | |
---|
111 | 108 | ph = of_get_property(np, "mdio-handle", NULL); |
---|
112 | 109 | mdio = of_find_node_by_phandle(*ph); |
---|