linux/drivers/net/wireless/marvell/mwifiex/pcie.h

/* SPDX-License-Identifier: GPL-2.0-only */
/* @file mwifiex_pcie.h
 *
 * @brief This file contains definitions for PCI-E interface.
 * driver.
 *
 * Copyright 2011-2020 NXP
 */

#ifndef	_MWIFIEX_PCIE_H
#define _MWIFIEX_PCIE_H

#include    <linux/completion.h>
#include    <linux/pci.h>
#include    <linux/interrupt.h>

#include    "decl.h"
#include    "main.h"

#define PCIE8766_DEFAULT_FW_NAME
#define PCIE8897_DEFAULT_FW_NAME
#define PCIE8897_A0_FW_NAME
#define PCIE8897_B0_FW_NAME
#define PCIEUART8997_FW_NAME_V4
#define PCIEUSB8997_FW_NAME_V4

#define PCIE_VENDOR_ID_MARVELL
#define PCIE_VENDOR_ID_V2_MARVELL
#define PCIE_DEVICE_ID_MARVELL_88W8766P
#define PCIE_DEVICE_ID_MARVELL_88W8897
#define PCIE_DEVICE_ID_MARVELL_88W8997

#define PCIE8897_A0
#define PCIE8897_B0
#define PCIE8997_A0
#define PCIE8997_A1
#define CHIP_VER_PCIEUART
#define CHIP_MAGIC_VALUE

/* Constants for Buffer Descriptor (BD) rings */
#define MWIFIEX_MAX_TXRX_BD
#define MWIFIEX_TXBD_MASK
#define MWIFIEX_RXBD_MASK

#define MWIFIEX_MAX_EVT_BD
#define MWIFIEX_EVTBD_MASK

/* PCIE INTERNAL REGISTERS */
#define PCIE_SCRATCH_0_REG
#define PCIE_SCRATCH_1_REG
#define PCIE_CPU_INT_EVENT
#define PCIE_CPU_INT_STATUS
#define PCIE_HOST_INT_STATUS
#define PCIE_HOST_INT_MASK
#define PCIE_HOST_INT_STATUS_MASK
#define PCIE_SCRATCH_2_REG
#define PCIE_SCRATCH_3_REG
#define PCIE_SCRATCH_4_REG
#define PCIE_SCRATCH_5_REG
#define PCIE_SCRATCH_6_REG
#define PCIE_SCRATCH_7_REG
#define PCIE_SCRATCH_8_REG
#define PCIE_SCRATCH_9_REG
#define PCIE_SCRATCH_10_REG
#define PCIE_SCRATCH_11_REG
#define PCIE_SCRATCH_12_REG
#define PCIE_SCRATCH_13_REG
#define PCIE_SCRATCH_14_REG
#define PCIE_SCRATCH_15_REG
#define PCIE_RD_DATA_PTR_Q0_Q1
#define PCIE_WR_DATA_PTR_Q0_Q1

#define CPU_INTR_DNLD_RDY
#define CPU_INTR_DOOR_BELL
#define CPU_INTR_SLEEP_CFM_DONE
#define CPU_INTR_RESET
#define CPU_INTR_EVENT_DONE

#define HOST_INTR_DNLD_DONE
#define HOST_INTR_UPLD_RDY
#define HOST_INTR_CMD_DONE
#define HOST_INTR_EVENT_RDY
#define HOST_INTR_MASK

#define MWIFIEX_BD_FLAG_ROLLOVER_IND
#define MWIFIEX_BD_FLAG_FIRST_DESC
#define MWIFIEX_BD_FLAG_LAST_DESC
#define MWIFIEX_BD_FLAG_SOP
#define MWIFIEX_BD_FLAG_EOP
#define MWIFIEX_BD_FLAG_XS_SOP
#define MWIFIEX_BD_FLAG_XS_EOP
#define MWIFIEX_BD_FLAG_EVT_ROLLOVER_IND
#define MWIFIEX_BD_FLAG_RX_ROLLOVER_IND
#define MWIFIEX_BD_FLAG_TX_START_PTR
#define MWIFIEX_BD_FLAG_TX_ROLLOVER_IND

/* Max retry number of command write */
#define MAX_WRITE_IOMEM_RETRY
/* Define PCIE block size for firmware download */
#define MWIFIEX_PCIE_BLOCK_SIZE_FW_DNLD
/* FW awake cookie after FW ready */
#define FW_AWAKE_COOKIE
#define MWIFIEX_DEF_SLEEP_COOKIE
#define MWIFIEX_SLEEP_COOKIE_SIZE
#define MWIFIEX_MAX_DELAY_COUNT

#define MWIFIEX_PCIE_FLR_HAPPENS

struct mwifiex_pcie_card_reg {};

struct mwifiex_pcie_device {};

struct mwifiex_evt_buf_desc {} __packed;

struct mwifiex_pcie_buf_desc {} __packed;

struct mwifiex_pfu_buf_desc {} __packed;

#define MWIFIEX_NUM_MSIX_VECTORS

struct mwifiex_msix_context {};

struct pcie_service_card {};

static inline int
mwifiex_pcie_txbd_empty(struct pcie_service_card *card, u32 rdptr)
{}

static inline int
mwifiex_pcie_txbd_not_full(struct pcie_service_card *card)
{}

#endif /* _MWIFIEX_PCIE_H */