linux/drivers/crypto/cavium/nitrox/nitrox_main.c

// SPDX-License-Identifier: GPL-2.0-only
#include <linux/delay.h>
#include <linux/firmware.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/pci.h>
#include <linux/pci_ids.h>

#include "nitrox_dev.h"
#include "nitrox_common.h"
#include "nitrox_csr.h"
#include "nitrox_hal.h"
#include "nitrox_isr.h"
#include "nitrox_debugfs.h"

#define CNN55XX_DEV_ID
#define UCODE_HLEN
#define DEFAULT_SE_GROUP
#define DEFAULT_AE_GROUP

#define DRIVER_VERSION
#define CNN55XX_UCD_BLOCK_SIZE
#define CNN55XX_MAX_UCODE_SIZE
#define FW_DIR
/* SE microcode */
#define SE_FW
/* AE microcode */
#define AE_FW

static const char nitrox_driver_name[] =;

static LIST_HEAD(ndevlist);
static DEFINE_MUTEX(devlist_lock);
static unsigned int num_devices;

/*
 * nitrox_pci_tbl - PCI Device ID Table
 */
static const struct pci_device_id nitrox_pci_tbl[] =;
MODULE_DEVICE_TABLE(pci, nitrox_pci_tbl);

static unsigned int qlen =;
module_param(qlen, uint, 0644);
MODULE_PARM_DESC();

/**
 * struct ucode - Firmware Header
 * @id: microcode ID
 * @version: firmware version
 * @code_size: code section size
 * @raz: alignment
 * @code: code section
 */
struct ucode {};

/*
 * write_to_ucd_unit - Write Firmware to NITROX UCD unit
 */
static void write_to_ucd_unit(struct nitrox_device *ndev, u32 ucode_size,
			      u64 *ucode_data, int block_num)
{}

static int nitrox_load_fw(struct nitrox_device *ndev)
{}

/**
 * nitrox_add_to_devlist - add NITROX device to global device list
 * @ndev: NITROX device
 */
static int nitrox_add_to_devlist(struct nitrox_device *ndev)
{}

/**
 * nitrox_remove_from_devlist - remove NITROX device from
 *   global device list
 * @ndev: NITROX device
 */
static void nitrox_remove_from_devlist(struct nitrox_device *ndev)
{}

struct nitrox_device *nitrox_get_first_device(void)
{}

void nitrox_put_device(struct nitrox_device *ndev)
{}

static int nitrox_device_flr(struct pci_dev *pdev)
{}

static int nitrox_pf_sw_init(struct nitrox_device *ndev)
{}

static void nitrox_pf_sw_cleanup(struct nitrox_device *ndev)
{}

/**
 * nitrox_bist_check - Check NITROX BIST registers status
 * @ndev: NITROX device
 */
static int nitrox_bist_check(struct nitrox_device *ndev)
{}

static int nitrox_pf_hw_init(struct nitrox_device *ndev)
{}

/**
 * nitrox_probe - NITROX Initialization function.
 * @pdev: PCI device information struct
 * @id: entry in nitrox_pci_tbl
 *
 * Return: 0, if the driver is bound to the device, or
 *         a negative error if there is failure.
 */
static int nitrox_probe(struct pci_dev *pdev,
			const struct pci_device_id *id)
{}

/**
 * nitrox_remove - Unbind the driver from the device.
 * @pdev: PCI device information struct
 */
static void nitrox_remove(struct pci_dev *pdev)
{}

static void nitrox_shutdown(struct pci_dev *pdev)
{}

static struct pci_driver nitrox_driver =;

module_pci_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_VERSION();
MODULE_FIRMWARE();