2 * Copyright (c) 2015-2016 Quantenna Communications, Inc.
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
17 #ifndef _QTN_FMAC_PCIE_H_
18 #define _QTN_FMAC_PCIE_H_
20 #include <linux/dma-mapping.h>
23 #include "pcie_regs_pearl.h"
29 struct qtnf_pcie_bus_priv {
32 /* lock for irq configuration changes */
35 /* lock for tx reclaim operations */
36 spinlock_t tx_reclaim_lock;
37 /* lock for tx0 operations */
43 struct workqueue_struct *workqueue;
44 struct tasklet_struct reclaim_tq;
46 void __iomem *sysctl_bar;
47 void __iomem *epmem_bar;
48 void __iomem *dmareg_bar;
50 struct qtnf_shm_ipc shm_ipc_ep_in;
51 struct qtnf_shm_ipc shm_ipc_ep_out;
53 struct qtnf_pcie_bda __iomem *bda;
54 void __iomem *pcie_reg_base;
59 struct sk_buff **tx_skb;
60 struct sk_buff **rx_skb;
62 struct qtnf_tx_bd *tx_bd_vbase;
63 dma_addr_t tx_bd_pbase;
65 struct qtnf_rx_bd *rx_bd_vbase;
66 dma_addr_t rx_bd_pbase;
68 dma_addr_t bd_table_paddr;
80 /* diagnostics stats */
82 u32 pcie_irq_rx_count;
83 u32 pcie_irq_tx_count;
84 u32 pcie_irq_uf_count;
91 #endif /* _QTN_FMAC_PCIE_H_ */