David Daney | 4b6ba8a | 2010-10-26 15:07:13 -0700 | [diff] [blame] | 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> |
Geert Uytterhoeven | 7e0bdf1 | 2013-08-18 13:01:30 +0200 | [diff] [blame] | 12 | extern int of_get_phy_mode(struct device_node *np); |
David Daney | 4b6ba8a | 2010-10-26 15:07:13 -0700 | [diff] [blame] | 13 | extern const void *of_get_mac_address(struct device_node *np); |
Guenter Roeck | 65b3841b | 2013-04-02 09:35:07 +0000 | [diff] [blame] | 14 | #else |
Geert Uytterhoeven | 7e0bdf1 | 2013-08-18 13:01:30 +0200 | [diff] [blame] | 15 | static inline int of_get_phy_mode(struct device_node *np) |
Guenter Roeck | 65b3841b | 2013-04-02 09:35:07 +0000 | [diff] [blame] | 16 | { |
| 17 | return -ENODEV; |
| 18 | } |
| 19 | |
| 20 | static inline const void *of_get_mac_address(struct device_node *np) |
| 21 | { |
| 22 | return NULL; |
| 23 | } |
David Daney | 4b6ba8a | 2010-10-26 15:07:13 -0700 | [diff] [blame] | 24 | #endif |
| 25 | |
| 26 | #endif /* __LINUX_OF_NET_H */ |