2018-11-28 13:04:27 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
|
|
|
/*
|
2020-12-04 14:47:28 +00:00
|
|
|
* Copyright 2018, 2020 NXP
|
2018-11-28 13:04:27 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <netdev.h>
|
|
|
|
#include <exports.h>
|
|
|
|
#include <fsl-mc/fsl_mc.h>
|
|
|
|
|
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
|
2020-06-26 06:13:33 +00:00
|
|
|
int board_eth_init(struct bd_info *bis)
|
2018-11-28 13:04:27 +00:00
|
|
|
{
|
|
|
|
#ifdef CONFIG_PHY_AQUANTIA
|
|
|
|
/*
|
|
|
|
* Export functions to be used by AQ firmware
|
|
|
|
* upload application
|
|
|
|
*/
|
|
|
|
gd->jt->strcpy = strcpy;
|
|
|
|
gd->jt->mdelay = mdelay;
|
|
|
|
gd->jt->mdio_get_current_dev = mdio_get_current_dev;
|
|
|
|
gd->jt->phy_find_by_mask = phy_find_by_mask;
|
|
|
|
gd->jt->mdio_phydev_for_ethname = mdio_phydev_for_ethname;
|
|
|
|
gd->jt->miiphy_set_current_dev = miiphy_set_current_dev;
|
|
|
|
#endif
|
|
|
|
return pci_eth_init(bis);
|
|
|
|
}
|
|
|
|
|
|
|
|
#if defined(CONFIG_RESET_PHY_R)
|
|
|
|
void reset_phy(void)
|
|
|
|
{
|
|
|
|
#if defined(CONFIG_FSL_MC_ENET)
|
|
|
|
mc_env_boot();
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
#endif /* CONFIG_RESET_PHY_R */
|