blob: 44d9782d729f5000a1a758c0ee09c82808991a90 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Prabhakar Kushwahab0b41892015-05-28 14:53:54 +05302/*
3 * Copyright 2015 Freescale Semiconductor, Inc.
4 *
Prabhakar Kushwahab0b41892015-05-28 14:53:54 +05305 */
6
Prabhakar Kushwaha7b3a6bc2015-06-28 11:03:59 +05307#include <exports.h>
Bogdan Purcareata08bc0142017-05-24 16:40:21 +00008#include <fsl-mc/fsl_mc.h>
Prabhakar Kushwahab0b41892015-05-28 14:53:54 +05309
Prabhakar Kushwaha7b3a6bc2015-06-28 11:03:59 +053010DECLARE_GLOBAL_DATA_PTR;
11
Masahiro Yamadaf7ed78b2020-06-26 15:13:33 +090012int board_eth_init(struct bd_info *bis)
Prabhakar Kushwahab0b41892015-05-28 14:53:54 +053013{
Prabhakar Kushwahab0b41892015-05-28 14:53:54 +053014
Prabhakar Kushwaha7b3a6bc2015-06-28 11:03:59 +053015#ifdef CONFIG_PHY_AQUANTIA
16 /*
17 * Export functions to be used by AQ firmware
18 * upload application
19 */
20 gd->jt->strcpy = strcpy;
21 gd->jt->mdelay = mdelay;
22 gd->jt->mdio_get_current_dev = mdio_get_current_dev;
23 gd->jt->phy_find_by_mask = phy_find_by_mask;
24 gd->jt->mdio_phydev_for_ethname = mdio_phydev_for_ethname;
25 gd->jt->miiphy_set_current_dev = miiphy_set_current_dev;
26#endif
Ioana Ciorneicfa114a2020-03-18 16:47:40 +020027
Ioana Ciorneicfa114a2020-03-18 16:47:40 +020028 return 0;
Prabhakar Kushwahab0b41892015-05-28 14:53:54 +053029}
Bogdan Purcareata08bc0142017-05-24 16:40:21 +000030
31#if defined(CONFIG_RESET_PHY_R)
32void reset_phy(void)
33{
34 mc_env_boot();
35}
36#endif /* CONFIG_RESET_PHY_R */