Lines Matching refs:mtk_r32

181 u32 mtk_r32(struct mtk_eth *eth, unsigned reg)  in mtk_r32()  function
190 val = mtk_r32(eth, reg); in mtk_m32()
202 if (!(mtk_r32(eth, MTK_PHY_IAC) & PHY_IAC_ACCESS)) in mtk_mdio_busy_wait()
299 return mtk_r32(eth, MTK_PHY_IAC) & PHY_IAC_DATA_MASK; in _mtk_mdio_read()
561 mcr_cur = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id)); in mtk_mac_finish()
578 u32 pmsr = mtk_r32(mac->hw, MTK_MAC_MSR(mac->id)); in mtk_mac_pcs_get_state()
610 u32 mcr = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id)); in mtk_mac_link_down()
625 mcr = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id)); in mtk_mac_link_up()
716 val = mtk_r32(eth, eth->soc->reg_map->tx_irq_mask); in mtk_tx_irq_disable()
727 val = mtk_r32(eth, eth->soc->reg_map->tx_irq_mask); in mtk_tx_irq_enable()
738 val = mtk_r32(eth, eth->soc->reg_map->pdma.irq_mask); in mtk_rx_irq_disable()
749 val = mtk_r32(eth, eth->soc->reg_map->pdma.irq_mask); in mtk_rx_irq_enable()
794 hw_stats->tx_packets += mtk_r32(mac->hw, MT7628_SDM_TPCNT); in mtk_stats_update_mac()
795 hw_stats->tx_bytes += mtk_r32(mac->hw, MT7628_SDM_TBCNT); in mtk_stats_update_mac()
796 hw_stats->rx_packets += mtk_r32(mac->hw, MT7628_SDM_RPCNT); in mtk_stats_update_mac()
797 hw_stats->rx_bytes += mtk_r32(mac->hw, MT7628_SDM_RBCNT); in mtk_stats_update_mac()
799 mtk_r32(mac->hw, MT7628_SDM_CS_ERR); in mtk_stats_update_mac()
805 hw_stats->rx_bytes += mtk_r32(mac->hw, reg_map->gdm1_cnt + offs); in mtk_stats_update_mac()
806 stats = mtk_r32(mac->hw, reg_map->gdm1_cnt + 0x4 + offs); in mtk_stats_update_mac()
810 mtk_r32(mac->hw, reg_map->gdm1_cnt + 0x8 + offs); in mtk_stats_update_mac()
812 mtk_r32(mac->hw, reg_map->gdm1_cnt + 0x10 + offs); in mtk_stats_update_mac()
814 mtk_r32(mac->hw, reg_map->gdm1_cnt + 0x14 + offs); in mtk_stats_update_mac()
816 mtk_r32(mac->hw, reg_map->gdm1_cnt + 0x18 + offs); in mtk_stats_update_mac()
818 mtk_r32(mac->hw, reg_map->gdm1_cnt + 0x1c + offs); in mtk_stats_update_mac()
820 mtk_r32(mac->hw, reg_map->gdm1_cnt + 0x20 + offs); in mtk_stats_update_mac()
822 mtk_r32(mac->hw, reg_map->gdm1_cnt + 0x24 + offs); in mtk_stats_update_mac()
824 mtk_r32(mac->hw, reg_map->gdm1_cnt + 0x28 + offs); in mtk_stats_update_mac()
826 mtk_r32(mac->hw, reg_map->gdm1_cnt + 0x2c + offs); in mtk_stats_update_mac()
828 mtk_r32(mac->hw, reg_map->gdm1_cnt + 0x30 + offs); in mtk_stats_update_mac()
829 stats = mtk_r32(mac->hw, reg_map->gdm1_cnt + 0x34 + offs); in mtk_stats_update_mac()
833 mtk_r32(mac->hw, reg_map->gdm1_cnt + 0x38 + offs); in mtk_stats_update_mac()
2000 dma = mtk_r32(eth, reg_map->qdma.drx_ptr); in mtk_poll_tx_qdma()
2055 dma = mtk_r32(eth, MT7628_TX_DTX_IDX0); in mtk_poll_tx_pdma()
2125 u32 status2 = mtk_r32(eth, MTK_INT_STATUS2); in mtk_handle_status_irq()
2148 mtk_r32(eth, reg_map->tx_irq_status), in mtk_napi_tx()
2149 mtk_r32(eth, reg_map->tx_irq_mask)); in mtk_napi_tx()
2155 if (mtk_r32(eth, reg_map->tx_irq_status) & MTK_TX_DONE_INT) in mtk_napi_tx()
2183 mtk_r32(eth, reg_map->pdma.irq_status), in mtk_napi_rx()
2184 mtk_r32(eth, reg_map->pdma.irq_mask)); in mtk_napi_rx()
2190 } while (mtk_r32(eth, reg_map->pdma.irq_status) & in mtk_napi_rx()
2546 val = mtk_r32(eth, MTK_PDMA_LRO_CTRL_DW0); in mtk_hwlro_rx_uninit()
2566 reg_val = mtk_r32(eth, MTK_LRO_CTRL_DW2_CFG(idx)); in mtk_hwlro_val_ipaddr()
2581 reg_val = mtk_r32(eth, MTK_LRO_CTRL_DW2_CFG(idx)); in mtk_hwlro_inval_ipaddr()
2886 if (mtk_r32(eth, reg_map->pdma.irq_mask) & in mtk_handle_irq()
2888 if (mtk_r32(eth, reg_map->pdma.irq_status) & in mtk_handle_irq()
2892 if (mtk_r32(eth, reg_map->tx_irq_mask) & MTK_TX_DONE_INT) { in mtk_handle_irq()
2893 if (mtk_r32(eth, reg_map->tx_irq_status) & MTK_TX_DONE_INT) in mtk_handle_irq()
2927 val = mtk_r32(eth, reg_map->qdma.glo_cfg); in mtk_start_dma()
2961 u32 val = mtk_r32(eth, MTK_GDMA_FWD_CFG(i)); in mtk_gdm_config()
3034 val = mtk_r32(eth, glo_cfg); in mtk_stop_dma()
3041 val = mtk_r32(eth, glo_cfg); in mtk_stop_dma()
3182 val = mtk_r32(eth, reg_map->pdma.delay_irq); in mtk_dim_rx()
3213 val = mtk_r32(eth, reg_map->pdma.delay_irq); in mtk_dim_tx()
3287 val = mtk_r32(eth, MTK_FE_GLO_MISC); in mtk_hw_init()
3312 val = mtk_r32(eth, MTK_CDMQ_IG_CTRL); in mtk_hw_init()
3432 mcr_cur = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id)); in mtk_change_mtu()