Lines Matching refs:gmacdev

46 s32 synopGMAC_set_mdc_clk_div(synopGMACdevice *gmacdev,u32 clk_div_val)  in synopGMAC_set_mdc_clk_div()  argument
49 …orig_data = synopGMACReadReg((u32 *)gmacdev->MacBase,GmacGmiiAddr); //set the mdc clock to the use… in synopGMAC_set_mdc_clk_div()
52 synopGMACWriteReg((u32 *)gmacdev->MacBase, GmacGmiiAddr ,orig_data); in synopGMAC_set_mdc_clk_div()
63 u32 synopGMAC_get_mdc_clk_div(synopGMACdevice *gmacdev) in synopGMAC_get_mdc_clk_div() argument
66 data = synopGMACReadReg((u32 *)gmacdev->MacBase,GmacGmiiAddr); in synopGMAC_get_mdc_clk_div()
151 s32 synopGMAC_phy_loopback(synopGMACdevice *gmacdev, bool loopback) in synopGMAC_phy_loopback() argument
156 …status = synopGMAC_write_phy_reg((u32 *)gmacdev->MacBase, gmacdev->PhyBase, PHY_CONTROL_REG, Mii_L… in synopGMAC_phy_loopback()
158 …status = synopGMAC_write_phy_reg((u32 *)gmacdev->MacBase, gmacdev->PhyBase, PHY_CONTROL_REG, Mii_N… in synopGMAC_phy_loopback()
171 s32 synopGMAC_read_version (synopGMACdevice * gmacdev) in synopGMAC_read_version() argument
175 data = synopGMACReadReg((u32 *)gmacdev->MacBase, GmacVersion ); in synopGMAC_read_version()
176 gmacdev->Version = data; in synopGMAC_read_version()
177 TR("The data read from %08x is %08x\n",(gmacdev->MacBase+GmacVersion),data); in synopGMAC_read_version()
189 s32 synopGMAC_reset (synopGMACdevice * gmacdev ) in synopGMAC_reset() argument
192 synopGMACWriteReg((u32 *)gmacdev->DmaBase, DmaBusMode ,DmaResetOn); in synopGMAC_reset()
196 data = synopGMACReadReg((u32 *)gmacdev->DmaBase, DmaBusMode); in synopGMAC_reset()
204 s32 synopGMAC_reset_nocheck (synopGMACdevice * gmacdev ) in synopGMAC_reset_nocheck() argument
206 synopGMACWriteReg((u32 *)gmacdev->DmaBase, DmaBusMode ,DmaResetOn); in synopGMAC_reset_nocheck()
223 s32 synopGMAC_dma_bus_mode_init(synopGMACdevice * gmacdev, u32 init_value ) in synopGMAC_dma_bus_mode_init() argument
225 synopGMACWriteReg((u32 *)gmacdev->DmaBase, DmaBusMode ,init_value); in synopGMAC_dma_bus_mode_init()
239 s32 synopGMAC_dma_control_init(synopGMACdevice * gmacdev, u32 init_value) in synopGMAC_dma_control_init() argument
241 synopGMACWriteReg((u32 *)gmacdev->DmaBase, DmaControl, init_value); in synopGMAC_dma_control_init()
255 void synopGMAC_wd_enable(synopGMACdevice * gmacdev) in synopGMAC_wd_enable() argument
257 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacConfig, GmacWatchdog); in synopGMAC_wd_enable()
267 void synopGMAC_wd_disable(synopGMACdevice * gmacdev) in synopGMAC_wd_disable() argument
269 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacConfig, GmacWatchdog); in synopGMAC_wd_disable()
279 void synopGMAC_jab_enable(synopGMACdevice * gmacdev) in synopGMAC_jab_enable() argument
281 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacConfig, GmacJabber); in synopGMAC_jab_enable()
291 void synopGMAC_jab_disable(synopGMACdevice * gmacdev) in synopGMAC_jab_disable() argument
293 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacConfig, GmacJabber); in synopGMAC_jab_disable()
304 void synopGMAC_frame_burst_enable(synopGMACdevice * gmacdev) in synopGMAC_frame_burst_enable() argument
306 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacConfig, GmacFrameBurst); in synopGMAC_frame_burst_enable()
315 void synopGMAC_frame_burst_disable(synopGMACdevice * gmacdev) in synopGMAC_frame_burst_disable() argument
317 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacConfig, GmacFrameBurst); in synopGMAC_frame_burst_disable()
328 void synopGMAC_jumbo_frame_enable(synopGMACdevice * gmacdev) in synopGMAC_jumbo_frame_enable() argument
330 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacConfig, GmacJumboFrame); in synopGMAC_jumbo_frame_enable()
340 void synopGMAC_jumbo_frame_disable(synopGMACdevice * gmacdev) in synopGMAC_jumbo_frame_disable() argument
342 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacConfig, GmacJumboFrame); in synopGMAC_jumbo_frame_disable()
354 void synopGMAC_disable_crs(synopGMACdevice * gmacdev) in synopGMAC_disable_crs() argument
356 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacConfig, GmacDisableCrs); in synopGMAC_disable_crs()
368 void synopGMAC_select_gmii(synopGMACdevice * gmacdev) in synopGMAC_select_gmii() argument
370 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacConfig, GmacMiiGmii); in synopGMAC_select_gmii()
379 void synopGMAC_select_mii(synopGMACdevice * gmacdev) in synopGMAC_select_mii() argument
381 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacConfig, GmacMiiGmii); in synopGMAC_select_mii()
391 void synopGMAC_rx_own_enable(synopGMACdevice * gmacdev) in synopGMAC_rx_own_enable() argument
393 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacConfig, GmacRxOwn); in synopGMAC_rx_own_enable()
402 void synopGMAC_rx_own_disable(synopGMACdevice * gmacdev) in synopGMAC_rx_own_disable() argument
404 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacConfig, GmacRxOwn); in synopGMAC_rx_own_disable()
416 void synopGMAC_loopback_on(synopGMACdevice * gmacdev) in synopGMAC_loopback_on() argument
418 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacConfig, GmacLoopback); in synopGMAC_loopback_on()
426 void synopGMAC_loopback_off(synopGMACdevice * gmacdev) in synopGMAC_loopback_off() argument
428 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacConfig, GmacLoopback); in synopGMAC_loopback_off()
437 void synopGMAC_set_full_duplex(synopGMACdevice * gmacdev) in synopGMAC_set_full_duplex() argument
439 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacConfig, GmacDuplex); in synopGMAC_set_full_duplex()
447 void synopGMAC_set_half_duplex(synopGMACdevice * gmacdev) in synopGMAC_set_half_duplex() argument
449 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacConfig, GmacDuplex); in synopGMAC_set_half_duplex()
461 void synopGMAC_retry_enable(synopGMACdevice * gmacdev) in synopGMAC_retry_enable() argument
463 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacConfig, GmacRetry); in synopGMAC_retry_enable()
473 void synopGMAC_retry_disable(synopGMACdevice * gmacdev) in synopGMAC_retry_disable() argument
475 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacConfig, GmacRetry); in synopGMAC_retry_disable()
487 void synopGMAC_pad_crc_strip_enable(synopGMACdevice * gmacdev) in synopGMAC_pad_crc_strip_enable() argument
489 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacConfig, GmacPadCrcStrip); in synopGMAC_pad_crc_strip_enable()
498 void synopGMAC_pad_crc_strip_disable(synopGMACdevice * gmacdev) in synopGMAC_pad_crc_strip_disable() argument
500 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacConfig, GmacPadCrcStrip); in synopGMAC_pad_crc_strip_disable()
509 void synopGMAC_back_off_limit(synopGMACdevice * gmacdev, u32 value) in synopGMAC_back_off_limit() argument
512 data = synopGMACReadReg((u32 *)gmacdev->MacBase, GmacConfig); in synopGMAC_back_off_limit()
515 synopGMACWriteReg((u32 *)gmacdev->MacBase, GmacConfig,data); in synopGMAC_back_off_limit()
530 void synopGMAC_deferral_check_enable(synopGMACdevice * gmacdev) in synopGMAC_deferral_check_enable() argument
532 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacConfig, GmacDeferralCheck); in synopGMAC_deferral_check_enable()
541 void synopGMAC_deferral_check_disable(synopGMACdevice * gmacdev) in synopGMAC_deferral_check_disable() argument
543 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacConfig, GmacDeferralCheck); in synopGMAC_deferral_check_disable()
551 void synopGMAC_rx_enable(synopGMACdevice * gmacdev) in synopGMAC_rx_enable() argument
553 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacConfig, GmacRx); in synopGMAC_rx_enable()
562 void synopGMAC_rx_disable(synopGMACdevice * gmacdev) in synopGMAC_rx_disable() argument
564 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacConfig, GmacRx); in synopGMAC_rx_disable()
572 void synopGMAC_tx_enable(synopGMACdevice * gmacdev) in synopGMAC_tx_enable() argument
574 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacConfig, GmacTx); in synopGMAC_tx_enable()
583 void synopGMAC_tx_disable(synopGMACdevice * gmacdev) in synopGMAC_tx_disable() argument
585 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacConfig, GmacTx); in synopGMAC_tx_disable()
599 void synopGMAC_frame_filter_enable(synopGMACdevice * gmacdev) in synopGMAC_frame_filter_enable() argument
601 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacFrameFilter, GmacFilter); in synopGMAC_frame_filter_enable()
611 void synopGMAC_frame_filter_disable(synopGMACdevice * gmacdev) in synopGMAC_frame_filter_disable() argument
613 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacFrameFilter, GmacFilter); in synopGMAC_frame_filter_disable()
624 void synopGMAC_write_hash_table_high(synopGMACdevice * gmacdev, u32 data) in synopGMAC_write_hash_table_high() argument
626 synopGMACWriteReg((u32 *)gmacdev->MacBase,GmacHashHigh,data); in synopGMAC_write_hash_table_high()
637 void synopGMAC_write_hash_table_low(synopGMACdevice * gmacdev, u32 data) in synopGMAC_write_hash_table_low() argument
639 synopGMACWriteReg((u32 *)gmacdev->MacBase,GmacHashLow,data); in synopGMAC_write_hash_table_low()
650 void synopGMAC_hash_perfect_filter_enable(synopGMACdevice * gmacdev) in synopGMAC_hash_perfect_filter_enable() argument
652 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacFrameFilter, GmacHashPerfectFilter); in synopGMAC_hash_perfect_filter_enable()
663 void synopGMAC_Hash_filter_only_enable(synopGMACdevice * gmacdev) in synopGMAC_Hash_filter_only_enable() argument
665 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacFrameFilter, GmacHashPerfectFilter); in synopGMAC_Hash_filter_only_enable()
677 void synopGMAC_src_addr_filter_enable(synopGMACdevice * gmacdev) in synopGMAC_src_addr_filter_enable() argument
679 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacFrameFilter, GmacSrcAddrFilter); in synopGMAC_src_addr_filter_enable()
688 void synopGMAC_src_addr_filter_disable(synopGMACdevice * gmacdev) in synopGMAC_src_addr_filter_disable() argument
690 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacFrameFilter, GmacSrcAddrFilter); in synopGMAC_src_addr_filter_disable()
698 void synopGMAC_dst_addr_filter_inverse(synopGMACdevice * gmacdev) in synopGMAC_dst_addr_filter_inverse() argument
700 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacFrameFilter, GmacDestAddrFilterNor); in synopGMAC_dst_addr_filter_inverse()
708 void synopGMAC_dst_addr_filter_normal(synopGMACdevice * gmacdev) in synopGMAC_dst_addr_filter_normal() argument
710 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacFrameFilter, GmacDestAddrFilterNor); in synopGMAC_dst_addr_filter_normal()
721 void synopGMAC_set_pass_control(synopGMACdevice * gmacdev,u32 passcontrol) in synopGMAC_set_pass_control() argument
724 data = synopGMACReadReg((u32 *)gmacdev->MacBase, GmacFrameFilter); in synopGMAC_set_pass_control()
727 synopGMACWriteReg((u32 *)gmacdev->MacBase,GmacFrameFilter,data); in synopGMAC_set_pass_control()
737 void synopGMAC_broadcast_enable(synopGMACdevice * gmacdev) in synopGMAC_broadcast_enable() argument
739 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacFrameFilter, GmacBroadcast); in synopGMAC_broadcast_enable()
748 void synopGMAC_broadcast_disable(synopGMACdevice * gmacdev) in synopGMAC_broadcast_disable() argument
750 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacFrameFilter, GmacBroadcast); in synopGMAC_broadcast_disable()
760 void synopGMAC_multicast_enable(synopGMACdevice * gmacdev) in synopGMAC_multicast_enable() argument
762 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacFrameFilter, GmacMulticastFilter); in synopGMAC_multicast_enable()
771 void synopGMAC_multicast_disable(synopGMACdevice * gmacdev) in synopGMAC_multicast_disable() argument
773 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacFrameFilter, GmacMulticastFilter); in synopGMAC_multicast_disable()
783 void synopGMAC_multicast_hash_filter_enable(synopGMACdevice * gmacdev) in synopGMAC_multicast_hash_filter_enable() argument
785 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacFrameFilter, GmacMcastHashFilter); in synopGMAC_multicast_hash_filter_enable()
795 void synopGMAC_multicast_hash_filter_disable(synopGMACdevice * gmacdev) in synopGMAC_multicast_hash_filter_disable() argument
797 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacFrameFilter, GmacMcastHashFilter); in synopGMAC_multicast_hash_filter_disable()
808 void synopGMAC_promisc_enable(synopGMACdevice * gmacdev) in synopGMAC_promisc_enable() argument
810 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacFrameFilter, GmacPromiscuousMode); in synopGMAC_promisc_enable()
819 void synopGMAC_promisc_disable(synopGMACdevice * gmacdev) in synopGMAC_promisc_disable() argument
821 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacFrameFilter, GmacPromiscuousMode); in synopGMAC_promisc_disable()
832 void synopGMAC_unicast_hash_filter_enable(synopGMACdevice * gmacdev) in synopGMAC_unicast_hash_filter_enable() argument
834 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacFrameFilter, GmacUcastHashFilter); in synopGMAC_unicast_hash_filter_enable()
844 void synopGMAC_unicast_hash_filter_disable(synopGMACdevice * gmacdev) in synopGMAC_unicast_hash_filter_disable() argument
846 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacFrameFilter, GmacUcastHashFilter); in synopGMAC_unicast_hash_filter_disable()
859 void synopGMAC_unicast_pause_frame_detect_enable(synopGMACdevice * gmacdev) in synopGMAC_unicast_pause_frame_detect_enable() argument
861 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacFlowControl, GmacUnicastPauseFrame); in synopGMAC_unicast_pause_frame_detect_enable()
870 void synopGMAC_unicast_pause_frame_detect_disable(synopGMACdevice * gmacdev) in synopGMAC_unicast_pause_frame_detect_disable() argument
872 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacFlowControl, GmacUnicastPauseFrame); in synopGMAC_unicast_pause_frame_detect_disable()
881 void synopGMAC_rx_flow_control_enable(synopGMACdevice * gmacdev) in synopGMAC_rx_flow_control_enable() argument
883 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacFlowControl, GmacRxFlowControl); in synopGMAC_rx_flow_control_enable()
892 void synopGMAC_rx_flow_control_disable(synopGMACdevice * gmacdev) in synopGMAC_rx_flow_control_disable() argument
894 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacFlowControl, GmacRxFlowControl); in synopGMAC_rx_flow_control_disable()
905 void synopGMAC_tx_flow_control_enable(synopGMACdevice * gmacdev) in synopGMAC_tx_flow_control_enable() argument
907 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacFlowControl, GmacTxFlowControl); in synopGMAC_tx_flow_control_enable()
919 void synopGMAC_tx_flow_control_disable(synopGMACdevice * gmacdev) in synopGMAC_tx_flow_control_disable() argument
921 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacFlowControl, GmacTxFlowControl); in synopGMAC_tx_flow_control_disable()
933 void synopGMAC_tx_activate_flow_control(synopGMACdevice * gmacdev) in synopGMAC_tx_activate_flow_control() argument
937 if(gmacdev->Speed == FULLDUPLEX) { in synopGMAC_tx_activate_flow_control()
938 … if(!synopGMACCheckBits((u32 *)gmacdev->MacBase, GmacFlowControl, GmacFlowControlBackPressure)) in synopGMAC_tx_activate_flow_control()
939 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacFlowControl, GmacFlowControlBackPressure); in synopGMAC_tx_activate_flow_control()
942 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacFlowControl, GmacFlowControlBackPressure); in synopGMAC_tx_activate_flow_control()
953 void synopGMAC_tx_deactivate_flow_control(synopGMACdevice * gmacdev) in synopGMAC_tx_deactivate_flow_control() argument
956 if(gmacdev->Speed == HALFDUPLEX) { in synopGMAC_tx_deactivate_flow_control()
957 synopGMACSetBits((u32 *)gmacdev->MacBase, GmacFlowControl, GmacFlowControlBackPressure); in synopGMAC_tx_deactivate_flow_control()
969 void synopGMAC_pause_control(synopGMACdevice *gmacdev) in synopGMAC_pause_control() argument
973 omr_reg = synopGMACReadReg((u32 *)gmacdev->DmaBase,DmaControl); in synopGMAC_pause_control()
975 synopGMACWriteReg((u32 *)gmacdev->DmaBase, DmaControl, omr_reg); in synopGMAC_pause_control()
977 mac_flow_control_reg = synopGMACReadReg((u32 *)gmacdev->MacBase,GmacFlowControl); in synopGMAC_pause_control()
979 synopGMACWriteReg((u32 *)gmacdev->MacBase,GmacFlowControl,mac_flow_control_reg); in synopGMAC_pause_control()
992 s32 synopGMAC_mac_init(synopGMACdevice * gmacdev) in synopGMAC_mac_init() argument
996 if(gmacdev->DuplexMode == FULLDUPLEX) { in synopGMAC_mac_init()
997 synopGMAC_wd_enable(gmacdev); in synopGMAC_mac_init()
998 synopGMAC_jab_enable(gmacdev); in synopGMAC_mac_init()
999 synopGMAC_frame_burst_enable(gmacdev); in synopGMAC_mac_init()
1000 synopGMAC_jumbo_frame_disable(gmacdev); in synopGMAC_mac_init()
1001 synopGMAC_rx_own_enable(gmacdev); in synopGMAC_mac_init()
1002 synopGMAC_loopback_off(gmacdev); in synopGMAC_mac_init()
1003 synopGMAC_set_full_duplex(gmacdev); in synopGMAC_mac_init()
1004 synopGMAC_retry_enable(gmacdev); in synopGMAC_mac_init()
1005 synopGMAC_pad_crc_strip_disable(gmacdev); in synopGMAC_mac_init()
1006 synopGMAC_back_off_limit(gmacdev,GmacBackoffLimit0); in synopGMAC_mac_init()
1007 synopGMAC_deferral_check_disable(gmacdev); in synopGMAC_mac_init()
1010 if(gmacdev->Speed == SPEED1000) in synopGMAC_mac_init()
1011 synopGMAC_select_gmii(gmacdev); in synopGMAC_mac_init()
1013 synopGMAC_select_mii(gmacdev); in synopGMAC_mac_init()
1016 synopGMAC_tx_enable(gmacdev); in synopGMAC_mac_init()
1017 synopGMAC_rx_enable(gmacdev); in synopGMAC_mac_init()
1019 synopGMAC_frame_filter_enable(gmacdev); in synopGMAC_mac_init()
1020 synopGMAC_set_pass_control(gmacdev,GmacPassControl0); in synopGMAC_mac_init()
1021 synopGMAC_broadcast_enable(gmacdev); in synopGMAC_mac_init()
1022 synopGMAC_src_addr_filter_disable(gmacdev); in synopGMAC_mac_init()
1023 synopGMAC_multicast_disable(gmacdev); in synopGMAC_mac_init()
1024 synopGMAC_dst_addr_filter_normal(gmacdev); in synopGMAC_mac_init()
1025 synopGMAC_multicast_hash_filter_disable(gmacdev); in synopGMAC_mac_init()
1026 synopGMAC_promisc_disable(gmacdev); in synopGMAC_mac_init()
1027 synopGMAC_unicast_hash_filter_disable(gmacdev); in synopGMAC_mac_init()
1030 synopGMAC_unicast_pause_frame_detect_disable(gmacdev); in synopGMAC_mac_init()
1031 synopGMAC_rx_flow_control_enable(gmacdev); in synopGMAC_mac_init()
1032 synopGMAC_tx_flow_control_enable(gmacdev); in synopGMAC_mac_init()
1035 synopGMAC_wd_enable(gmacdev); in synopGMAC_mac_init()
1036 synopGMAC_jab_enable(gmacdev); in synopGMAC_mac_init()
1037 synopGMAC_frame_burst_enable(gmacdev); in synopGMAC_mac_init()
1038 synopGMAC_jumbo_frame_disable(gmacdev); in synopGMAC_mac_init()
1039 synopGMAC_rx_own_enable(gmacdev); in synopGMAC_mac_init()
1040 synopGMAC_loopback_off(gmacdev); in synopGMAC_mac_init()
1041 synopGMAC_set_half_duplex(gmacdev); in synopGMAC_mac_init()
1042 synopGMAC_retry_enable(gmacdev); in synopGMAC_mac_init()
1043 synopGMAC_pad_crc_strip_disable(gmacdev); in synopGMAC_mac_init()
1044 synopGMAC_back_off_limit(gmacdev,GmacBackoffLimit0); in synopGMAC_mac_init()
1045 synopGMAC_deferral_check_disable(gmacdev); in synopGMAC_mac_init()
1048 if(gmacdev->Speed == SPEED1000) in synopGMAC_mac_init()
1049 synopGMAC_select_gmii(gmacdev); in synopGMAC_mac_init()
1051 synopGMAC_select_mii(gmacdev); in synopGMAC_mac_init()
1053 synopGMAC_tx_enable(gmacdev); in synopGMAC_mac_init()
1054 synopGMAC_rx_enable(gmacdev); in synopGMAC_mac_init()
1056 synopGMAC_frame_filter_enable(gmacdev); in synopGMAC_mac_init()
1057 synopGMAC_set_pass_control(gmacdev,GmacPassControl0); in synopGMAC_mac_init()
1058 synopGMAC_broadcast_enable(gmacdev); in synopGMAC_mac_init()
1059 synopGMAC_src_addr_filter_disable(gmacdev); in synopGMAC_mac_init()
1060 synopGMAC_multicast_disable(gmacdev); in synopGMAC_mac_init()
1061 synopGMAC_dst_addr_filter_normal(gmacdev); in synopGMAC_mac_init()
1062 synopGMAC_multicast_hash_filter_disable(gmacdev); in synopGMAC_mac_init()
1063 synopGMAC_promisc_disable(gmacdev); in synopGMAC_mac_init()
1064 synopGMAC_unicast_hash_filter_disable(gmacdev); in synopGMAC_mac_init()
1067 synopGMAC_unicast_pause_frame_detect_disable(gmacdev); in synopGMAC_mac_init()
1068 synopGMAC_rx_flow_control_disable(gmacdev); in synopGMAC_mac_init()
1069 synopGMAC_tx_flow_control_disable(gmacdev); in synopGMAC_mac_init()
1072 synopGMACWriteReg((u32 *)gmacdev->MacBase, GmacGmiiAddr, GmiiBusy | 0x00000408); in synopGMAC_mac_init()
1073 PHYreg = synopGMACReadReg((u32 *)gmacdev->MacBase,GmacGmiiData); in synopGMAC_mac_init()
1074 synopGMACWriteReg((u32 *)gmacdev->MacBase, GmacGmiiData, PHYreg | 0x00000800); in synopGMAC_mac_init()
1075 synopGMACWriteReg((u32 *)gmacdev->MacBase, GmacGmiiAddr, GmiiBusy | 0x0000040a); in synopGMAC_mac_init()
1087 s32 synopGMAC_check_phy_init (synopGMACdevice * gmacdev) in synopGMAC_check_phy_init() argument
1097 … status = synopGMAC_read_phy_reg((u32 *)gmacdev->MacBase,gmacdev->PhyBase,PHY_STATUS_REG, &data); in synopGMAC_check_phy_init()
1107 …status = synopGMAC_read_phy_reg((u32 *)gmacdev->MacBase,gmacdev->PhyBase,PHY_SPECIFIC_STATUS_REG, … in synopGMAC_check_phy_init()
1113 gmacdev->LinkState = LINKDOWN; in synopGMAC_check_phy_init()
1116 gmacdev->LinkState = LINKUP; in synopGMAC_check_phy_init()
1120 …status = synopGMAC_read_phy_reg((u32 *)gmacdev->MacBase,gmacdev->PhyBase,PHY_SPECIFIC_STATUS_REG, … in synopGMAC_check_phy_init()
1126 gmacdev->DuplexMode = (data & Mii_phy_status_full_duplex) ? FULLDUPLEX: HALFDUPLEX ; in synopGMAC_check_phy_init()
1130 if(gmacdev->DuplexMode == HALFDUPLEX) { in synopGMAC_check_phy_init()
1131 … status = synopGMAC_read_phy_reg((u32 *)gmacdev->MacBase,gmacdev->PhyBase,PHY_CONTROL_REG, &data); in synopGMAC_check_phy_init()
1139 …status = synopGMAC_read_phy_reg((u32 *)gmacdev->MacBase,gmacdev->PhyBase,PHY_SPECIFIC_STATUS_REG, … in synopGMAC_check_phy_init()
1143 gmacdev->Speed = SPEED1000; in synopGMAC_check_phy_init()
1145 gmacdev->Speed = SPEED100; in synopGMAC_check_phy_init()
1147 gmacdev->Speed = SPEED10; in synopGMAC_check_phy_init()
1161 s32 synopGMAC_set_mac_addr(synopGMACdevice *gmacdev, u32 MacHigh, u32 MacLow, u8 *MacAddr) in synopGMAC_set_mac_addr() argument
1166 synopGMACWriteReg((u32 *)gmacdev->MacBase,MacHigh,data); in synopGMAC_set_mac_addr()
1168 synopGMACWriteReg((u32 *)gmacdev->MacBase,MacLow,data); in synopGMAC_set_mac_addr()
1186 s32 synopGMAC_attach (synopGMACdevice *gmacdev, u32 macBase, u32 dmaBase, u32 phyBase) in synopGMAC_attach() argument
1191 memset((void *) gmacdev,0,sizeof(synopGMACdevice)); in synopGMAC_attach()
1193 gmacdev->MacBase = macBase; in synopGMAC_attach()
1194 gmacdev->DmaBase = dmaBase; in synopGMAC_attach()
1195 gmacdev->PhyBase = phyBase; in synopGMAC_attach()
1198 …synopGMAC_set_mac_addr(gmacdev,GmacAddr0High,GmacAddr0Low, gmacdev->Intf == 0 ? mac_addr0 : mac_ad… in synopGMAC_attach()
1252 s32 synopGMAC_init_tx_rx_desc_queue(synopGMACdevice *gmacdev) in synopGMAC_init_tx_rx_desc_queue() argument
1255 for(i =0; i < gmacdev -> TxDescCount; i++) { in synopGMAC_init_tx_rx_desc_queue()
1256 synopGMAC_tx_desc_init_ring(gmacdev->TxDesc + i, i == gmacdev->TxDescCount-1); in synopGMAC_init_tx_rx_desc_queue()
1259 for(i =0; i < gmacdev -> RxDescCount; i++) { in synopGMAC_init_tx_rx_desc_queue()
1260 synopGMAC_rx_desc_init_ring(gmacdev->RxDesc + i, i == gmacdev->RxDescCount-1); in synopGMAC_init_tx_rx_desc_queue()
1263 gmacdev->TxNext = 0; in synopGMAC_init_tx_rx_desc_queue()
1264 gmacdev->TxBusy = 0; in synopGMAC_init_tx_rx_desc_queue()
1265 gmacdev->RxNext = 0; in synopGMAC_init_tx_rx_desc_queue()
1266 gmacdev->RxBusy = 0; in synopGMAC_init_tx_rx_desc_queue()
1278 void synopGMAC_init_rx_desc_base(synopGMACdevice *gmacdev) in synopGMAC_init_rx_desc_base() argument
1280 …synopGMACWriteReg((u32 *)gmacdev->DmaBase,DmaRxBaseAddr,(u32)((u64)gmacdev->RxDescDma & 0xFFFFFFFF… in synopGMAC_init_rx_desc_base()
1291 void synopGMAC_init_tx_desc_base(synopGMACdevice *gmacdev) in synopGMAC_init_tx_desc_base() argument
1293 …synopGMACWriteReg((u32 *)gmacdev->DmaBase,DmaTxBaseAddr,(u32)((u64)gmacdev->TxDescDma & 0xFFFFFFFF… in synopGMAC_init_tx_desc_base()
1464 bool synopGMAC_is_last_rx_desc(synopGMACdevice * gmacdev,DmaDesc *desc) in synopGMAC_is_last_rx_desc() argument
1478 bool synopGMAC_is_last_tx_desc(synopGMACdevice * gmacdev,DmaDesc *desc) in synopGMAC_is_last_tx_desc() argument
1501 s32 synopGMAC_get_tx_qptr(synopGMACdevice * gmacdev, u32 * Status, u32 * Buffer1, u32 * Length1, u3… in synopGMAC_get_tx_qptr() argument
1503 u32 txover = gmacdev->TxBusy; in synopGMAC_get_tx_qptr()
1505 DmaDesc * txdesc = (DmaDesc *)((uint64_t)(gmacdev->TxBusyDesc) | 0x100000000); in synopGMAC_get_tx_qptr()
1507 DmaDesc * txdesc = gmacdev->TxBusyDesc; in synopGMAC_get_tx_qptr()
1514 …(gmacdev->BusyTxDesc)--; //busy tx descriptor is reduced by one as it will be handed over to Proce… in synopGMAC_get_tx_qptr()
1534 gmacdev->TxBusy = synopGMAC_is_last_tx_desc(gmacdev,txdesc) ? 0 : txover + 1; in synopGMAC_get_tx_qptr()
1537gmacdev->TxBusyDesc = synopGMAC_is_last_tx_desc(gmacdev,txdesc) ? gmacdev->TxDesc : (txdesc + 1); in synopGMAC_get_tx_qptr()
1538 synopGMAC_tx_desc_init_ring(txdesc, synopGMAC_is_last_tx_desc(gmacdev,txdesc)); in synopGMAC_get_tx_qptr()
1546 void synopGMAC_set_crc_replacement(synopGMACdevice * gmacdev) in synopGMAC_set_crc_replacement() argument
1549 DmaDesc * txdesc = (DmaDesc *)((uint64_t)(gmacdev->TxNextDesc) | 0x100000000); in synopGMAC_set_crc_replacement()
1551 DmaDesc * txdesc = gmacdev->TxNextDesc; in synopGMAC_set_crc_replacement()
1558 void synopGMAC_clr_crc_replacement(synopGMACdevice * gmacdev) in synopGMAC_clr_crc_replacement() argument
1580 s32 synopGMAC_set_tx_qptr(synopGMACdevice * gmacdev, u32 Buffer1, u32 Length1, u32 Data1, u32 offlo… in synopGMAC_set_tx_qptr() argument
1582 u32 txnext = gmacdev->TxNext; in synopGMAC_set_tx_qptr()
1584 DmaDesc * txdesc = (DmaDesc *)((uint64_t)(gmacdev->TxNextDesc) | 0x100000000); in synopGMAC_set_tx_qptr()
1586 DmaDesc * txdesc = gmacdev->TxNextDesc; in synopGMAC_set_tx_qptr()
1591 …(gmacdev->BusyTxDesc)++; //busy tx descriptor is incremented by one as it will be handed over to D… in synopGMAC_set_tx_qptr()
1611 synopGMAC_tx_checksum_offload_tcp_pseudo(gmacdev, txdesc); in synopGMAC_set_tx_qptr()
1613 synopGMAC_tx_checksum_offload_bypass(gmacdev, txdesc); in synopGMAC_set_tx_qptr()
1618 gmacdev->TxNext = synopGMAC_is_last_tx_desc(gmacdev,txdesc) ? 0 : txnext + 1; in synopGMAC_set_tx_qptr()
1619gmacdev->TxNextDesc = synopGMAC_is_last_tx_desc(gmacdev,txdesc) ? gmacdev->TxDesc : (txdesc + 1); in synopGMAC_set_tx_qptr()
1640 s32 synopGMAC_set_rx_qptr(synopGMACdevice * gmacdev, u32 Buffer1, u32 Length1, u32 Data1) in synopGMAC_set_rx_qptr() argument
1642 u32 rxnext = gmacdev->RxNext; in synopGMAC_set_rx_qptr()
1644 DmaDesc * rxdesc = (DmaDesc *)((uint64_t)(gmacdev->RxNextDesc) | 0x100000000); in synopGMAC_set_rx_qptr()
1646 DmaDesc * rxdesc = gmacdev->RxNextDesc; in synopGMAC_set_rx_qptr()
1669 gmacdev->RxNext = synopGMAC_is_last_rx_desc(gmacdev,rxdesc) ? 0 : rxnext + 1; in synopGMAC_set_rx_qptr()
1670gmacdev->RxNextDesc = synopGMAC_is_last_rx_desc(gmacdev,rxdesc) ? gmacdev->RxDesc : (rxdesc + 1); in synopGMAC_set_rx_qptr()
1674 …(gmacdev->BusyRxDesc)++; //One descriptor will be given to Hardware. So busy count incremented by … in synopGMAC_set_rx_qptr()
1693 s32 synopGMAC_get_rx_qptr(synopGMACdevice * gmacdev, u32 * Status, u32 * Buffer1, u32 * Length1, u3… in synopGMAC_get_rx_qptr() argument
1696 …u32 rxnext = gmacdev->RxBusy; // index of descriptor the DMA just completed. May be useful w… in synopGMAC_get_rx_qptr()
1699 DmaDesc * rxdesc = (DmaDesc *)((uint64_t)(gmacdev->RxBusyDesc) | 0x100000000); in synopGMAC_get_rx_qptr()
1701 DmaDesc * rxdesc = gmacdev->RxBusyDesc; in synopGMAC_get_rx_qptr()
1726 gmacdev->RxBusy = synopGMAC_is_last_rx_desc(gmacdev,rxdesc) ? 0 : rxnext + 1; in synopGMAC_get_rx_qptr()
1728 gmacdev->RxBusyDesc = synopGMAC_is_last_rx_desc(gmacdev,rxdesc) ? gmacdev->RxDesc : (rxdesc + 1); in synopGMAC_get_rx_qptr()
1737 …(gmacdev->BusyRxDesc)--; //busy tx descriptor is reduced by one as it will be handed over to Proce… in synopGMAC_get_rx_qptr()
1749 void synopGMAC_clear_interrupt(synopGMACdevice *gmacdev) in synopGMAC_clear_interrupt() argument
1752 data = synopGMACReadReg((u32 *)gmacdev->DmaBase, DmaStatus); in synopGMAC_clear_interrupt()
1753 synopGMACWriteReg((u32 *)gmacdev->DmaBase, DmaStatus ,data); in synopGMAC_clear_interrupt()
1761 u32 synopGMAC_get_interrupt_type(synopGMACdevice *gmacdev) in synopGMAC_get_interrupt_type() argument
1765 data = synopGMACReadReg((u32 *)gmacdev->DmaBase, DmaStatus); in synopGMAC_get_interrupt_type()
1766 …synopGMACWriteReg((u32 *)gmacdev->DmaBase, DmaStatus ,data); //This is the appropriate location to… in synopGMAC_get_interrupt_type()
1792 void synopGMAC_enable_interrupt(synopGMACdevice *gmacdev, u32 interrupts) in synopGMAC_enable_interrupt() argument
1796 data = synopGMACReadReg((u32 *)gmacdev->DmaBase, DmaInterrupt); in synopGMAC_enable_interrupt()
1798 synopGMACWriteReg((u32 *)gmacdev->DmaBase, DmaInterrupt, data); in synopGMAC_enable_interrupt()
1811 void synopGMAC_disable_interrupt_all(synopGMACdevice *gmacdev) in synopGMAC_disable_interrupt_all() argument
1813 synopGMACWriteReg((u32 *)gmacdev->DmaBase, DmaInterrupt, DmaIntDisable); in synopGMAC_disable_interrupt_all()
1824 void synopGMAC_disable_interrupt(synopGMACdevice *gmacdev, u32 interrupts) in synopGMAC_disable_interrupt() argument
1826 synopGMACClearBits((u32 *)gmacdev->DmaBase, DmaInterrupt, interrupts); in synopGMAC_disable_interrupt()
1834 void synopGMAC_enable_dma_rx(synopGMACdevice * gmacdev) in synopGMAC_enable_dma_rx() argument
1838 data = synopGMACReadReg((u32 *)gmacdev->DmaBase, DmaControl); in synopGMAC_enable_dma_rx()
1840 synopGMACWriteReg((u32 *)gmacdev->DmaBase, DmaControl ,data); in synopGMAC_enable_dma_rx()
1849 void synopGMAC_enable_dma_tx(synopGMACdevice * gmacdev) in synopGMAC_enable_dma_tx() argument
1853 data = synopGMACReadReg((u32 *)gmacdev->DmaBase, DmaControl); in synopGMAC_enable_dma_tx()
1855 synopGMACWriteReg((u32 *)gmacdev->DmaBase, DmaControl ,data); in synopGMAC_enable_dma_tx()
1859 void synopGMAC_enable_under_size_pkt(synopGMACdevice * gmacdev) in synopGMAC_enable_under_size_pkt() argument
1862 data = synopGMACReadReg((u32 *)gmacdev->DmaBase, DmaControl); in synopGMAC_enable_under_size_pkt()
1864 synopGMACWriteReg((u32 *)gmacdev->DmaBase, DmaControl ,data); in synopGMAC_enable_under_size_pkt()
1868 void synopGMAC_disable_under_size_pkt(synopGMACdevice * gmacdev) in synopGMAC_disable_under_size_pkt() argument
1871 data = synopGMACReadReg((u32 *)gmacdev->DmaBase, DmaControl); in synopGMAC_disable_under_size_pkt()
1873 synopGMACWriteReg((u32 *)gmacdev->DmaBase, DmaControl ,data); in synopGMAC_disable_under_size_pkt()
1877 void synopGMAC_enable_crc_err_pkt(synopGMACdevice * gmacdev) in synopGMAC_enable_crc_err_pkt() argument
1880 data = synopGMACReadReg((u32 *)gmacdev->DmaBase, DmaControl); in synopGMAC_enable_crc_err_pkt()
1882 synopGMACWriteReg((u32 *)gmacdev->DmaBase, DmaControl ,data); in synopGMAC_enable_crc_err_pkt()
1886 void synopGMAC_disable_crc_err_pkt(synopGMACdevice * gmacdev) in synopGMAC_disable_crc_err_pkt() argument
1889 data = synopGMACReadReg((u32 *)gmacdev->DmaBase, DmaControl); in synopGMAC_disable_crc_err_pkt()
1891 synopGMACWriteReg((u32 *)gmacdev->DmaBase, DmaControl ,data); in synopGMAC_disable_crc_err_pkt()
1903 void synopGMAC_resume_dma_tx(synopGMACdevice * gmacdev) in synopGMAC_resume_dma_tx() argument
1905 synopGMACWriteReg((u32 *)gmacdev->DmaBase, DmaTxPollDemand, 0); in synopGMAC_resume_dma_tx()
1915 void synopGMAC_resume_dma_rx(synopGMACdevice * gmacdev) in synopGMAC_resume_dma_rx() argument
1917 synopGMACWriteReg((u32 *)gmacdev->DmaBase, DmaRxPollDemand, 0); in synopGMAC_resume_dma_rx()
1943 void synopGMAC_take_desc_ownership_rx(synopGMACdevice * gmacdev) in synopGMAC_take_desc_ownership_rx() argument
1947 desc = gmacdev->RxDesc; in synopGMAC_take_desc_ownership_rx()
1948 for(i = 0; i < gmacdev->RxDescCount; i++) { in synopGMAC_take_desc_ownership_rx()
1964 void synopGMAC_take_desc_ownership_tx(synopGMACdevice * gmacdev) in synopGMAC_take_desc_ownership_tx() argument
1968 desc = gmacdev->TxDesc; in synopGMAC_take_desc_ownership_tx()
1969 for(i = 0; i < gmacdev->TxDescCount; i++) { in synopGMAC_take_desc_ownership_tx()
1983 void synopGMAC_disable_dma_tx(synopGMACdevice * gmacdev) in synopGMAC_disable_dma_tx() argument
1987 data = synopGMACReadReg((u32 *)gmacdev->DmaBase, DmaControl); in synopGMAC_disable_dma_tx()
1989 synopGMACWriteReg((u32 *)gmacdev->DmaBase, DmaControl ,data); in synopGMAC_disable_dma_tx()
1996 void synopGMAC_disable_dma_rx(synopGMACdevice * gmacdev) in synopGMAC_disable_dma_rx() argument
2000 data = synopGMACReadReg((u32 *)gmacdev->DmaBase, DmaControl); in synopGMAC_disable_dma_rx()
2002 synopGMACWriteReg((u32 *)gmacdev->DmaBase, DmaControl ,data); in synopGMAC_disable_dma_rx()
2019 void synopGMAC_pmt_int_enable(synopGMACdevice *gmacdev) in synopGMAC_pmt_int_enable() argument
2021 synopGMACClearBits((u32 *)gmacdev->MacBase,GmacInterruptMask,GmacPmtIntMask); in synopGMAC_pmt_int_enable()
2031 void synopGMAC_pmt_int_disable(synopGMACdevice *gmacdev) in synopGMAC_pmt_int_disable() argument
2033 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacInterruptMask,GmacPmtIntMask); in synopGMAC_pmt_int_disable()
2042 void synopGMAC_power_down_enable(synopGMACdevice *gmacdev) in synopGMAC_power_down_enable() argument
2044 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacPmtCtrlStatus,GmacPmtPowerDown); in synopGMAC_power_down_enable()
2054 void synopGMAC_power_down_disable(synopGMACdevice *gmacdev) in synopGMAC_power_down_disable() argument
2056 synopGMACClearBits((u32 *)gmacdev->MacBase,GmacPmtCtrlStatus,GmacPmtPowerDown); in synopGMAC_power_down_disable()
2064 void synopGMAC_enable_pmt_interrupt(synopGMACdevice *gmacdev) in synopGMAC_enable_pmt_interrupt() argument
2066 synopGMACClearBits((u32 *)gmacdev->MacBase,GmacInterruptMask,GmacPmtIntMask); in synopGMAC_enable_pmt_interrupt()
2073 void synopGMAC_disable_pmt_interrupt(synopGMACdevice *gmacdev) in synopGMAC_disable_pmt_interrupt() argument
2075 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacInterruptMask,GmacPmtIntMask); in synopGMAC_disable_pmt_interrupt()
2082 void synopGMAC_magic_packet_enable(synopGMACdevice *gmacdev) in synopGMAC_magic_packet_enable() argument
2084 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacPmtCtrlStatus,GmacPmtMagicPktEnable); in synopGMAC_magic_packet_enable()
2088 void synopGMAC_magic_packet_disable(synopGMACdevice *gmacdev) in synopGMAC_magic_packet_disable() argument
2090 synopGMACClearBits((u32 *)gmacdev->MacBase,GmacPmtCtrlStatus,GmacPmtMagicPktEnable); in synopGMAC_magic_packet_disable()
2100 void synopGMAC_wakeup_frame_enable(synopGMACdevice *gmacdev) in synopGMAC_wakeup_frame_enable() argument
2102 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacPmtCtrlStatus,GmacPmtWakeupFrameEnable); in synopGMAC_wakeup_frame_enable()
2111 void synopGMAC_pmt_unicast_enable(synopGMACdevice *gmacdev) in synopGMAC_pmt_unicast_enable() argument
2113 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacPmtCtrlStatus,GmacPmtGlobalUnicast); in synopGMAC_pmt_unicast_enable()
2121 bool synopGMAC_is_magic_packet_received(synopGMACdevice *gmacdev) in synopGMAC_is_magic_packet_received() argument
2124 data = synopGMACReadReg((u32 *)gmacdev->MacBase,GmacPmtCtrlStatus); in synopGMAC_is_magic_packet_received()
2132 bool synopGMAC_is_wakeup_frame_received(synopGMACdevice *gmacdev) in synopGMAC_is_wakeup_frame_received() argument
2135 data = synopGMACReadReg((u32 *)gmacdev->MacBase,GmacPmtCtrlStatus); in synopGMAC_is_wakeup_frame_received()
2149 void synopGMAC_write_wakeup_frame_register(synopGMACdevice *gmacdev, u32 * filter_contents)
2152 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacPmtCtrlStatus,GmacPmtFrmFilterPtrReset);
2155 synopGMACWriteReg((u32 *)gmacdev->MacBase, GmacWakeupAddr, *(filter_contents + i));
2172 void synopGMAC_enable_rx_chksum_offload(synopGMACdevice *gmacdev) in synopGMAC_enable_rx_chksum_offload() argument
2174 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacConfig,GmacRxIpcOffload); in synopGMAC_enable_rx_chksum_offload()
2183 void synopGMAC_disable_rx_chksum_offload(synopGMACdevice *gmacdev) in synopGMAC_disable_rx_chksum_offload() argument
2185 synopGMACClearBits((u32 *)gmacdev->MacBase,GmacConfig,GmacRxIpcOffload); in synopGMAC_disable_rx_chksum_offload()
2194 void synopGMAC_rx_tcpip_chksum_drop_enable(synopGMACdevice *gmacdev) in synopGMAC_rx_tcpip_chksum_drop_enable() argument
2196 synopGMACClearBits((u32 *)gmacdev->DmaBase,DmaControl,DmaDisableDropTcpCs); in synopGMAC_rx_tcpip_chksum_drop_enable()
2206 void synopGMAC_rx_tcpip_chksum_drop_disable(synopGMACdevice *gmacdev) in synopGMAC_rx_tcpip_chksum_drop_disable() argument
2208 synopGMACSetBits((u32 *)gmacdev->DmaBase,DmaControl,DmaDisableDropTcpCs); in synopGMAC_rx_tcpip_chksum_drop_disable()
2229 bool synopGMAC_is_ext_status(synopGMACdevice *gmacdev,u32 status) // extended status pr… in synopGMAC_is_ext_status() argument
2241 bool synopGMAC_ES_is_IP_header_error(synopGMACdevice *gmacdev,u32 ext_status) // IP header… in synopGMAC_ES_is_IP_header_error() argument
2253 bool synopGMAC_ES_is_rx_checksum_bypassed(synopGMACdevice *gmacdev,u32 ext_status) // Hardware … in synopGMAC_ES_is_rx_checksum_bypassed() argument
2265 bool synopGMAC_ES_is_IP_payload_error(synopGMACdevice *gmacdev,u32 ext_status) // IP payloa… in synopGMAC_ES_is_IP_payload_error() argument
2279 u32 synopGMAC_is_rx_checksum_error(synopGMACdevice *gmacdev, u32 status) in synopGMAC_is_rx_checksum_error() argument
2306 bool synopGMAC_is_tx_ipv4header_checksum_error(synopGMACdevice *gmacdev, u32 status) in synopGMAC_is_tx_ipv4header_checksum_error() argument
2320 bool synopGMAC_is_tx_payload_checksum_error(synopGMACdevice *gmacdev, u32 status) in synopGMAC_is_tx_payload_checksum_error() argument
2331 void synopGMAC_tx_checksum_offload_bypass(synopGMACdevice *gmacdev, DmaDesc *desc) in synopGMAC_tx_checksum_offload_bypass() argument
2344 void synopGMAC_tx_checksum_offload_ipv4hdr(synopGMACdevice *gmacdev, DmaDesc *desc) in synopGMAC_tx_checksum_offload_ipv4hdr() argument
2360 void synopGMAC_tx_checksum_offload_tcponly(synopGMACdevice *gmacdev, DmaDesc *desc) in synopGMAC_tx_checksum_offload_tcponly() argument
2376 void synopGMAC_tx_checksum_offload_tcp_pseudo(synopGMACdevice *gmacdev, DmaDesc *desc) in synopGMAC_tx_checksum_offload_tcp_pseudo() argument
2407 void synopGMAC_TS_enable(synopGMACdevice *gmacdev) in synopGMAC_TS_enable() argument
2409 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSENA); in synopGMAC_TS_enable()
2418 void synopGMAC_TS_disable(synopGMACdevice *gmacdev) in synopGMAC_TS_disable() argument
2420 synopGMACClearBits((u32 *)gmacdev->MacBase,GmacTSControl, GmacTSENA); in synopGMAC_TS_disable()
2432 void synopGMAC_TS_int_enable(synopGMACdevice *gmacdev) in synopGMAC_TS_int_enable() argument
2435 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSTRIG); in synopGMAC_TS_int_enable()
2444 void synopGMAC_TS_int_disable(synopGMACdevice *gmacdev) in synopGMAC_TS_int_disable() argument
2447 synopGMACClearBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSTRIG); in synopGMAC_TS_int_disable()
2458 void synopGMAC_TS_mac_addr_filt_enable(synopGMACdevice *gmacdev) in synopGMAC_TS_mac_addr_filt_enable() argument
2460 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSENMACADDR); in synopGMAC_TS_mac_addr_filt_enable()
2469 void synopGMAC_TS_mac_addr_filt_disable(synopGMACdevice *gmacdev) in synopGMAC_TS_mac_addr_filt_disable() argument
2471 synopGMACClearBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSENMACADDR); in synopGMAC_TS_mac_addr_filt_disable()
2487 void synopGMAC_TS_set_clk_type(synopGMACdevice *gmacdev, u32 clk_type) in synopGMAC_TS_set_clk_type() argument
2490 …clkval = synopGMACReadReg((u32 *)gmacdev->MacBase,GmacTSControl); //set the mdc clock to the user … in synopGMAC_TS_set_clk_type()
2492 synopGMACWriteReg((u32 *)gmacdev->MacBase,GmacTSControl,clkval); in synopGMAC_TS_set_clk_type()
2505 void synopGMAC_TS_master_enable(synopGMACdevice *gmacdev) in synopGMAC_TS_master_enable() argument
2507 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSMSTRENA); in synopGMAC_TS_master_enable()
2519 void synopGMAC_TS_master_disable(synopGMACdevice *gmacdev) in synopGMAC_TS_master_disable() argument
2521 synopGMACClearBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSMSTRENA); in synopGMAC_TS_master_disable()
2532 void synopGMAC_TS_event_enable(synopGMACdevice *gmacdev) in synopGMAC_TS_event_enable() argument
2534 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSEVNTENA); in synopGMAC_TS_event_enable()
2544 void synopGMAC_TS_event_disable(synopGMACdevice *gmacdev) in synopGMAC_TS_event_disable() argument
2546 synopGMACClearBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSEVNTENA); in synopGMAC_TS_event_disable()
2557 void synopGMAC_TS_IPV4_enable(synopGMACdevice *gmacdev) in synopGMAC_TS_IPV4_enable() argument
2559 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSIPV4ENA); in synopGMAC_TS_IPV4_enable()
2569 void synopGMAC_TS_IPV4_disable(synopGMACdevice *gmacdev) in synopGMAC_TS_IPV4_disable() argument
2571 synopGMACClearBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSIPV4ENA); in synopGMAC_TS_IPV4_disable()
2581 void synopGMAC_TS_IPV6_enable(synopGMACdevice *gmacdev) in synopGMAC_TS_IPV6_enable() argument
2583 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSIPV6ENA); in synopGMAC_TS_IPV6_enable()
2593 void synopGMAC_TS_IPV6_disable(synopGMACdevice *gmacdev) in synopGMAC_TS_IPV6_disable() argument
2595 synopGMACClearBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSIPV6ENA); in synopGMAC_TS_IPV6_disable()
2606 void synopGMAC_TS_ptp_over_ethernet_enable(synopGMACdevice *gmacdev) in synopGMAC_TS_ptp_over_ethernet_enable() argument
2608 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSIPENA); in synopGMAC_TS_ptp_over_ethernet_enable()
2618 void synopGMAC_TS_ptp_over_ethernet_disable(synopGMACdevice *gmacdev) in synopGMAC_TS_ptp_over_ethernet_disable() argument
2620 synopGMACClearBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSIPENA); in synopGMAC_TS_ptp_over_ethernet_disable()
2631 void synopGMAC_TS_pkt_snoop_ver2(synopGMACdevice *gmacdev) in synopGMAC_TS_pkt_snoop_ver2() argument
2633 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSVER2ENA); in synopGMAC_TS_pkt_snoop_ver2()
2642 void synopGMAC_TS_pkt_snoop_ver1(synopGMACdevice *gmacdev) in synopGMAC_TS_pkt_snoop_ver1() argument
2644 synopGMACClearBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSVER2ENA); in synopGMAC_TS_pkt_snoop_ver1()
2654 void synopGMAC_TS_digital_rollover_enable(synopGMACdevice *gmacdev) in synopGMAC_TS_digital_rollover_enable() argument
2656 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSCTRLSSR); in synopGMAC_TS_digital_rollover_enable()
2665 void synopGMAC_TS_binary_rollover_enable(synopGMACdevice *gmacdev) in synopGMAC_TS_binary_rollover_enable() argument
2667 synopGMACClearBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSCTRLSSR); in synopGMAC_TS_binary_rollover_enable()
2677 void synopGMAC_TS_all_frames_enable(synopGMACdevice *gmacdev) in synopGMAC_TS_all_frames_enable() argument
2679 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSENALL); in synopGMAC_TS_all_frames_enable()
2689 void synopGMAC_TS_all_frames_disable(synopGMACdevice *gmacdev) in synopGMAC_TS_all_frames_disable() argument
2691 synopGMACClearBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSENALL); in synopGMAC_TS_all_frames_disable()
2702 s32 synopGMAC_TS_addend_update(synopGMACdevice *gmacdev, u32 addend_value) in synopGMAC_TS_addend_update() argument
2705 …synopGMACWriteReg((u32 *)gmacdev->MacBase,GmacTSAddend,addend_value);// Load the addend_value in t… in synopGMAC_TS_addend_update()
2707 …if(!((synopGMACReadReg((u32 *)gmacdev->MacBase,GmacTSControl)) & GmacTSADDREG)) { // if it is clea… in synopGMAC_TS_addend_update()
2713 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSADDREG); in synopGMAC_TS_addend_update()
2730 s32 synopGMAC_TS_timestamp_update(synopGMACdevice *gmacdev, u32 high_value, u32 low_value) in synopGMAC_TS_timestamp_update() argument
2733 …synopGMACWriteReg((u32 *)gmacdev->MacBase,GmacTSHighUpdate,high_value);// Load the high value to T… in synopGMAC_TS_timestamp_update()
2734 …synopGMACWriteReg((u32 *)gmacdev->MacBase,GmacTSLowUpdate,low_value);// Load the high value to Tim… in synopGMAC_TS_timestamp_update()
2736 …if(!((synopGMACReadReg((u32 *)gmacdev->MacBase,GmacTSControl)) & GmacTSUPDT)) { // if it is cleare… in synopGMAC_TS_timestamp_update()
2742 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSUPDT); in synopGMAC_TS_timestamp_update()
2759 s32 synopGMAC_TS_timestamp_init(synopGMACdevice *gmacdev, u32 high_value, u32 low_value) in synopGMAC_TS_timestamp_init() argument
2762 …synopGMACWriteReg((u32 *)gmacdev->MacBase,GmacTSHighUpdate,high_value);// Load the high value to T… in synopGMAC_TS_timestamp_init()
2763 …synopGMACWriteReg((u32 *)gmacdev->MacBase,GmacTSLowUpdate,low_value);// Load the high value to Tim… in synopGMAC_TS_timestamp_init()
2765 …if(!((synopGMACReadReg((u32 *)gmacdev->MacBase,GmacTSControl)) & GmacTSINT)) { // if it is cleared… in synopGMAC_TS_timestamp_init()
2771 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSINT); in synopGMAC_TS_timestamp_init()
2785 void synopGMAC_TS_coarse_update(synopGMACdevice *gmacdev) in synopGMAC_TS_coarse_update() argument
2787 synopGMACClearBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSCFUPDT); in synopGMAC_TS_coarse_update()
2796 void synopGMAC_TS_fine_update(synopGMACdevice *gmacdev) in synopGMAC_TS_fine_update() argument
2798 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacTSControl,GmacTSCFUPDT); in synopGMAC_TS_fine_update()
2807 void synopGMAC_TS_subsecond_init(synopGMACdevice *gmacdev, u32 sub_sec_inc_value) in synopGMAC_TS_subsecond_init() argument
2809 synopGMACWriteReg((u32 *)gmacdev->MacBase,GmacTSSubSecIncr,(sub_sec_inc_value & GmacSSINCMsk)); in synopGMAC_TS_subsecond_init()
2824 void synopGMAC_TS_read_timestamp(synopGMACdevice *gmacdev, u16 * higher_sec_val, u32 * sec_val, u32… in synopGMAC_TS_read_timestamp() argument
2826 …* higher_sec_val = (u16)(synopGMACReadReg((u32 *)gmacdev->MacBase,GmacTSHighWord) & GmacTSHighWord… in synopGMAC_TS_read_timestamp()
2827 * sec_val = synopGMACReadReg((u32 *)gmacdev->MacBase,GmacTSHigh); in synopGMAC_TS_read_timestamp()
2828 * sub_sec_val = synopGMACReadReg((u32 *)gmacdev->MacBase,GmacTSLow); in synopGMAC_TS_read_timestamp()
2837 void synopGMAC_TS_load_timestamp_higher_val(synopGMACdevice *gmacdev, u32 higher_sec_val) in synopGMAC_TS_load_timestamp_higher_val() argument
2839 … synopGMACWriteReg((u32 *)gmacdev->MacBase,GmacTSHighWord, (higher_sec_val & GmacTSHighWordMask)); in synopGMAC_TS_load_timestamp_higher_val()
2848 void synopGMAC_TS_read_timestamp_higher_val(synopGMACdevice *gmacdev, u16 * higher_sec_val) in synopGMAC_TS_read_timestamp_higher_val() argument
2850 …* higher_sec_val = (u16)(synopGMACReadReg((u32 *)gmacdev->MacBase,GmacTSHighWord) & GmacTSHighWord… in synopGMAC_TS_read_timestamp_higher_val()
2861 void synopGMAC_TS_load_target_timestamp(synopGMACdevice *gmacdev, u32 sec_val, u32 sub_sec_val) in synopGMAC_TS_load_target_timestamp() argument
2863 synopGMACWriteReg((u32 *)gmacdev->MacBase,GmacTSTargetTimeHigh,sec_val); in synopGMAC_TS_load_target_timestamp()
2864 synopGMACWriteReg((u32 *)gmacdev->MacBase,GmacTSTargetTimeLow,sub_sec_val); in synopGMAC_TS_load_target_timestamp()
2875 void synopGMAC_TS_read_target_timestamp(synopGMACdevice *gmacdev, u32 * sec_val, u32 * sub_sec_val) in synopGMAC_TS_read_target_timestamp() argument
2877 * sec_val = synopGMACReadReg((u32 *)gmacdev->MacBase,GmacTSTargetTimeHigh); in synopGMAC_TS_read_target_timestamp()
2878 * sub_sec_val = synopGMACReadReg((u32 *)gmacdev->MacBase,GmacTSTargetTimeLow); in synopGMAC_TS_read_target_timestamp()
2882 void synopGMAC_src_addr_insert_enable(synopGMACdevice * gmacdev) in synopGMAC_src_addr_insert_enable() argument
2884 synopGMACClearBits((u32 *)gmacdev->MacBase,GmacConfig,GmacSrcAddrInsRpl); in synopGMAC_src_addr_insert_enable()
2885 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacConfig,GmacSrcAddrIns); in synopGMAC_src_addr_insert_enable()
2888 void synopGMAC_src_addr_insert_disable(synopGMACdevice * gmacdev) in synopGMAC_src_addr_insert_disable() argument
2891 synopGMACClearBits((u32 *)gmacdev->MacBase,GmacConfig,GmacSrcAddrInsRpl); in synopGMAC_src_addr_insert_disable()
2894 void synopGMAC_src_addr_replace_enable(synopGMACdevice * gmacdev) in synopGMAC_src_addr_replace_enable() argument
2896 synopGMACClearBits((u32 *)gmacdev->MacBase,GmacConfig,GmacSrcAddrInsRpl); in synopGMAC_src_addr_replace_enable()
2897 synopGMACSetBits((u32 *)gmacdev->MacBase,GmacConfig,GmacSrcAddrRpl); in synopGMAC_src_addr_replace_enable()
2901 void synopGMAC_src_addr_replace_disable(synopGMACdevice * gmacdev) in synopGMAC_src_addr_replace_disable() argument
2903 synopGMACClearBits((u32 *)gmacdev->MacBase,GmacConfig,GmacSrcAddrInsRpl); in synopGMAC_src_addr_replace_disable()
2908 void synopGMAC_svlan_insertion_enable(synopGMACdevice * gmacdev, u16 vlantag) in synopGMAC_svlan_insertion_enable() argument
2911 …synopGMACWriteReg((u32 *)gmacdev->MacBase, GmacVLANIncRep, GmacVLP | GmacSVLAN | GmacVLANIns| vlan… in synopGMAC_svlan_insertion_enable()
2916 void synopGMAC_cvlan_insertion_enable(synopGMACdevice * gmacdev, u16 vlantag) in synopGMAC_cvlan_insertion_enable() argument
2918 …synopGMACWriteReg((u32 *)gmacdev->MacBase, GmacVLANIncRep, GmacVLP | GmacCVLAN | GmacVLANIns | vla… in synopGMAC_cvlan_insertion_enable()
2923 void synopGMAC_svlan_replace_enable(synopGMACdevice * gmacdev, u16 vlantag) in synopGMAC_svlan_replace_enable() argument
2925 …synopGMACWriteReg((u32 *)gmacdev->MacBase, GmacVLANIncRep, GmacVLP | GmacSVLAN | GmacVLANRep | vla… in synopGMAC_svlan_replace_enable()
2929 void synopGMAC_cvlan_replace_enable(synopGMACdevice * gmacdev, u16 vlantag) in synopGMAC_cvlan_replace_enable() argument
2931 …synopGMACWriteReg((u32 *)gmacdev->MacBase, GmacVLANIncRep, GmacVLP | GmacCVLAN | GmacVLANRep | vla… in synopGMAC_cvlan_replace_enable()
2935 void synopGMAC_vlan_deletion_enable(synopGMACdevice * gmacdev) in synopGMAC_vlan_deletion_enable() argument
2937 synopGMACWriteReg((u32 *)gmacdev->MacBase, GmacVLANIncRep, GmacVLP | GmacVLANDel); in synopGMAC_vlan_deletion_enable()
2943 void synopGMAC_vlan_no_act_enable(synopGMACdevice * gmacdev) in synopGMAC_vlan_no_act_enable() argument
2945 synopGMACClearBits((u32 *)gmacdev->MacBase, GmacVLANIncRep, 0xFFFFFFFF); in synopGMAC_vlan_no_act_enable()