linux/drivers/net/ethernet/netronome/nfp/nfp_main.c

// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
/* Copyright (C) 2015-2018 Netronome Systems, Inc. */

/*
 * nfp_main.c
 * Authors: Jakub Kicinski <[email protected]>
 *          Alejandro Lucero <[email protected]>
 *          Jason McMullan <[email protected]>
 *          Rolf Neugebauer <[email protected]>
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/pci.h>
#include <linux/firmware.h>
#include <linux/vmalloc.h>
#include <net/devlink.h>

#include "nfpcore/nfp.h"
#include "nfpcore/nfp_cpp.h"
#include "nfpcore/nfp_dev.h"
#include "nfpcore/nfp_nffw.h"
#include "nfpcore/nfp_nsp.h"

#include "nfpcore/nfp6000_pcie.h"

#include "nfp_abi.h"
#include "nfp_app.h"
#include "nfp_main.h"
#include "nfp_net.h"

static const char nfp_driver_name[] =;

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

int nfp_pf_rtsym_read_optional(struct nfp_pf *pf, const char *format,
			       unsigned int default_val)
{}

u8 __iomem *
nfp_pf_map_rtsym(struct nfp_pf *pf, const char *name, const char *sym_fmt,
		 unsigned int min_size, struct nfp_cpp_area **area)
{}

/* Callers should hold the devlink instance lock */
int nfp_mbox_cmd(struct nfp_pf *pf, u32 cmd, void *in_data, u64 in_length,
		 void *out_data, u64 out_length)
{}

static bool nfp_board_ready(struct nfp_pf *pf)
{}

static int nfp_pf_board_state_wait(struct nfp_pf *pf)
{}

static int nfp_pcie_sriov_read_nfd_limit(struct nfp_pf *pf)
{}

static int nfp_pcie_sriov_enable(struct pci_dev *pdev, int num_vfs)
{}

static int nfp_pcie_sriov_disable(struct pci_dev *pdev)
{}

static int nfp_pcie_sriov_configure(struct pci_dev *pdev, int num_vfs)
{}

int nfp_flash_update_common(struct nfp_pf *pf, const struct firmware *fw,
			    struct netlink_ext_ack *extack)
{}

static const struct firmware *
nfp_net_fw_request(struct pci_dev *pdev, struct nfp_pf *pf, const char *name)
{}

/**
 * nfp_net_fw_find() - Find the correct firmware image for netdev mode
 * @pdev:	PCI Device structure
 * @pf:		NFP PF Device structure
 *
 * Return: firmware if found and requested successfully.
 */
static const struct firmware *
nfp_net_fw_find(struct pci_dev *pdev, struct nfp_pf *pf)
{}

static int
nfp_get_fw_policy_value(struct pci_dev *pdev, struct nfp_nsp *nsp,
			const char *key, const char *default_val, int max_val,
			int *value)
{}

/**
 * nfp_fw_load() - Load the firmware image
 * @pdev:       PCI Device structure
 * @pf:		NFP PF Device structure
 * @nsp:	NFP SP handle
 *
 * Return: -ERRNO, 0 for no firmware loaded, 1 for firmware loaded
 */
static int
nfp_fw_load(struct pci_dev *pdev, struct nfp_pf *pf, struct nfp_nsp *nsp)
{}

static void
nfp_nsp_init_ports(struct pci_dev *pdev, struct nfp_pf *pf,
		   struct nfp_nsp *nsp)
{}

static int nfp_nsp_init(struct pci_dev *pdev, struct nfp_pf *pf)
{}

static void nfp_fw_unload(struct nfp_pf *pf)
{}

static int nfp_pf_find_rtsyms(struct nfp_pf *pf)
{}

int nfp_net_pf_get_app_id(struct nfp_pf *pf)
{}

static u64 nfp_net_pf_get_app_cap(struct nfp_pf *pf)
{}

static void nfp_pf_cfg_hwinfo(struct nfp_pf *pf)
{}

static int nfp_pci_probe(struct pci_dev *pdev,
			 const struct pci_device_id *pci_id)
{}

static void __nfp_pci_shutdown(struct pci_dev *pdev, bool unload_fw)
{}

static void nfp_pci_remove(struct pci_dev *pdev)
{}

static void nfp_pci_shutdown(struct pci_dev *pdev)
{}

static struct pci_driver nfp_pci_driver =;

static int __init nfp_main_init(void)
{}

static void __exit nfp_main_exit(void)
{}

module_init();
module_exit(nfp_main_exit);

MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();

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