/* TI TLK105 & DP83822 PHY link speed polling function Link speed polling function for the TI TLK105 & DP83822 PHYs.  */
static enum eth_xlnx_link_speed phy_xlnx_gem_ti_dp83822_poll_lspd(const struct device *dev)
/* TI TLK105 & DP83822 PHY link speed polling function Link speed polling function for the TI TLK105 & DP83822 PHYs.  */
static enum eth_xlnx_link_speed phy_xlnx_gem_ti_dp83822_poll_lspd(const struct device *dev)
{
	const struct eth_xlnx_gem_dev_cfg *dev_conf = dev->config;
	struct eth_xlnx_gem_dev_data *dev_data = dev->data;
	enum eth_xlnx_link_speed link_speed;
	uint16_t phy_data;
	phy_data = phy_xlnx_gem_mdio_read(dev_conf->base_addr, dev_data->phy_addr,
					  PHY_TI_PHY_STATUS_REGISTER);
	if ((phy_data & PHY_TI_PHY_STATUS_LINK_BIT) != 0) {
		if ((phy_data & PHY_TI_PHY_STATUS_SPEED_BIT) != 0) {
			link_speed = LINK_10MBIT;
		} else {
			link_speed = LINK_100MBIT;
		}
	} else {
		link_speed = LINK_DOWN;
	}
	return link_speed;
}