blob: 61bf53b02779200323e19c9c6671ec6b78cd1fde [file] [log] [blame]
David Daney4b6ba8a2010-10-26 15:07:13 -07001/*
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>
Shawn Guo6ca1a112011-07-04 14:03:17 +080012extern const int of_get_phy_mode(struct device_node *np);
David Daney4b6ba8a2010-10-26 15:07:13 -070013extern const void *of_get_mac_address(struct device_node *np);
Guenter Roeck65b3841b2013-04-02 09:35:07 +000014#else
15static inline const int of_get_phy_mode(struct device_node *np)
16{
17 return -ENODEV;
18}
19
20static inline const void *of_get_mac_address(struct device_node *np)
21{
22 return NULL;
23}
David Daney4b6ba8a2010-10-26 15:07:13 -070024#endif
25
26#endif /* __LINUX_OF_NET_H */