Commit | Line | Data |
---|---|---|
4b6ba8aa DD |
1 | /* |
2 | * OF helpers for network devices. | |
3 | * | |
4 | * This file is released under the GPLv2 | |
5 | */ | |
6 | ||
7 | #ifndef __LINUX_OF_NET_H | |
8 | #define __LINUX_OF_NET_H | |
9 | ||
10 | #ifdef CONFIG_OF_NET | |
11 | #include <linux/of.h> | |
aa836df9 FF |
12 | |
13 | struct net_device; | |
7e0bdf15 | 14 | extern int of_get_phy_mode(struct device_node *np); |
4b6ba8aa | 15 | extern const void *of_get_mac_address(struct device_node *np); |
9217e566 | 16 | extern int of_get_nvmem_mac_address(struct device_node *np, void *addr); |
aa836df9 | 17 | extern struct net_device *of_find_net_device_by_node(struct device_node *np); |
65b3841b | 18 | #else |
7e0bdf15 | 19 | static inline int of_get_phy_mode(struct device_node *np) |
65b3841b GR |
20 | { |
21 | return -ENODEV; | |
22 | } | |
23 | ||
24 | static inline const void *of_get_mac_address(struct device_node *np) | |
25 | { | |
26 | return NULL; | |
27 | } | |
aa836df9 | 28 | |
9217e566 ML |
29 | static inline int of_get_nvmem_mac_address(struct device_node *np, void *addr) |
30 | { | |
31 | return -ENODEV; | |
32 | } | |
33 | ||
aa836df9 FF |
34 | static inline struct net_device *of_find_net_device_by_node(struct device_node *np) |
35 | { | |
36 | return NULL; | |
37 | } | |
4b6ba8aa DD |
38 | #endif |
39 | ||
40 | #endif /* __LINUX_OF_NET_H */ |