1 /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ 2 /* 3 * Copyright (c) 2020 Fuzhou Rockchip Electronics Co., Ltd 4 */ 5 6 #ifndef __DWMAC_RK_TOOL_H__ 7 #define __DWMAC_RK_TOOL_H__ 8 9 #include <linux/phy.h> 10 #include "stmmac.h" 11 12 void dwmac_rk_set_rgmii_delayline(struct stmmac_priv *priv, int tx_delay, int rx_delay); 13 void dwmac_rk_get_rgmii_delayline(struct stmmac_priv *priv, int *tx_delay, int *rx_delay); 14 int dwmac_rk_get_phy_interface(struct stmmac_priv *priv); 15 16 int dwmac_rk_create_loopback_sysfs(struct device *dev); 17 int dwmac_rk_remove_loopback_sysfs(struct device *device); 18 19 #ifdef CONFIG_DWMAC_RK_AUTO_DELAYLINE 20 int dwmac_rk_get_rgmii_delayline_from_vendor(struct stmmac_priv *priv); 21 int dwmac_rk_search_rgmii_delayline(struct stmmac_priv *priv); 22 #endif 23 24 #endif /* __DWMAC_RK_TOOL_H__ */ 25 26