linux/drivers/ntb/hw/intel/ntb_hw_intel.h

/*
 * This file is provided under a dual BSD/GPLv2 license.  When using or
 *   redistributing this file, you may do so under either license.
 *
 *   GPL LICENSE SUMMARY
 *
 *   Copyright(c) 2012 Intel Corporation. All rights reserved.
 *   Copyright (C) 2015 EMC Corporation. All Rights Reserved.
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of version 2 of the GNU General Public License as
 *   published by the Free Software Foundation.
 *
 *   BSD LICENSE
 *
 *   Copyright(c) 2012 Intel Corporation. All rights reserved.
 *   Copyright (C) 2015 EMC Corporation. All Rights Reserved.
 *
 *   Redistribution and use in source and binary forms, with or without
 *   modification, are permitted provided that the following conditions
 *   are met:
 *
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copy
 *       notice, this list of conditions and the following disclaimer in
 *       the documentation and/or other materials provided with the
 *       distribution.
 *     * Neither the name of Intel Corporation nor the names of its
 *       contributors may be used to endorse or promote products derived
 *       from this software without specific prior written permission.
 *
 *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * Intel PCIe NTB Linux driver
 */

#ifndef NTB_HW_INTEL_H
#define NTB_HW_INTEL_H

#include <linux/ntb.h>
#include <linux/pci.h>
#include <linux/io-64-nonatomic-lo-hi.h>

/* PCI device IDs */
#define PCI_DEVICE_ID_INTEL_NTB_B2B_JSF
#define PCI_DEVICE_ID_INTEL_NTB_PS_JSF
#define PCI_DEVICE_ID_INTEL_NTB_SS_JSF
#define PCI_DEVICE_ID_INTEL_NTB_B2B_SNB
#define PCI_DEVICE_ID_INTEL_NTB_PS_SNB
#define PCI_DEVICE_ID_INTEL_NTB_SS_SNB
#define PCI_DEVICE_ID_INTEL_NTB_B2B_IVT
#define PCI_DEVICE_ID_INTEL_NTB_PS_IVT
#define PCI_DEVICE_ID_INTEL_NTB_SS_IVT
#define PCI_DEVICE_ID_INTEL_NTB_B2B_HSX
#define PCI_DEVICE_ID_INTEL_NTB_PS_HSX
#define PCI_DEVICE_ID_INTEL_NTB_SS_HSX
#define PCI_DEVICE_ID_INTEL_NTB_B2B_BDX
#define PCI_DEVICE_ID_INTEL_NTB_PS_BDX
#define PCI_DEVICE_ID_INTEL_NTB_SS_BDX
#define PCI_DEVICE_ID_INTEL_NTB_B2B_SKX
#define PCI_DEVICE_ID_INTEL_NTB_B2B_ICX
#define PCI_DEVICE_ID_INTEL_NTB_B2B_GNR

/* Ntb control and link status */
#define NTB_CTL_CFG_LOCK
#define NTB_CTL_DISABLE
#define NTB_CTL_S2P_BAR2_SNOOP
#define NTB_CTL_P2S_BAR2_SNOOP
#define NTB_CTL_S2P_BAR4_SNOOP
#define NTB_CTL_P2S_BAR4_SNOOP
#define NTB_CTL_S2P_BAR5_SNOOP
#define NTB_CTL_P2S_BAR5_SNOOP

#define NTB_LNK_STA_ACTIVE_BIT
#define NTB_LNK_STA_SPEED_MASK
#define NTB_LNK_STA_WIDTH_MASK
#define NTB_LNK_STA_ACTIVE(x)
#define NTB_LNK_STA_SPEED(x)
#define NTB_LNK_STA_WIDTH(x)

/* flags to indicate unsafe api */
#define NTB_UNSAFE_DB
#define NTB_UNSAFE_SPAD

#define NTB_BAR_MASK_64
#define NTB_BAR_MASK_32

struct intel_ntb_dev;

struct intel_ntb_reg {};

struct intel_ntb_alt_reg {};

struct intel_ntb_xlat_reg {};

struct intel_b2b_addr {};

struct intel_ntb_vec {};

struct intel_ntb_dev {};

#define ntb_ndev(__ntb)
#define hb_ndev(__work)

static inline int pdev_is_gen1(struct pci_dev *pdev)
{}

static inline int pdev_is_gen3(struct pci_dev *pdev)
{}

static inline int pdev_is_gen4(struct pci_dev *pdev)
{}

static inline int pdev_is_gen5(struct pci_dev *pdev)
{}

#endif