/* GEM associated PHY detection and setup function If the current GEM device shall manage an associated PHY, its detection and configuration is performed from within this function. Called from within the device initialization function. This function refers to functionality implemented in the phy_xlnx_gem module.  */
static void eth_xlnx_gem_init_phy(const struct device *dev)
/* GEM associated PHY detection and setup function If the current GEM device shall manage an associated PHY, its detection and configuration is performed from within this function. Called from within the device initialization function. This function refers to functionality implemented in the phy_xlnx_gem module.  */
static void eth_xlnx_gem_init_phy(const struct device *dev)
{
	struct eth_xlnx_gem_dev_data *dev_data = dev->data;
	int detect_rc;
	LOG_DBG("%s attempting to initialize associated PHY", dev->name);
	detect_rc = phy_xlnx_gem_detect(dev);
	if (detect_rc == 0 && dev_data->phy_id != 0x00000000 &&
			dev_data->phy_id != 0xFFFFFFFF &&
			dev_data->phy_access_api != NULL) {
		dev_data->phy_access_api->phy_reset_func(dev);
		dev_data->phy_access_api->phy_configure_func(dev);
	} else {
		LOG_WRN("%s no compatible PHY detected", dev->name);
	}
}