linux/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c

// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2020, Loongson Corporation
 */

#include <linux/clk-provider.h>
#include <linux/pci.h>
#include <linux/dmi.h>
#include <linux/device.h>
#include <linux/of_irq.h>
#include "stmmac.h"
#include "dwmac_dma.h"
#include "dwmac1000.h"

/* Normal Loongson Tx Summary */
#define DMA_INTR_ENA_NIE_TX_LOONGSON
/* Normal Loongson Rx Summary */
#define DMA_INTR_ENA_NIE_RX_LOONGSON

#define DMA_INTR_NORMAL_LOONGSON

/* Abnormal Loongson Tx Summary */
#define DMA_INTR_ENA_AIE_TX_LOONGSON
/* Abnormal Loongson Rx Summary */
#define DMA_INTR_ENA_AIE_RX_LOONGSON

#define DMA_INTR_ABNORMAL_LOONGSON

#define DMA_INTR_DEFAULT_MASK_LOONGSON

/* Normal Loongson Tx Interrupt Summary */
#define DMA_STATUS_NIS_TX_LOONGSON
/* Normal Loongson Rx Interrupt Summary */
#define DMA_STATUS_NIS_RX_LOONGSON

/* Abnormal Loongson Tx Interrupt Summary */
#define DMA_STATUS_AIS_TX_LOONGSON
/* Abnormal Loongson Rx Interrupt Summary */
#define DMA_STATUS_AIS_RX_LOONGSON

/* Fatal Loongson Tx Bus Error Interrupt */
#define DMA_STATUS_FBI_TX_LOONGSON
/* Fatal Loongson Rx Bus Error Interrupt */
#define DMA_STATUS_FBI_RX_LOONGSON

#define DMA_STATUS_MSK_COMMON_LOONGSON

#define DMA_STATUS_MSK_RX_LOONGSON

#define DMA_STATUS_MSK_TX_LOONGSON

#define PCI_DEVICE_ID_LOONGSON_GMAC
#define PCI_DEVICE_ID_LOONGSON_GNET
#define DWMAC_CORE_LS_MULTICHAN
#define CHANNEL_NUM

struct loongson_data {};

struct stmmac_pci_info {};

static void loongson_default_data(struct pci_dev *pdev,
				  struct plat_stmmacenet_data *plat)
{}

static int loongson_gmac_data(struct pci_dev *pdev,
			      struct plat_stmmacenet_data *plat)
{}

static struct stmmac_pci_info loongson_gmac_pci_info =;

static void loongson_gnet_fix_speed(void *priv, unsigned int speed,
				    unsigned int mode)
{}

static int loongson_gnet_data(struct pci_dev *pdev,
			      struct plat_stmmacenet_data *plat)
{}

static struct stmmac_pci_info loongson_gnet_pci_info =;

static void loongson_dwmac_dma_init_channel(struct stmmac_priv *priv,
					    void __iomem *ioaddr,
					    struct stmmac_dma_cfg *dma_cfg,
					    u32 chan)
{}

static int loongson_dwmac_dma_interrupt(struct stmmac_priv *priv,
					void __iomem *ioaddr,
					struct stmmac_extra_stats *x,
					u32 chan, u32 dir)
{}

static struct mac_device_info *loongson_dwmac_setup(void *apriv)
{}

static int loongson_dwmac_msi_config(struct pci_dev *pdev,
				     struct plat_stmmacenet_data *plat,
				     struct stmmac_resources *res)
{}

static void loongson_dwmac_msi_clear(struct pci_dev *pdev)
{}

static int loongson_dwmac_dt_config(struct pci_dev *pdev,
				    struct plat_stmmacenet_data *plat,
				    struct stmmac_resources *res)
{}

static void loongson_dwmac_dt_clear(struct pci_dev *pdev,
				    struct plat_stmmacenet_data *plat)
{}

static int loongson_dwmac_acpi_config(struct pci_dev *pdev,
				      struct plat_stmmacenet_data *plat,
				      struct stmmac_resources *res)
{}

static int loongson_dwmac_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{}

static void loongson_dwmac_remove(struct pci_dev *pdev)
{}

static int __maybe_unused loongson_dwmac_suspend(struct device *dev)
{}

static int __maybe_unused loongson_dwmac_resume(struct device *dev)
{}

static SIMPLE_DEV_PM_OPS(loongson_dwmac_pm_ops, loongson_dwmac_suspend,
			 loongson_dwmac_resume);

static const struct pci_device_id loongson_dwmac_id_table[] =;
MODULE_DEVICE_TABLE(pci, loongson_dwmac_id_table);

static struct pci_driver loongson_dwmac_driver =;

module_pci_driver();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_AUTHOR();
MODULE_LICENSE();