mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:16:47 +08:00
arch/risc-v/src/mpfs/mpfs_ethernet.c: Remove unnecessary phyinit
mpfs_phyinit() was called twice during ifup(). Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
This commit is contained in:
committed by
Xiang Xiao
parent
cc662453c1
commit
12290d0111
@@ -3368,6 +3368,17 @@ static int mpfs_phyinit(struct mpfs_ethmac_s *priv)
|
|||||||
{
|
{
|
||||||
int ret = -EINVAL;
|
int ret = -EINVAL;
|
||||||
|
|
||||||
|
#ifdef CONFIG_MPFS_PHYINIT
|
||||||
|
/* Perform any necessary, board-specific PHY initialization */
|
||||||
|
|
||||||
|
ret = mpfs_phy_boardinitialize(priv->intf);
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
nerr("ERROR: Failed to initialize the PHY: %d\n", ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ETH_HAS_MDIO_PHY
|
#ifdef ETH_HAS_MDIO_PHY
|
||||||
|
|
||||||
/* Configure PHY clocking */
|
/* Configure PHY clocking */
|
||||||
@@ -3518,31 +3529,11 @@ static int mpfs_ethconfig(struct mpfs_ethmac_s *priv)
|
|||||||
|
|
||||||
ninfo("Entry\n");
|
ninfo("Entry\n");
|
||||||
|
|
||||||
#ifdef CONFIG_MPFS_PHYINIT
|
|
||||||
/* Perform any necessary, board-specific PHY initialization */
|
|
||||||
|
|
||||||
ret = mpfs_phy_boardinitialize(priv->intf);
|
|
||||||
if (ret < 0)
|
|
||||||
{
|
|
||||||
nerr("ERROR: Failed to initialize the PHY: %d\n", ret);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Reset the Ethernet block */
|
/* Reset the Ethernet block */
|
||||||
|
|
||||||
ninfo("Reset the Ethernet block\n");
|
ninfo("Reset the Ethernet block\n");
|
||||||
mpfs_ethreset(priv);
|
mpfs_ethreset(priv);
|
||||||
|
|
||||||
/* Initialize the PHY */
|
|
||||||
|
|
||||||
ninfo("Initialize the PHY\n");
|
|
||||||
ret = mpfs_phyinit(priv);
|
|
||||||
if (ret < 0)
|
|
||||||
{
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Initialize the MAC and DMA */
|
/* Initialize the MAC and DMA */
|
||||||
|
|
||||||
ninfo("Initialize the MAC and DMA\n");
|
ninfo("Initialize the MAC and DMA\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user