#include <linux/delay.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/ntb.h>
#define NTB_EPF_COMMAND …
#define CMD_CONFIGURE_DOORBELL …
#define CMD_TEARDOWN_DOORBELL …
#define CMD_CONFIGURE_MW …
#define CMD_TEARDOWN_MW …
#define CMD_LINK_UP …
#define CMD_LINK_DOWN …
#define NTB_EPF_ARGUMENT …
#define MSIX_ENABLE …
#define NTB_EPF_CMD_STATUS …
#define COMMAND_STATUS_OK …
#define COMMAND_STATUS_ERROR …
#define NTB_EPF_LINK_STATUS …
#define LINK_STATUS_UP …
#define NTB_EPF_TOPOLOGY …
#define NTB_EPF_LOWER_ADDR …
#define NTB_EPF_UPPER_ADDR …
#define NTB_EPF_LOWER_SIZE …
#define NTB_EPF_UPPER_SIZE …
#define NTB_EPF_MW_COUNT …
#define NTB_EPF_MW1_OFFSET …
#define NTB_EPF_SPAD_OFFSET …
#define NTB_EPF_SPAD_COUNT …
#define NTB_EPF_DB_ENTRY_SIZE …
#define NTB_EPF_DB_DATA(n) …
#define NTB_EPF_DB_OFFSET(n) …
#define NTB_EPF_MIN_DB_COUNT …
#define NTB_EPF_MAX_DB_COUNT …
#define NTB_EPF_COMMAND_TIMEOUT …
enum pci_barno { … };
struct ntb_epf_dev { … };
#define ntb_ndev(__ntb) …
struct ntb_epf_data { … };
static int ntb_epf_send_command(struct ntb_epf_dev *ndev, u32 command,
u32 argument)
{ … }
static int ntb_epf_mw_to_bar(struct ntb_epf_dev *ndev, int idx)
{ … }
static int ntb_epf_mw_count(struct ntb_dev *ntb, int pidx)
{ … }
static int ntb_epf_mw_get_align(struct ntb_dev *ntb, int pidx, int idx,
resource_size_t *addr_align,
resource_size_t *size_align,
resource_size_t *size_max)
{ … }
static u64 ntb_epf_link_is_up(struct ntb_dev *ntb,
enum ntb_speed *speed,
enum ntb_width *width)
{ … }
static u32 ntb_epf_spad_read(struct ntb_dev *ntb, int idx)
{ … }
static int ntb_epf_spad_write(struct ntb_dev *ntb,
int idx, u32 val)
{ … }
static u32 ntb_epf_peer_spad_read(struct ntb_dev *ntb, int pidx, int idx)
{ … }
static int ntb_epf_peer_spad_write(struct ntb_dev *ntb, int pidx,
int idx, u32 val)
{ … }
static int ntb_epf_link_enable(struct ntb_dev *ntb,
enum ntb_speed max_speed,
enum ntb_width max_width)
{ … }
static int ntb_epf_link_disable(struct ntb_dev *ntb)
{ … }
static irqreturn_t ntb_epf_vec_isr(int irq, void *dev)
{ … }
static int ntb_epf_init_isr(struct ntb_epf_dev *ndev, int msi_min, int msi_max)
{ … }
static int ntb_epf_peer_mw_count(struct ntb_dev *ntb)
{ … }
static int ntb_epf_spad_count(struct ntb_dev *ntb)
{ … }
static u64 ntb_epf_db_valid_mask(struct ntb_dev *ntb)
{ … }
static int ntb_epf_db_set_mask(struct ntb_dev *ntb, u64 db_bits)
{ … }
static int ntb_epf_mw_set_trans(struct ntb_dev *ntb, int pidx, int idx,
dma_addr_t addr, resource_size_t size)
{ … }
static int ntb_epf_mw_clear_trans(struct ntb_dev *ntb, int pidx, int idx)
{ … }
static int ntb_epf_peer_mw_get_addr(struct ntb_dev *ntb, int idx,
phys_addr_t *base, resource_size_t *size)
{ … }
static int ntb_epf_peer_db_set(struct ntb_dev *ntb, u64 db_bits)
{ … }
static u64 ntb_epf_db_read(struct ntb_dev *ntb)
{ … }
static int ntb_epf_db_clear_mask(struct ntb_dev *ntb, u64 db_bits)
{ … }
static int ntb_epf_db_clear(struct ntb_dev *ntb, u64 db_bits)
{ … }
static const struct ntb_dev_ops ntb_epf_ops = …;
static inline void ntb_epf_init_struct(struct ntb_epf_dev *ndev,
struct pci_dev *pdev)
{ … }
static int ntb_epf_init_dev(struct ntb_epf_dev *ndev)
{ … }
static int ntb_epf_init_pci(struct ntb_epf_dev *ndev,
struct pci_dev *pdev)
{ … }
static void ntb_epf_deinit_pci(struct ntb_epf_dev *ndev)
{ … }
static void ntb_epf_cleanup_isr(struct ntb_epf_dev *ndev)
{ … }
static int ntb_epf_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
{ … }
static void ntb_epf_pci_remove(struct pci_dev *pdev)
{ … }
static const struct ntb_epf_data j721e_data = …;
static const struct ntb_epf_data mx8_data = …;
static const struct pci_device_id ntb_epf_pci_tbl[] = …;
static struct pci_driver ntb_epf_pci_driver = …;
module_pci_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;