qtnfmac_pcie: separate platform-independent PCIe structure
Move platform-independent PCIe data structure to a separate header file so it can be reused by different devices. Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Šī revīzija ir iekļauta:

revīziju iesūtīja
Kalle Valo

vecāks
21077d09b4
revīzija
c9ff6c9157
70
drivers/net/wireless/quantenna/qtnfmac/pcie/pcie_priv.h
Parasts fails
70
drivers/net/wireless/quantenna/qtnfmac/pcie/pcie_priv.h
Parasts fails
@@ -0,0 +1,70 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/* Copyright (c) 2018 Quantenna Communications, Inc. All rights reserved. */
|
||||
|
||||
#ifndef _QTN_FMAC_PCIE_H_
|
||||
#define _QTN_FMAC_PCIE_H_
|
||||
|
||||
#include <linux/pci.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
#include "shm_ipc.h"
|
||||
|
||||
#define SKB_BUF_SIZE 2048
|
||||
|
||||
#define QTN_FW_DL_TIMEOUT_MS 3000
|
||||
#define QTN_FW_QLINK_TIMEOUT_MS 30000
|
||||
#define QTN_EP_RESET_WAIT_MS 1000
|
||||
|
||||
struct qtnf_pcie_bus_priv {
|
||||
struct pci_dev *pdev;
|
||||
|
||||
spinlock_t tx_reclaim_lock;
|
||||
spinlock_t tx_lock;
|
||||
int mps;
|
||||
|
||||
struct workqueue_struct *workqueue;
|
||||
struct tasklet_struct reclaim_tq;
|
||||
|
||||
void __iomem *sysctl_bar;
|
||||
void __iomem *epmem_bar;
|
||||
void __iomem *dmareg_bar;
|
||||
|
||||
struct qtnf_shm_ipc shm_ipc_ep_in;
|
||||
struct qtnf_shm_ipc shm_ipc_ep_out;
|
||||
|
||||
u16 tx_bd_num;
|
||||
u16 rx_bd_num;
|
||||
|
||||
struct sk_buff **tx_skb;
|
||||
struct sk_buff **rx_skb;
|
||||
|
||||
u32 rx_bd_w_index;
|
||||
u32 rx_bd_r_index;
|
||||
|
||||
u32 tx_bd_w_index;
|
||||
u32 tx_bd_r_index;
|
||||
|
||||
/* diagnostics stats */
|
||||
u32 pcie_irq_count;
|
||||
u32 tx_full_count;
|
||||
u32 tx_done_count;
|
||||
u32 tx_reclaim_done;
|
||||
u32 tx_reclaim_req;
|
||||
|
||||
u8 msi_enabled;
|
||||
u8 tx_stopped;
|
||||
};
|
||||
|
||||
static inline void qtnf_non_posted_write(u32 val, void __iomem *basereg)
|
||||
{
|
||||
writel(val, basereg);
|
||||
|
||||
/* flush posted write */
|
||||
readl(basereg);
|
||||
}
|
||||
|
||||
#endif /* _QTN_FMAC_PCIE_H_ */
|
Failā izmaiņas netiks attēlotas, jo tās ir par lielu
Ielādēt izmaiņas
@@ -43,11 +43,6 @@
|
||||
#define QTN_RC_FW_LOADRDY BIT(8)
|
||||
#define QTN_RC_FW_SYNC BIT(9)
|
||||
|
||||
/* state transition timeouts */
|
||||
#define QTN_FW_DL_TIMEOUT_MS 3000
|
||||
#define QTN_FW_QLINK_TIMEOUT_MS 30000
|
||||
#define QTN_EP_RESET_WAIT_MS 1000
|
||||
|
||||
#define PCIE_HDP_INT_RX_BITS (0 \
|
||||
| PCIE_HDP_INT_EP_TXDMA \
|
||||
| PCIE_HDP_INT_EP_TXEMPTY \
|
||||
@@ -77,8 +72,6 @@
|
||||
#define PCIE_BDA_NAMELEN 32
|
||||
#define PCIE_HHBM_MAX_SIZE 2048
|
||||
|
||||
#define SKB_BUF_SIZE 2048
|
||||
|
||||
#define QTN_PCIE_BOARDFLG "PCIEQTN"
|
||||
#define QTN_PCIE_FW_DLMASK 0xF
|
||||
#define QTN_PCIE_FW_BUFSZ 2048
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user