net: Pull board_interface_eth_init() into common code

Move the board_interface_eth_init() into common ethernet uclass code,
since this function could be shared by multiple drivers.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marex@denx.de>
This commit is contained in:
Marek Vasut 2023-03-06 15:53:42 +01:00 committed by Stefano Babic
parent ecb1c37a7b
commit 6c7e559864
2 changed files with 7 additions and 7 deletions

View file

@ -1412,13 +1412,6 @@ err_free_reset_eqos:
return ret;
}
/* board-specific Ethernet Interface initializations. */
__weak int board_interface_eth_init(struct udevice *dev,
phy_interface_t interface_type)
{
return 0;
}
static int eqos_probe_resources_stm32(struct udevice *dev)
{
struct eqos_priv *eqos = dev_get_priv(dev);

View file

@ -49,6 +49,13 @@ struct eth_uclass_priv {
/* eth_errno - This stores the most recent failure code from DM functions */
static int eth_errno;
/* board-specific Ethernet Interface initializations. */
__weak int board_interface_eth_init(struct udevice *dev,
phy_interface_t interface_type)
{
return 0;
}
static struct eth_uclass_priv *eth_get_uclass_priv(void)
{
struct uclass *uc;