mac_write
mac_write(sc, GMACOMR, 0);
mac_write(sc, GMACBMR, BMR_RST);
mac_write(sc, GMACBMR, _BMR);
mac_write(sc, GMACAFR, 0);
mac_write(sc, GMACOMR, csr &~ (OMR_SR | OMR_ST));
mac_write(sc, GMACMAL0, csr);
mac_write(sc, GMACMAH0, csr);
mac_write(sc, GMACRDLA, _RDLA); /* GMAC rdes store */
mac_write(sc, GMACTDLA, _TDLA); /* GMAC tdes store */
mac_write(sc, GMACFCR, 256 << 16); /* 31:16 pause value */
mac_write(sc, GMACEVCTL, EVC_CR | EVC_ROR);
mac_write(sc, GMACOMR, csr | OMR_SR | OMR_ST);
mac_write(sc, GMACAFR, csr);
mac_write(sc, GMACMAH(i), 0);
mac_write(sc, GMACMAL(i), addr);
mac_write(sc, GMACMAH(i), addr | 1U<<31);
mac_write(sc, GMACMHTH, mchash[1]);
mac_write(sc, GMACMHTL, mchash[0]);
mac_write(sc, GMACAFR, csr);
mac_write(sc, GMACMCR, mcr);
mac_write(sc, GMACFCR, fcr);
mac_write(sc, GMACGAR, miia | GAR_BUSY);
mac_write(sc, GMACGDR, val);
mac_write(sc, GMACGAR, miia | GAR_IOWR | GAR_BUSY);