Lines Matching refs:mac_dev
100 csrwr32((mii_id & 0x1f), priv->mac_dev, in altera_tse_mdio_read()
104 return csrrd32(priv->mac_dev, in altera_tse_mdio_read()
115 csrwr32((mii_id & 0x1f), priv->mac_dev, in altera_tse_mdio_write()
119 csrwr32(value, priv->mac_dev, tse_csroffs(mdio_phy1) + regnum * 4); in altera_tse_mdio_write()
652 csrwr32(msb, priv->mac_dev, tse_csroffs(mac_addr_0)); in tse_update_mac_addr()
653 csrwr32(lsb, priv->mac_dev, tse_csroffs(mac_addr_1)); in tse_update_mac_addr()
667 dat = csrrd32(priv->mac_dev, tse_csroffs(command_config)); in reset_mac()
670 csrwr32(dat, priv->mac_dev, tse_csroffs(command_config)); in reset_mac()
674 if (tse_bit_is_clear(priv->mac_dev, tse_csroffs(command_config), in reset_mac()
681 dat = csrrd32(priv->mac_dev, tse_csroffs(command_config)); in reset_mac()
683 csrwr32(dat, priv->mac_dev, tse_csroffs(command_config)); in reset_mac()
698 priv->mac_dev, tse_csroffs(rx_section_empty)); in init_mac()
700 csrwr32(ALTERA_TSE_RX_SECTION_FULL, priv->mac_dev, in init_mac()
703 csrwr32(ALTERA_TSE_RX_ALMOST_EMPTY, priv->mac_dev, in init_mac()
706 csrwr32(ALTERA_TSE_RX_ALMOST_FULL, priv->mac_dev, in init_mac()
711 priv->mac_dev, tse_csroffs(tx_section_empty)); in init_mac()
713 csrwr32(ALTERA_TSE_TX_SECTION_FULL, priv->mac_dev, in init_mac()
716 csrwr32(ALTERA_TSE_TX_ALMOST_EMPTY, priv->mac_dev, in init_mac()
719 csrwr32(ALTERA_TSE_TX_ALMOST_FULL, priv->mac_dev, in init_mac()
727 csrwr32(frm_length, priv->mac_dev, tse_csroffs(frm_length)); in init_mac()
729 csrwr32(ALTERA_TSE_TX_IPG_LENGTH, priv->mac_dev, in init_mac()
735 tse_set_bit(priv->mac_dev, tse_csroffs(rx_cmd_stat), in init_mac()
738 tse_clear_bit(priv->mac_dev, tse_csroffs(tx_cmd_stat), in init_mac()
743 cmd = csrrd32(priv->mac_dev, tse_csroffs(command_config)); in init_mac()
758 csrwr32(cmd, priv->mac_dev, tse_csroffs(command_config)); in init_mac()
760 csrwr32(ALTERA_TSE_PAUSE_QUANTA, priv->mac_dev, in init_mac()
774 u32 value = csrrd32(priv->mac_dev, tse_csroffs(command_config)); in tse_set_mac()
781 csrwr32(value, priv->mac_dev, tse_csroffs(command_config)); in tse_set_mac()
807 csrwr32(0, priv->mac_dev, tse_csroffs(hash_table) + i * 4); in altera_tse_set_mcfilter()
823 csrwr32(1, priv->mac_dev, tse_csroffs(hash_table) + hash * 4); in altera_tse_set_mcfilter()
835 csrwr32(1, priv->mac_dev, tse_csroffs(hash_table) + i * 4); in altera_tse_set_mcfilterall()
847 tse_set_bit(priv->mac_dev, tse_csroffs(command_config), in tse_set_rx_mode_hashfilter()
868 tse_set_bit(priv->mac_dev, tse_csroffs(command_config), in tse_set_rx_mode()
871 tse_clear_bit(priv->mac_dev, tse_csroffs(command_config), in tse_set_rx_mode()
1067 ctrl = csrrd32(priv->mac_dev, tse_csroffs(command_config)); in alt_tse_mac_link_up()
1079 csrwr32(ctrl, priv->mac_dev, tse_csroffs(command_config)); in alt_tse_mac_link_up()
1241 (void __iomem **)&priv->mac_dev); in altera_tse_probe()
1270 priv->pcs_base = priv->mac_dev + tse_csroffs(mdio_phy0); in altera_tse_probe()
1406 priv->revision = ioread32(&priv->mac_dev->megacore_revision); in altera_tse_probe()