Priyanka Jain | fd45ca0 | 2018-11-28 13:04:27 +0000 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
Meenakshi Aggarwal | 8a03b0d | 2020-12-04 20:17:28 +0530 | [diff] [blame] | 3 | * Copyright 2018, 2020 NXP |
Priyanka Jain | fd45ca0 | 2018-11-28 13:04:27 +0000 | [diff] [blame] | 4 | * |
| 5 | */ |
| 6 | |
| 7 | #include <common.h> |
Priyanka Jain | fd45ca0 | 2018-11-28 13:04:27 +0000 | [diff] [blame] | 8 | #include <netdev.h> |
Priyanka Jain | fd45ca0 | 2018-11-28 13:04:27 +0000 | [diff] [blame] | 9 | #include <exports.h> |
Priyanka Jain | fd45ca0 | 2018-11-28 13:04:27 +0000 | [diff] [blame] | 10 | #include <fsl-mc/fsl_mc.h> |
Priyanka Jain | fd45ca0 | 2018-11-28 13:04:27 +0000 | [diff] [blame] | 11 | |
| 12 | DECLARE_GLOBAL_DATA_PTR; |
| 13 | |
Masahiro Yamada | f7ed78b | 2020-06-26 15:13:33 +0900 | [diff] [blame] | 14 | int board_eth_init(struct bd_info *bis) |
Priyanka Jain | fd45ca0 | 2018-11-28 13:04:27 +0000 | [diff] [blame] | 15 | { |
Priyanka Jain | fd45ca0 | 2018-11-28 13:04:27 +0000 | [diff] [blame] | 16 | #ifdef CONFIG_PHY_AQUANTIA |
| 17 | /* |
| 18 | * Export functions to be used by AQ firmware |
| 19 | * upload application |
| 20 | */ |
| 21 | gd->jt->strcpy = strcpy; |
| 22 | gd->jt->mdelay = mdelay; |
| 23 | gd->jt->mdio_get_current_dev = mdio_get_current_dev; |
| 24 | gd->jt->phy_find_by_mask = phy_find_by_mask; |
| 25 | gd->jt->mdio_phydev_for_ethname = mdio_phydev_for_ethname; |
| 26 | gd->jt->miiphy_set_current_dev = miiphy_set_current_dev; |
| 27 | #endif |
| 28 | return pci_eth_init(bis); |
| 29 | } |
| 30 | |
| 31 | #if defined(CONFIG_RESET_PHY_R) |
| 32 | void reset_phy(void) |
| 33 | { |
| 34 | #if defined(CONFIG_FSL_MC_ENET) |
| 35 | mc_env_boot(); |
| 36 | #endif |
| 37 | } |
| 38 | #endif /* CONFIG_RESET_PHY_R */ |