Lines Matching refs:bregs

872 static void happy_meal_tx_reset(struct happy_meal *hp, void __iomem *bregs)  in happy_meal_tx_reset()  argument
879 hme_write32(hp, bregs + BMAC_TXSWRESET, 0); in happy_meal_tx_reset()
880 while ((hme_read32(hp, bregs + BMAC_TXSWRESET) & 1) && --tries) in happy_meal_tx_reset()
892 static void happy_meal_rx_reset(struct happy_meal *hp, void __iomem *bregs) in happy_meal_rx_reset() argument
899 hme_write32(hp, bregs + BMAC_RXSWRESET, 0); in happy_meal_rx_reset()
900 while ((hme_read32(hp, bregs + BMAC_RXSWRESET) & 1) && --tries) in happy_meal_rx_reset()
934 static void happy_meal_get_counters(struct happy_meal *hp, void __iomem *bregs) in happy_meal_get_counters() argument
938 stats->rx_crc_errors += hme_read32(hp, bregs + BMAC_RCRCECTR); in happy_meal_get_counters()
939 hme_write32(hp, bregs + BMAC_RCRCECTR, 0); in happy_meal_get_counters()
941 stats->rx_frame_errors += hme_read32(hp, bregs + BMAC_UNALECTR); in happy_meal_get_counters()
942 hme_write32(hp, bregs + BMAC_UNALECTR, 0); in happy_meal_get_counters()
944 stats->rx_length_errors += hme_read32(hp, bregs + BMAC_GLECTR); in happy_meal_get_counters()
945 hme_write32(hp, bregs + BMAC_GLECTR, 0); in happy_meal_get_counters()
947 stats->tx_aborted_errors += hme_read32(hp, bregs + BMAC_EXCTR); in happy_meal_get_counters()
950 (hme_read32(hp, bregs + BMAC_EXCTR) + in happy_meal_get_counters()
951 hme_read32(hp, bregs + BMAC_LTCTR)); in happy_meal_get_counters()
952 hme_write32(hp, bregs + BMAC_EXCTR, 0); in happy_meal_get_counters()
953 hme_write32(hp, bregs + BMAC_LTCTR, 0); in happy_meal_get_counters()
1426 void __iomem *bregs = hp->bigmacregs; in happy_meal_init() local
1439 happy_meal_get_counters(hp, bregs); in happy_meal_init()
1487 hme_write32(hp, bregs + BMAC_XIFCFG, 0); in happy_meal_init()
1493 hme_write32(hp, bregs + BMAC_XIFCFG, BIGMAC_XCFG_MIIDISAB); in happy_meal_init()
1502 happy_meal_tx_reset(hp, bregs); in happy_meal_init()
1503 happy_meal_rx_reset(hp, bregs); in happy_meal_init()
1507 hme_write32(hp, bregs + BMAC_JSIZE, DEFAULT_JAMSIZE); in happy_meal_init()
1508 hme_write32(hp, bregs + BMAC_IGAP1, DEFAULT_IPG1); in happy_meal_init()
1509 hme_write32(hp, bregs + BMAC_IGAP2, DEFAULT_IPG2); in happy_meal_init()
1515 hme_write32(hp, bregs + BMAC_RSEED, ((e[5] | e[4]<<8)&0x3ff)); in happy_meal_init()
1517 hme_write32(hp, bregs + BMAC_MACADDR2, ((e[4] << 8) | e[5])); in happy_meal_init()
1518 hme_write32(hp, bregs + BMAC_MACADDR1, ((e[2] << 8) | e[3])); in happy_meal_init()
1519 hme_write32(hp, bregs + BMAC_MACADDR0, ((e[0] << 8) | e[1])); in happy_meal_init()
1524 hme_write32(hp, bregs + BMAC_HTABLE0, 0xffff); in happy_meal_init()
1525 hme_write32(hp, bregs + BMAC_HTABLE1, 0xffff); in happy_meal_init()
1526 hme_write32(hp, bregs + BMAC_HTABLE2, 0xffff); in happy_meal_init()
1527 hme_write32(hp, bregs + BMAC_HTABLE3, 0xffff); in happy_meal_init()
1539 hme_write32(hp, bregs + BMAC_HTABLE0, hash_table[0]); in happy_meal_init()
1540 hme_write32(hp, bregs + BMAC_HTABLE1, hash_table[1]); in happy_meal_init()
1541 hme_write32(hp, bregs + BMAC_HTABLE2, hash_table[2]); in happy_meal_init()
1542 hme_write32(hp, bregs + BMAC_HTABLE3, hash_table[3]); in happy_meal_init()
1544 hme_write32(hp, bregs + BMAC_HTABLE3, 0); in happy_meal_init()
1545 hme_write32(hp, bregs + BMAC_HTABLE2, 0); in happy_meal_init()
1546 hme_write32(hp, bregs + BMAC_HTABLE1, 0); in happy_meal_init()
1547 hme_write32(hp, bregs + BMAC_HTABLE0, 0); in happy_meal_init()
1651 hme_read32(hp, bregs + BMAC_RXCFG))); in happy_meal_init()
1655 hme_write32(hp, bregs + BMAC_RXCFG, rxcfg); in happy_meal_init()
1669 hme_write32(hp, bregs + BMAC_TXCFG, regtmp /*| BIGMAC_TXCFG_DGIVEUP*/); in happy_meal_init()
1672 hme_write32(hp, bregs + BMAC_ALIMIT, 16); in happy_meal_init()
1686 hme_read32(hp, bregs + BMAC_XIFCFG))); in happy_meal_init()
1687 hme_write32(hp, bregs + BMAC_XIFCFG, regtmp); in happy_meal_init()
1691 hme_read32(hp, bregs + BMAC_TXCFG), in happy_meal_init()
1692 hme_read32(hp, bregs + BMAC_RXCFG))); in happy_meal_init()
1695 hme_write32(hp, bregs + BMAC_TXMAX, ETH_FRAME_LEN + 8); in happy_meal_init()
1696 hme_write32(hp, bregs + BMAC_RXMAX, ETH_FRAME_LEN + 8); in happy_meal_init()
1698 hme_write32(hp, bregs + BMAC_TXCFG, in happy_meal_init()
1699 hme_read32(hp, bregs + BMAC_TXCFG) | BIGMAC_TXCFG_ENABLE); in happy_meal_init()
1700 hme_write32(hp, bregs + BMAC_RXCFG, in happy_meal_init()
1701 hme_read32(hp, bregs + BMAC_RXCFG) | BIGMAC_RXCFG_ENABLE); in happy_meal_init()
1714 void __iomem *bregs = hp->bigmacregs; in happy_meal_set_initial_advertisement() local
1730 hme_write32(hp, bregs + BMAC_XIFCFG, 0); in happy_meal_set_initial_advertisement()
1733 hme_write32(hp, bregs + BMAC_XIFCFG, BIGMAC_XCFG_MIIDISAB); in happy_meal_set_initial_advertisement()
2404 void __iomem *bregs = hp->bigmacregs; in happy_meal_set_multicast() local
2411 hme_write32(hp, bregs + BMAC_HTABLE0, 0xffff); in happy_meal_set_multicast()
2412 hme_write32(hp, bregs + BMAC_HTABLE1, 0xffff); in happy_meal_set_multicast()
2413 hme_write32(hp, bregs + BMAC_HTABLE2, 0xffff); in happy_meal_set_multicast()
2414 hme_write32(hp, bregs + BMAC_HTABLE3, 0xffff); in happy_meal_set_multicast()
2416 hme_write32(hp, bregs + BMAC_RXCFG, in happy_meal_set_multicast()
2417 hme_read32(hp, bregs + BMAC_RXCFG) | BIGMAC_RXCFG_PMISC); in happy_meal_set_multicast()
2427 hme_write32(hp, bregs + BMAC_HTABLE0, hash_table[0]); in happy_meal_set_multicast()
2428 hme_write32(hp, bregs + BMAC_HTABLE1, hash_table[1]); in happy_meal_set_multicast()
2429 hme_write32(hp, bregs + BMAC_HTABLE2, hash_table[2]); in happy_meal_set_multicast()
2430 hme_write32(hp, bregs + BMAC_HTABLE3, hash_table[3]); in happy_meal_set_multicast()