diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-05-21 11:56:12 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-05-21 14:42:17 +0200 |
commit | 4778c7da3786cab7ee6c453fa19149e8b995bdf3 (patch) | |
tree | 72e51994a389ce6dc29bbc3e366b7bb9ac9b8b83 /include/linux | |
parent | 9cbfe615f9a0784dc1186a9cc117bc40111d0db9 (diff) | |
download | barebox-4778c7da3786cab7ee6c453fa19149e8b995bdf3.tar.gz barebox-4778c7da3786cab7ee6c453fa19149e8b995bdf3.tar.xz |
net: phy: Support limiting phy speed in the devicetree
Even when both the ethernet controller and the phy support certain
features a board may have additional limitations. Allow specifying
it in the devicetree.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/phy.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index 9567c43e38..3cdbc6ebfa 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -20,18 +20,26 @@ #include <linux/ethtool.h> #include <linux/mii.h> -#define PHY_BASIC_FEATURES (SUPPORTED_10baseT_Half | \ - SUPPORTED_10baseT_Full | \ - SUPPORTED_100baseT_Half | \ - SUPPORTED_100baseT_Full | \ - SUPPORTED_Autoneg | \ +#define PHY_DEFAULT_FEATURES (SUPPORTED_Autoneg | \ SUPPORTED_TP | \ SUPPORTED_MII) -#define PHY_GBIT_FEATURES (PHY_BASIC_FEATURES | \ - SUPPORTED_1000baseT_Half | \ +#define PHY_10BT_FEATURES (SUPPORTED_10baseT_Half | \ + SUPPORTED_10baseT_Full) + +#define PHY_100BT_FEATURES (SUPPORTED_100baseT_Half | \ + SUPPORTED_100baseT_Full) + +#define PHY_1000BT_FEATURES (SUPPORTED_1000baseT_Half | \ SUPPORTED_1000baseT_Full) +#define PHY_BASIC_FEATURES (PHY_10BT_FEATURES | \ + PHY_100BT_FEATURES | \ + PHY_DEFAULT_FEATURES) + +#define PHY_GBIT_FEATURES (PHY_BASIC_FEATURES | \ + PHY_1000BT_FEATURES) + /* Interface Mode definitions */ typedef enum { PHY_INTERFACE_MODE_NA, |