Message ID | 20200608091508.19838-2-f4bug@amsat.org |
---|---|
State | New |
Headers | show |
Series | [1/2] hw/net/opencores_eth: Use definitions instead of magic values | expand |
diff --git a/hw/net/opencores_eth.c b/hw/net/opencores_eth.c index 2ba0dc8c2f..90d3846bb7 100644 --- a/hw/net/opencores_eth.c +++ b/hw/net/opencores_eth.c @@ -86,8 +86,8 @@ static void mii_reset(Mii *s) s->regs[MII_BMSR] = MII_BMSR_100TX_FD | MII_BMSR_100TX_HD | MII_BMSR_10T_FD | MII_BMSR_10T_HD | MII_BMSR_MFPS | MII_BMSR_AN_COMP | MII_BMSR_AUTONEG; - s->regs[MII_PHYID1] = 0x2000; - s->regs[MII_PHYID2] = 0x5c90; + s->regs[MII_PHYID1] = DP83848_PHYID1; + s->regs[MII_PHYID2] = DP83848_PHYID2; s->regs[MII_ANAR] = MII_ANAR_TXFD | MII_ANAR_TX | MII_ANAR_10FD | MII_ANAR_10 | MII_ANAR_CSMACD; mii_set_link(s, s->link_ok);
Use definitions from "hw/net/mii.h". This also helps when using git-grep. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- hw/net/opencores_eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)