MCPcopy Create free account
hub / github.com/F-Stack/f-stack / awg_enable_mac

Function awg_enable_mac

freebsd/arm/allwinner/if_awg.c:474–493  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472}
473
474static void
475awg_enable_mac(struct awg_softc *sc, bool enable)
476{
477 uint32_t tx, rx;
478
479 AWG_ASSERT_LOCKED(sc);
480
481 tx = RD4(sc, EMAC_TX_CTL_0);
482 rx = RD4(sc, EMAC_RX_CTL_0);
483 if (enable) {
484 tx |= TX_EN;
485 rx |= RX_EN | CHECK_CRC;
486 } else {
487 tx &= ~TX_EN;
488 rx &= ~(RX_EN | CHECK_CRC);
489 }
490
491 WR4(sc, EMAC_TX_CTL_0, tx);
492 WR4(sc, EMAC_RX_CTL_0, rx);
493}
494
495static void
496awg_get_eaddr(device_t dev, uint8_t *eaddr)

Callers 2

awg_init_lockedFunction · 0.85
awg_stopFunction · 0.85

Calls 2

RD4Function · 0.50
WR4Function · 0.50

Tested by

no test coverage detected