From 818f91eb5778781083e33ce3291bba76a3f1601c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 17 Jan 2016 14:51:57 -0700 Subject: net: Move common init into a new eth_common.c file Only half of the init is actually common. Move that part into a new common file and call it from driver-model and legacy code. More common functions will be added in future patches. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Acked-by: Joe Hershberger --- net/eth_common.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 net/eth_common.c (limited to 'net/eth_common.c') diff --git a/net/eth_common.c b/net/eth_common.c new file mode 100644 index 0000000000..ee0b6df376 --- /dev/null +++ b/net/eth_common.c @@ -0,0 +1,23 @@ +/* + * (C) Copyright 2001-2015 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + * Joe Hershberger, National Instruments + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include +#include "eth_internal.h" + +void eth_common_init(void) +{ + bootstage_mark(BOOTSTAGE_ID_NET_ETH_START); +#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) || defined(CONFIG_PHYLIB) + miiphy_init(); +#endif + +#ifdef CONFIG_PHYLIB + phy_init(); +#endif +} -- cgit v1.2.3