Lines Matching refs:bregs

901 static void happy_meal_tx_reset(struct happy_meal *hp, void __iomem *bregs)  in happy_meal_tx_reset()  argument
908 hme_write32(hp, bregs + BMAC_TXSWRESET, 0); in happy_meal_tx_reset()
909 while ((hme_read32(hp, bregs + BMAC_TXSWRESET) & 1) && --tries) in happy_meal_tx_reset()
921 static void happy_meal_rx_reset(struct happy_meal *hp, void __iomem *bregs) in happy_meal_rx_reset() argument
928 hme_write32(hp, bregs + BMAC_RXSWRESET, 0); in happy_meal_rx_reset()
929 while ((hme_read32(hp, bregs + BMAC_RXSWRESET) & 1) && --tries) in happy_meal_rx_reset()
963 static void happy_meal_get_counters(struct happy_meal *hp, void __iomem *bregs) in happy_meal_get_counters() argument
967 stats->rx_crc_errors += hme_read32(hp, bregs + BMAC_RCRCECTR); in happy_meal_get_counters()
968 hme_write32(hp, bregs + BMAC_RCRCECTR, 0); in happy_meal_get_counters()
970 stats->rx_frame_errors += hme_read32(hp, bregs + BMAC_UNALECTR); in happy_meal_get_counters()
971 hme_write32(hp, bregs + BMAC_UNALECTR, 0); in happy_meal_get_counters()
973 stats->rx_length_errors += hme_read32(hp, bregs + BMAC_GLECTR); in happy_meal_get_counters()
974 hme_write32(hp, bregs + BMAC_GLECTR, 0); in happy_meal_get_counters()
976 stats->tx_aborted_errors += hme_read32(hp, bregs + BMAC_EXCTR); in happy_meal_get_counters()
979 (hme_read32(hp, bregs + BMAC_EXCTR) + in happy_meal_get_counters()
980 hme_read32(hp, bregs + BMAC_LTCTR)); in happy_meal_get_counters()
981 hme_write32(hp, bregs + BMAC_EXCTR, 0); in happy_meal_get_counters()
982 hme_write32(hp, bregs + BMAC_LTCTR, 0); in happy_meal_get_counters()
1262 void __iomem *bregs = hp->bigmacregs; in happy_meal_init() local
1274 happy_meal_get_counters(hp, bregs); in happy_meal_init()
1312 hme_write32(hp, bregs + BMAC_XIFCFG, 0); in happy_meal_init()
1318 hme_write32(hp, bregs + BMAC_XIFCFG, BIGMAC_XCFG_MIIDISAB); in happy_meal_init()
1327 happy_meal_tx_reset(hp, bregs); in happy_meal_init()
1328 happy_meal_rx_reset(hp, bregs); in happy_meal_init()
1331 hme_write32(hp, bregs + BMAC_JSIZE, DEFAULT_JAMSIZE); in happy_meal_init()
1332 hme_write32(hp, bregs + BMAC_IGAP1, DEFAULT_IPG1); in happy_meal_init()
1333 hme_write32(hp, bregs + BMAC_IGAP2, DEFAULT_IPG2); in happy_meal_init()
1338 hme_write32(hp, bregs + BMAC_RSEED, ((e[5] | e[4]<<8)&0x3ff)); in happy_meal_init()
1340 hme_write32(hp, bregs + BMAC_MACADDR2, ((e[4] << 8) | e[5])); in happy_meal_init()
1341 hme_write32(hp, bregs + BMAC_MACADDR1, ((e[2] << 8) | e[3])); in happy_meal_init()
1342 hme_write32(hp, bregs + BMAC_MACADDR0, ((e[0] << 8) | e[1])); in happy_meal_init()
1346 hme_write32(hp, bregs + BMAC_HTABLE0, 0xffff); in happy_meal_init()
1347 hme_write32(hp, bregs + BMAC_HTABLE1, 0xffff); in happy_meal_init()
1348 hme_write32(hp, bregs + BMAC_HTABLE2, 0xffff); in happy_meal_init()
1349 hme_write32(hp, bregs + BMAC_HTABLE3, 0xffff); in happy_meal_init()
1361 hme_write32(hp, bregs + BMAC_HTABLE0, hash_table[0]); in happy_meal_init()
1362 hme_write32(hp, bregs + BMAC_HTABLE1, hash_table[1]); in happy_meal_init()
1363 hme_write32(hp, bregs + BMAC_HTABLE2, hash_table[2]); in happy_meal_init()
1364 hme_write32(hp, bregs + BMAC_HTABLE3, hash_table[3]); in happy_meal_init()
1366 hme_write32(hp, bregs + BMAC_HTABLE3, 0); in happy_meal_init()
1367 hme_write32(hp, bregs + BMAC_HTABLE2, 0); in happy_meal_init()
1368 hme_write32(hp, bregs + BMAC_HTABLE1, 0); in happy_meal_init()
1369 hme_write32(hp, bregs + BMAC_HTABLE0, 0); in happy_meal_init()
1473 hme_read32(hp, bregs + BMAC_RXCFG)); in happy_meal_init()
1477 hme_write32(hp, bregs + BMAC_RXCFG, rxcfg); in happy_meal_init()
1491 hme_write32(hp, bregs + BMAC_TXCFG, regtmp /*| BIGMAC_TXCFG_DGIVEUP*/); in happy_meal_init()
1494 hme_write32(hp, bregs + BMAC_ALIMIT, 16); in happy_meal_init()
1507 HMD("XIF config old[%08x]\n", hme_read32(hp, bregs + BMAC_XIFCFG)); in happy_meal_init()
1508 hme_write32(hp, bregs + BMAC_XIFCFG, regtmp); in happy_meal_init()
1512 hme_read32(hp, bregs + BMAC_TXCFG), in happy_meal_init()
1513 hme_read32(hp, bregs + BMAC_RXCFG)); in happy_meal_init()
1516 hme_write32(hp, bregs + BMAC_TXMAX, ETH_FRAME_LEN + 8); in happy_meal_init()
1517 hme_write32(hp, bregs + BMAC_RXMAX, ETH_FRAME_LEN + 8); in happy_meal_init()
1519 hme_write32(hp, bregs + BMAC_TXCFG, in happy_meal_init()
1520 hme_read32(hp, bregs + BMAC_TXCFG) | BIGMAC_TXCFG_ENABLE); in happy_meal_init()
1521 hme_write32(hp, bregs + BMAC_RXCFG, in happy_meal_init()
1522 hme_read32(hp, bregs + BMAC_RXCFG) | BIGMAC_RXCFG_ENABLE); in happy_meal_init()
1535 void __iomem *bregs = hp->bigmacregs; in happy_meal_set_initial_advertisement() local
1550 hme_write32(hp, bregs + BMAC_XIFCFG, 0); in happy_meal_set_initial_advertisement()
1553 hme_write32(hp, bregs + BMAC_XIFCFG, BIGMAC_XCFG_MIIDISAB); in happy_meal_set_initial_advertisement()
2088 void __iomem *bregs = hp->bigmacregs; in happy_meal_set_multicast() local
2095 hme_write32(hp, bregs + BMAC_HTABLE0, 0xffff); in happy_meal_set_multicast()
2096 hme_write32(hp, bregs + BMAC_HTABLE1, 0xffff); in happy_meal_set_multicast()
2097 hme_write32(hp, bregs + BMAC_HTABLE2, 0xffff); in happy_meal_set_multicast()
2098 hme_write32(hp, bregs + BMAC_HTABLE3, 0xffff); in happy_meal_set_multicast()
2100 hme_write32(hp, bregs + BMAC_RXCFG, in happy_meal_set_multicast()
2101 hme_read32(hp, bregs + BMAC_RXCFG) | BIGMAC_RXCFG_PMISC); in happy_meal_set_multicast()
2111 hme_write32(hp, bregs + BMAC_HTABLE0, hash_table[0]); in happy_meal_set_multicast()
2112 hme_write32(hp, bregs + BMAC_HTABLE1, hash_table[1]); in happy_meal_set_multicast()
2113 hme_write32(hp, bregs + BMAC_HTABLE2, hash_table[2]); in happy_meal_set_multicast()
2114 hme_write32(hp, bregs + BMAC_HTABLE3, hash_table[3]); in happy_meal_set_multicast()