summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Lojewski <github@meklort.com>2021-02-05 22:11:17 -0700
committerGitHub <noreply@github.com>2021-02-05 22:11:17 -0700
commit7abd7eea6f5eff24f8a08f9ee98752bb41bd9333 (patch)
tree2a266cd7b412949dea631b6ad8aeb12046a61e9c
parent7215643f3756a7f8eb3cfff486408576995cca15 (diff)
downloadbcm5719-ortega-7abd7eea6f5eff24f8a08f9ee98752bb41bd9333.tar.gz
bcm5719-ortega-7abd7eea6f5eff24f8a08f9ee98752bb41bd9333.zip
network: Switch various routines to use MII_reset when resetting the PHY. (#200)
-rw-r--r--libs/NCSI/ncsi.c2
-rw-r--r--libs/Network/ports.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/libs/NCSI/ncsi.c b/libs/NCSI/ncsi.c
index 5750f9d..894ed43 100644
--- a/libs/NCSI/ncsi.c
+++ b/libs/NCSI/ncsi.c
@@ -705,7 +705,7 @@ void resetChannel(unsigned int ch)
uint8_t phy = MII_getPhy(port->device);
bool success;
APE_aquireLock();
- success = MII_writeRegister(port->device, phy, (mii_reg_t)REG_MII_CONTROL, MII_CONTROL_RESET_MASK);
+ success = MII_reset(port->device, phy);
APE_releaseLock();
if (!success)
diff --git a/libs/Network/ports.c b/libs/Network/ports.c
index cf144bc..3aacc8a 100644
--- a/libs/Network/ports.c
+++ b/libs/Network/ports.c
@@ -873,7 +873,7 @@ void Network_InitPort(NetworkPort_t *port, reload_type_t reset_phy)
if ((ALWAYS_RESET == reset_phy) || (AS_NEEDED == reset_phy && !Network_isLinkUp(port)))
{
APE_aquireLock();
- MII_writeRegister(port->device, phy, (mii_reg_t)REG_MII_CONTROL, MII_CONTROL_RESET_MASK);
+ MII_reset(port->device, phy);
APE_releaseLock();
}
@@ -1146,7 +1146,7 @@ void Network_resetLink(NetworkPort_t *port)
{
uint8_t phy = MII_getPhy(port->device);
APE_aquireLock();
- MII_writeRegister(port->device, phy, (mii_reg_t)REG_MII_CONTROL, MII_CONTROL_RESET_MASK);
+ MII_reset(port->device, phy);
APE_releaseLock();
}
OpenPOWER on IntegriCloud