1 /* =================================================================================== 2 * Copyright (c) <2009> Synopsys, Inc. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a copy of 5 * this software annotated with this license and associated documentation files 6 * (the "Software"), to deal in the Software without restriction, including without 7 * limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the Software is 9 * furnished to do so, subject to the following conditions: 10 * 11 * The above copyright notice and this permission notice shall be included in all 12 * copies or substantial portions of the Software. 13 * 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 15 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 16 * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 17 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 18 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 19 * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 * 21 * =================================================================================== */ 22 23 /** \file 24 * Header file for the nework dependent functionality. 25 * The function prototype listed here are linux dependent. 26 * 27 * \internal 28 * ---------------------------REVISION HISTORY------------------- 29 * Synopsys 01/Aug/2007 Created 30 */ 31 #ifndef SYNOP_GMAC_NETWORK_INTERFACE_H 32 #define SYNOP_GMAC_NETWORK_INTERFACE_H 1 33 34 #include "synopGMAC_Dev.h" 35 //#define CACHE_ON 36 37 /** Tx/Rx buffer structure */ 38 typedef struct 39 { 40 uint8_t au8Buf[PKT_FRAME_BUF_SIZE]; 41 } PKT_FRAME_T; 42 43 s32 synopGMAC_setup_tx_desc_queue(synopGMACdevice *gmacdev, DmaDesc *first_desc, u32 no_of_desc, u32 desc_mode); 44 s32 synopGMAC_setup_rx_desc_queue(synopGMACdevice *gmacdev, DmaDesc *first_desc, u32 no_of_desc, u32 desc_mode); 45 s32 synopGMAC_xmit_frames(synopGMACdevice *gmacdev, u8 *pkt_data, u32 pkt_len, u32 offload_needed, u32 ts); 46 s32 synop_handle_received_data(synopGMACdevice *gmacdev, PKT_FRAME_T **ppsPktFrame); 47 void synop_handle_transmit_over(synopGMACdevice *gmacdev); 48 void synopGMAC_set_mode(synopGMACdevice *gmacdev, int mode); 49 void synopGMAC_powerup_mac(synopGMACdevice *gmacdev); 50 void synopGMAC_powerdown_mac(synopGMACdevice *gmacdev); 51 52 #endif /* End of file */ 53