Commit b86e4e6e authored by Vincent van Beveren's avatar Vincent van Beveren

wrong register 😳

parent f89de741
Pipeline #3301 failed with stages
...@@ -234,18 +234,16 @@ void ep_set_autonegotiation(bool autoneg) ...@@ -234,18 +234,16 @@ void ep_set_autonegotiation(bool autoneg)
// this only works for the non-broadcast version // this only works for the non-broadcast version
#ifndef BROADCAST #ifndef BROADCAST
uint32_t val; uint32_t val;
val = pcs_read(MDIO_REG_ECTRL); val = pcs_read(MDIO_REG_MCR);
if(autoneg) if(autoneg)
{ {
puts("Enabeling auto-negotiation");
val |= MDIO_MCR_ANENABLE | MDIO_MCR_ANRESTART; val |= MDIO_MCR_ANENABLE | MDIO_MCR_ANRESTART;
} }
else else
{ {
puts("Disabling auto-negotiation");
val &= ~(MDIO_MCR_ANENABLE | MDIO_MCR_ANRESTART); val &= ~(MDIO_MCR_ANENABLE | MDIO_MCR_ANRESTART);
} }
pcs_write(MDIO_REG_ECTRL, val); pcs_write(MDIO_REG_MCR, val);
autoneg_enabled = autoneg; autoneg_enabled = autoneg;
#endif #endif
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment