#include <linux/gpio.h>
#include "xgene_enet_main.h"
#include "xgene_enet_hw.h"
#include "xgene_enet_sgmac.h"
#include "xgene_enet_xgmac.h"
#define RES_ENET_CSR …
#define RES_RING_CSR …
#define RES_RING_CMD …
static void xgene_enet_init_bufpool(struct xgene_enet_desc_ring *buf_pool)
{ … }
static u16 xgene_enet_get_data_len(u64 bufdatalen)
{ … }
static u16 xgene_enet_set_data_len(u32 size)
{ … }
static int xgene_enet_refill_pagepool(struct xgene_enet_desc_ring *buf_pool,
u32 nbuf)
{ … }
static int xgene_enet_refill_bufpool(struct xgene_enet_desc_ring *buf_pool,
u32 nbuf)
{ … }
static u8 xgene_enet_hdr_len(const void *data)
{ … }
static void xgene_enet_delete_bufpool(struct xgene_enet_desc_ring *buf_pool)
{ … }
static void xgene_enet_delete_pagepool(struct xgene_enet_desc_ring *buf_pool)
{ … }
static irqreturn_t xgene_enet_rx_irq(const int irq, void *data)
{ … }
static int xgene_enet_tx_completion(struct xgene_enet_desc_ring *cp_ring,
struct xgene_enet_raw_desc *raw_desc)
{ … }
static int xgene_enet_setup_mss(struct net_device *ndev, u32 mss)
{ … }
static int xgene_enet_work_msg(struct sk_buff *skb, u64 *hopinfo)
{ … }
static u16 xgene_enet_encode_len(u16 len)
{ … }
static void xgene_set_addr_len(__le64 *desc, u32 idx, dma_addr_t addr, u32 len)
{ … }
static __le64 *xgene_enet_get_exp_bufs(struct xgene_enet_desc_ring *ring)
{ … }
static dma_addr_t *xgene_get_frag_dma_array(struct xgene_enet_desc_ring *ring)
{ … }
static int xgene_enet_setup_tx_desc(struct xgene_enet_desc_ring *tx_ring,
struct sk_buff *skb)
{ … }
static netdev_tx_t xgene_enet_start_xmit(struct sk_buff *skb,
struct net_device *ndev)
{ … }
static void xgene_enet_rx_csum(struct sk_buff *skb)
{ … }
static void xgene_enet_free_pagepool(struct xgene_enet_desc_ring *buf_pool,
struct xgene_enet_raw_desc *raw_desc,
struct xgene_enet_raw_desc *exp_desc)
{ … }
static bool xgene_enet_errata_10GE_10(struct sk_buff *skb, u32 len, u8 status)
{ … }
static bool xgene_enet_errata_10GE_8(struct sk_buff *skb, u32 len, u8 status)
{ … }
static int xgene_enet_rx_frame(struct xgene_enet_desc_ring *rx_ring,
struct xgene_enet_raw_desc *raw_desc,
struct xgene_enet_raw_desc *exp_desc)
{ … }
static bool is_rx_desc(struct xgene_enet_raw_desc *raw_desc)
{ … }
static int xgene_enet_process_ring(struct xgene_enet_desc_ring *ring,
int budget)
{ … }
static int xgene_enet_napi(struct napi_struct *napi, const int budget)
{ … }
static void xgene_enet_timeout(struct net_device *ndev, unsigned int txqueue)
{ … }
static void xgene_enet_set_irq_name(struct net_device *ndev)
{ … }
static int xgene_enet_register_irq(struct net_device *ndev)
{ … }
static void xgene_enet_free_irq(struct net_device *ndev)
{ … }
static void xgene_enet_napi_enable(struct xgene_enet_pdata *pdata)
{ … }
static void xgene_enet_napi_disable(struct xgene_enet_pdata *pdata)
{ … }
static int xgene_enet_open(struct net_device *ndev)
{ … }
static int xgene_enet_close(struct net_device *ndev)
{ … }
static void xgene_enet_delete_ring(struct xgene_enet_desc_ring *ring)
{ … }
static void xgene_enet_delete_desc_rings(struct xgene_enet_pdata *pdata)
{ … }
static int xgene_enet_get_ring_size(struct device *dev,
enum xgene_enet_ring_cfgsize cfgsize)
{ … }
static void xgene_enet_free_desc_ring(struct xgene_enet_desc_ring *ring)
{ … }
static void xgene_enet_free_desc_rings(struct xgene_enet_pdata *pdata)
{ … }
static bool is_irq_mbox_required(struct xgene_enet_pdata *pdata,
struct xgene_enet_desc_ring *ring)
{ … }
static void __iomem *xgene_enet_ring_cmd_base(struct xgene_enet_pdata *pdata,
struct xgene_enet_desc_ring *ring)
{ … }
static struct xgene_enet_desc_ring *xgene_enet_create_desc_ring(
struct net_device *ndev, u32 ring_num,
enum xgene_enet_ring_cfgsize cfgsize, u32 ring_id)
{ … }
static u16 xgene_enet_get_ring_id(enum xgene_ring_owner owner, u8 bufnum)
{ … }
static enum xgene_ring_owner xgene_derive_ring_owner(struct xgene_enet_pdata *p)
{ … }
static u8 xgene_start_cpu_bufnum(struct xgene_enet_pdata *pdata)
{ … }
static int xgene_enet_create_desc_rings(struct net_device *ndev)
{ … }
static void xgene_enet_get_stats64(
struct net_device *ndev,
struct rtnl_link_stats64 *stats)
{ … }
static int xgene_enet_set_mac_address(struct net_device *ndev, void *addr)
{ … }
static int xgene_change_mtu(struct net_device *ndev, int new_mtu)
{ … }
static const struct net_device_ops xgene_ndev_ops = …;
#ifdef CONFIG_ACPI
static void xgene_get_port_id_acpi(struct device *dev,
struct xgene_enet_pdata *pdata)
{ … }
#endif
static void xgene_get_port_id_dt(struct device *dev, struct xgene_enet_pdata *pdata)
{ … }
static int xgene_get_tx_delay(struct xgene_enet_pdata *pdata)
{ … }
static int xgene_get_rx_delay(struct xgene_enet_pdata *pdata)
{ … }
static int xgene_enet_get_irqs(struct xgene_enet_pdata *pdata)
{ … }
static void xgene_enet_check_phy_handle(struct xgene_enet_pdata *pdata)
{ … }
static void xgene_enet_gpiod_get(struct xgene_enet_pdata *pdata)
{ … }
static int xgene_enet_get_resources(struct xgene_enet_pdata *pdata)
{ … }
static int xgene_enet_init_hw(struct xgene_enet_pdata *pdata)
{ … }
static void xgene_enet_setup_ops(struct xgene_enet_pdata *pdata)
{ … }
static void xgene_enet_napi_add(struct xgene_enet_pdata *pdata)
{ … }
#ifdef CONFIG_ACPI
static const struct acpi_device_id xgene_enet_acpi_match[] = …;
MODULE_DEVICE_TABLE(acpi, xgene_enet_acpi_match);
#endif
static const struct of_device_id xgene_enet_of_match[] = …;
MODULE_DEVICE_TABLE(of, xgene_enet_of_match);
static int xgene_enet_probe(struct platform_device *pdev)
{ … }
static void xgene_enet_remove(struct platform_device *pdev)
{ … }
static void xgene_enet_shutdown(struct platform_device *pdev)
{ … }
static struct platform_driver xgene_enet_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;