]> git.sur5r.net Git - u-boot/blobdiff - include/phy.h
MIPS: reserve space for exception vectors
[u-boot] / include / phy.h
index e030c9ff2e2436b1a620d4bf03227e5cf320b9d9..268d9a1823f93cd1eab151053b23743080f399d7 100644 (file)
@@ -17,6 +17,8 @@
 
 #define PHY_MAX_ADDR 32
 
+#define PHY_FLAG_BROKEN_RESET  (1 << 0) /* soft reset not supported */
+
 #define PHY_DEFAULT_FEATURES   (SUPPORTED_Autoneg | \
                                 SUPPORTED_TP | \
                                 SUPPORTED_MII)
@@ -247,6 +249,7 @@ int gen10g_startup(struct phy_device *phydev);
 int gen10g_shutdown(struct phy_device *phydev);
 int gen10g_discover_mmds(struct phy_device *phydev);
 
+int phy_mv88e61xx_init(void);
 int phy_aquantia_init(void);
 int phy_atheros_init(void);
 int phy_broadcom_init(void);
@@ -262,6 +265,7 @@ int phy_smsc_init(void);
 int phy_teranetics_init(void);
 int phy_ti_init(void);
 int phy_vitesse_init(void);
+int phy_xilinx_init(void);
 
 int board_phy_config(struct phy_device *phydev);
 int get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id);
@@ -274,6 +278,28 @@ int get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id);
  */
 int phy_get_interface_by_name(const char *str);
 
+/**
+ * phy_interface_is_rgmii - Convenience function for testing if a PHY interface
+ * is RGMII (all variants)
+ * @phydev: the phy_device struct
+ */
+static inline bool phy_interface_is_rgmii(struct phy_device *phydev)
+{
+       return phydev->interface >= PHY_INTERFACE_MODE_RGMII &&
+               phydev->interface <= PHY_INTERFACE_MODE_RGMII_TXID;
+}
+
+/**
+ * phy_interface_is_sgmii - Convenience function for testing if a PHY interface
+ * is SGMII (all variants)
+ * @phydev: the phy_device struct
+ */
+static inline bool phy_interface_is_sgmii(struct phy_device *phydev)
+{
+       return phydev->interface >= PHY_INTERFACE_MODE_SGMII &&
+               phydev->interface <= PHY_INTERFACE_MODE_QSGMII;
+}
+
 /* PHY UIDs for various PHYs that are referenced in external code */
 #define PHY_UID_CS4340  0x13e51002
 #define PHY_UID_TN2020 0x00a19410