linux/drivers/net/ethernet/qualcomm/emac/emac.c

// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
 */

/* Qualcomm Technologies, Inc. EMAC Gigabit Ethernet Driver */

#include <linux/if_ether.h>
#include <linux/if_vlan.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_net.h>
#include <linux/phy.h>
#include <linux/platform_device.h>
#include <linux/acpi.h>
#include "emac.h"
#include "emac-mac.h"
#include "emac-phy.h"
#include "emac-sgmii.h"

#define EMAC_MSG_DEFAULT

#define EMAC_RRD_SIZE
/* The RRD size if timestamping is enabled: */
#define EMAC_TS_RRD_SIZE
#define EMAC_TPD_SIZE
#define EMAC_RFD_SIZE

#define REG_MAC_RX_STATUS_BIN
#define REG_MAC_RX_STATUS_END
#define REG_MAC_TX_STATUS_BIN
#define REG_MAC_TX_STATUS_END

#define RXQ0_NUM_RFD_PREF_DEF
#define TXQ0_NUM_TPD_PREF_DEF

#define EMAC_PREAMBLE_DEF

#define DMAR_DLY_CNT_DEF
#define DMAW_DLY_CNT_DEF

#define IMR_NORMAL_MASK

#define ISR_TX_PKT

#define ISR_OVER

#define ISR_ERROR

/* in sync with enum emac_clk_id */
static const char * const emac_clk_name[] =;

void emac_reg_update32(void __iomem *addr, u32 mask, u32 val)
{}

/* reinitialize */
int emac_reinit_locked(struct emac_adapter *adpt)
{}

/* NAPI */
static int emac_napi_rtx(struct napi_struct *napi, int budget)
{}

/* Transmit the packet */
static netdev_tx_t emac_start_xmit(struct sk_buff *skb,
				   struct net_device *netdev)
{}

static irqreturn_t emac_isr(int _irq, void *data)
{}

/* Configure VLAN tag strip/insert feature */
static int emac_set_features(struct net_device *netdev,
			     netdev_features_t features)
{}

/* Configure Multicast and Promiscuous modes */
static void emac_rx_mode_set(struct net_device *netdev)
{}

/* Change the Maximum Transfer Unit (MTU) */
static int emac_change_mtu(struct net_device *netdev, int new_mtu)
{}

/* Called when the network interface is made active */
static int emac_open(struct net_device *netdev)
{}

/* Called when the network interface is disabled */
static int emac_close(struct net_device *netdev)
{}

/* Respond to a TX hang */
static void emac_tx_timeout(struct net_device *netdev, unsigned int txqueue)
{}

/**
 * emac_update_hw_stats - read the EMAC stat registers
 * @adpt: pointer to adapter struct
 *
 * Reads the stats registers and write the values to adpt->stats.
 *
 * adpt->stats.lock must be held while calling this function,
 * and while reading from adpt->stats.
 */
void emac_update_hw_stats(struct emac_adapter *adpt)
{}

/* Provide network statistics info for the interface */
static void emac_get_stats64(struct net_device *netdev,
			     struct rtnl_link_stats64 *net_stats)
{}

static const struct net_device_ops emac_netdev_ops =;

/* Watchdog task routine, called to reinitialize the EMAC */
static void emac_work_thread(struct work_struct *work)
{}

/* Initialize various data structures  */
static void emac_init_adapter(struct emac_adapter *adpt)
{}

/* Get the clock */
static int emac_clks_get(struct platform_device *pdev,
			 struct emac_adapter *adpt)
{}

/* Initialize clocks */
static int emac_clks_phase1_init(struct platform_device *pdev,
				 struct emac_adapter *adpt)
{}

/* Enable clocks; needs emac_clks_phase1_init to be called before */
static int emac_clks_phase2_init(struct platform_device *pdev,
				 struct emac_adapter *adpt)
{}

static void emac_clks_teardown(struct emac_adapter *adpt)
{}

/* Get the resources */
static int emac_probe_resources(struct platform_device *pdev,
				struct emac_adapter *adpt)
{}

static const struct of_device_id emac_dt_match[] =;
MODULE_DEVICE_TABLE(of, emac_dt_match);

#if IS_ENABLED(CONFIG_ACPI)
static const struct acpi_device_id emac_acpi_match[] =;
MODULE_DEVICE_TABLE(acpi, emac_acpi_match);
#endif

static int emac_probe(struct platform_device *pdev)
{}

static void emac_remove(struct platform_device *pdev)
{}

static void emac_shutdown(struct platform_device *pdev)
{}

static struct platform_driver emac_platform_driver =;

module_platform_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_ALIAS();