/* Synopsys DesignWare Core Enterprise Ethernet (XLGMAC) Driver * * Copyright (c) 2017 Synopsys, Inc. (www.synopsys.com) * * This program is dual-licensed; you may select either version 2 of * the GNU General Public License ("GPL") or BSD license ("BSD"). * * This Synopsys DWC XLGMAC software driver and associated documentation * (hereinafter the "Software") is an unsupported proprietary work of * Synopsys, Inc. unless otherwise expressly agreed to in writing between * Synopsys and you. The Software IS NOT an item of Licensed Software or a * Licensed Product under any End User Software License Agreement or * Agreement for Licensed Products with Synopsys or any supplement thereto. * Synopsys is a registered trademark of Synopsys, Inc. Other names included * in the SOFTWARE may be the trademarks of their respective owners.
*/
/* Incomplete receive save location. If the budget is exhausted * or the last descriptor (last normal descriptor or a following * context descriptor) has not been DMA'd yet the current state * of the receive processing needs to be saved.
*/ unsignedint state_saved; struct { struct sk_buff *skb; unsignedint len; unsignedint error;
} state;
};
struct xlgmac_ring { /* Per packet related information */ struct xlgmac_pkt_info pkt_info;
/* Virtual/DMA addresses of DMA descriptor list and the total count */ struct xlgmac_dma_desc *dma_desc_head;
dma_addr_t dma_desc_head_addr; unsignedint dma_desc_count;
/* Array of descriptor data corresponding the DMA descriptor * (always use the XLGMAC_GET_DESC_DATA macro to access this data)
*/ struct xlgmac_desc_data *desc_data_head;
/* Ring index values * cur - Tx: index of descriptor to be used for current transfer * Rx: index of descriptor to check for packet availability * dirty - Tx: index of descriptor to check for transfer complete * Rx: index of descriptor to check for buffer reallocation
*/ unsignedint cur; unsignedint dirty;
/* Coalesce frame count used for interrupt bit setting */ unsignedint coalesce_count;
int (*enable_int)(struct xlgmac_channel *channel, enum xlgmac_int int_id); int (*disable_int)(struct xlgmac_channel *channel, enum xlgmac_int int_id); void (*dev_xmit)(struct xlgmac_channel *channel); int (*dev_read)(struct xlgmac_channel *channel);
int (*set_mac_address)(struct xlgmac_pdata *pdata, const u8 *addr); int (*config_rx_mode)(struct xlgmac_pdata *pdata); int (*enable_rx_csum)(struct xlgmac_pdata *pdata); int (*disable_rx_csum)(struct xlgmac_pdata *pdata);
/* For MII speed configuration */ int (*set_xlgmii_25000_speed)(struct xlgmac_pdata *pdata); int (*set_xlgmii_40000_speed)(struct xlgmac_pdata *pdata); int (*set_xlgmii_50000_speed)(struct xlgmac_pdata *pdata); int (*set_xlgmii_100000_speed)(struct xlgmac_pdata *pdata);
/* For Flow Control */ int (*config_tx_flow_control)(struct xlgmac_pdata *pdata); int (*config_rx_flow_control)(struct xlgmac_pdata *pdata);
/* For Vlan related config */ int (*enable_rx_vlan_stripping)(struct xlgmac_pdata *pdata); int (*disable_rx_vlan_stripping)(struct xlgmac_pdata *pdata); int (*enable_rx_vlan_filtering)(struct xlgmac_pdata *pdata); int (*disable_rx_vlan_filtering)(struct xlgmac_pdata *pdata); int (*update_vlan_hash_table)(struct xlgmac_pdata *pdata);
/* For RX coalescing */ int (*config_rx_coalesce)(struct xlgmac_pdata *pdata); int (*config_tx_coalesce)(struct xlgmac_pdata *pdata); unsignedint (*usec_to_riwt)(struct xlgmac_pdata *pdata, unsignedint usec); unsignedint (*riwt_to_usec)(struct xlgmac_pdata *pdata, unsignedint riwt);
/* For RX and TX threshold config */ int (*config_rx_threshold)(struct xlgmac_pdata *pdata, unsignedint val); int (*config_tx_threshold)(struct xlgmac_pdata *pdata, unsignedint val);
/* For RX and TX Store and Forward Mode config */ int (*config_rsf_mode)(struct xlgmac_pdata *pdata, unsignedint val); int (*config_tsf_mode)(struct xlgmac_pdata *pdata, unsignedint val);
/* For TX DMA Operate on Second Frame config */ int (*config_osp_mode)(struct xlgmac_pdata *pdata);
/* For RX and TX PBL config */ int (*config_rx_pbl_val)(struct xlgmac_pdata *pdata); int (*get_rx_pbl_val)(struct xlgmac_pdata *pdata); int (*config_tx_pbl_val)(struct xlgmac_pdata *pdata); int (*get_tx_pbl_val)(struct xlgmac_pdata *pdata); int (*config_pblx8)(struct xlgmac_pdata *pdata);
/* For Receive Side Scaling */ int (*enable_rss)(struct xlgmac_pdata *pdata); int (*disable_rss)(struct xlgmac_pdata *pdata); int (*set_rss_hash_key)(struct xlgmac_pdata *pdata, const u8 *key); int (*set_rss_lookup_table)(struct xlgmac_pdata *pdata, const u32 *table);
};
/* This structure contains flags that indicate what hardware features * or configurations are present in the device.
*/ struct xlgmac_hw_features { /* HW Version */ unsignedint version;
/* HW Feature Register2 */ unsignedint rx_q_cnt; /* Number of MTL Receive Queues */ unsignedint tx_q_cnt; /* Number of MTL Transmit Queues */ unsignedint rx_ch_cnt; /* Number of DMA Receive Channels */ unsignedint tx_ch_cnt; /* Number of DMA Transmit Channels */ unsignedint pps_out_num; /* Number of PPS outputs */ unsignedint aux_snap_num; /* Number of Aux snapshot inputs */
};
struct xlgmac_resources { void __iomem *addr; int irq;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.