AFHBA404
AFHBA404 connects ACQ2106 to PCI-Express
acq-fiber-hba.h
Go to the documentation of this file.
1 /* ------------------------------------------------------------------------- *
2  * acq-fiber-hba.h
3  * ------------------------------------------------------------------------- *
4  * Copyright (C) 2014 Peter Milne, D-TACQ Solutions Ltd
5  * <peter dot milne at D hyphen TACQ dot com>
6  * www.d-tacq.com
7  * Created on: 10 Aug 2014
8  * Author: pgm
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of Version 2 of the GNU General Public License *
12  * as published by the Free Software Foundation; *
13  * *
14  * This program is distributed in the hope that it will be useful, *
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
17  * GNU General Public License for more details. *
18  * *
19  * You should have received a copy of the GNU General Public License *
20  * along with this program; if not, write to the Free Software *
21  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
22 /* ------------------------------------------------------------------------- */
23 
24 #ifndef ACQ_FIBER_HBA_H_
25 #define ACQ_FIBER_HBA_H_
26 
27 #include <linux/device.h>
28 #include <linux/delay.h>
29 #include <linux/interrupt.h>
30 #include <linux/fs.h>
31 #include <linux/ioctl.h>
32 #include <linux/kernel.h>
33 #include <linux/kthread.h>
34 #include <linux/list.h>
35 #include <linux/pci.h>
36 #include <linux/time.h>
37 #include <linux/init.h>
38 #include <linux/timex.h>
39 #include <linux/vmalloc.h>
40 #include <linux/mm.h>
41 #include <linux/moduleparam.h>
42 #include <linux/mutex.h>
43 
44 #include <linux/uaccess.h> /* VERIFY_READ|WRITE */
45 #include <linux/version.h>
46 
47 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
48 #include <uapi/linux/sched/types.h>
49 #endif
50 
51 #ifdef CONFIG_KERNEL_ASSERTS
52 /* kgdb stuff */
53 #define assert(p) KERNEL_ASSERT(#p, p)
54 #else
55 #define assert(p) do { \
56  if (!(p)) { \
57  printk(KERN_CRIT "BUG at %s:%d assert(%s)\n", \
58  __FILE__, __LINE__, #p); \
59  BUG(); \
60  } \
61 } while (0)
62 #endif
63 
64 
65 #define MAXDEV 8 /* maximum expected devices .. */
66 
67 
68 struct AFHBA_DEV;
69 
70 
71 #include "afhba_minor.h"
72 #include "afhba_debugfs.h"
73 #include "rtm-t_ioctl.h" /* retain previous API */
74 
75 #define REGS_BAR 0 /* @@todo assumed */
76 
77 #define MAP_COUNT_MAX 6
78 
79 #define MAP_COUNT_4G1 2
80 #define MAP_COUNT_4G2 4
81 
82 #define MAP_COUNT_4G4 6
83 
84 extern struct list_head afhba_devices;
85 
86 int afhba_registerDevice(struct AFHBA_DEV *tdev);
87 void afhba_deleteDevice(struct AFHBA_DEV *tdev);
89 struct AFHBA_DEV *afhba_lookupDeviceFromClass(struct device *dev);
91 struct AFHBA_DEV* afhba_lookupDev(struct device *dev);
92 int afhba_release(struct inode *inode, struct file *file);
93 
94 struct HostBuffer {
95  int ibuf;
96  void *va;
98  int len;
99  int req_len;
101  struct list_head list;
102  enum BSTATE {
105  u32 esta; /* error status */
107 };
108 
109 struct AFHBA_STREAM_DEV;
110 
111 struct AFHBA_DEV {
112  char name[16];
113  char mon_name[16];
114  char slot_name[16];
115  struct pci_dev *pci_dev;
116  struct device *class_dev;
117  int idx;
118  int major;
119  struct list_head list;
121 
122  struct PciMapping {
123  int bar;
125  void* va;
126  unsigned len;
127  struct resource *region;
128  char name[32];
131 
132  struct AFHBA_DEV* peer;
133  void* remote;
134  enum SFP { SFP_A, SFP_B, SFP_C, SFP_D } sfp;
135  unsigned ACR; /* Aurora Control Reg Offset */
136 
137  struct proc_dir_entry *proc_dir_root;
138  struct dentry* debug_dir;
139  char *debug_names;
140 
141  struct HostBuffer *hb1; /* single hb for LLC */
142 
144  struct file_operations* stream_fops;
145 
146  struct platform_device *hba_sfp_i2c[2];
147 
148  int link_up;
151 };
152 
153 #define SZM1(field) (sizeof(field)-1)
154 
155 
156 extern int afhba_stream_drv_init(struct AFHBA_DEV* adev);
157 extern int afhba_stream_drv_del(struct AFHBA_DEV* adev);
158 extern void afhba_create_sysfs_class(struct AFHBA_DEV *adev);
159 void afhba_remove_sysfs_class(struct AFHBA_DEV *adev);
160 void afhba_create_sysfs(struct AFHBA_DEV *adev);
161 void afhba_remove_sysfs(struct AFHBA_DEV *adev);
162 
164  int minor;
165  struct AFHBA_DEV *dev;
166  struct list_head my_buffers;
167  void* private;
168  int private2;
169 };
170 
171 
172 #define PSZ (sizeof (struct AFHBA_DEV_PATH))
173 #define PD(file) ((struct AFHBA_DEV_PATH *)(file)->private_data)
174 #define DEV(file) (PD(file)->dev)
175 
176 #define pdev(adev) (&(adev)->pci_dev->dev)
177 
178 #define LOC(adev) ((adev)->mappings[0].va)
179 #define REM(adev) ((adev)->remote)
180 
181 #define REGS_BAR 0
182 #define REMOTE_BAR 1
183 #define REMOTE_BAR2 2
184 #define NO_BAR -1
185 
186 
187 
188 /* REGS */
189 #define FPGA_REVISION_REG 0x0000 /* FPGA Revision Register */
190 #define HOST_PCIE_CONTROL_REG 0x0004 /* Host PCIe Control / Status Register */
191 #define HOST_PCIE_INTERRUPT_REG 0x0008 /* Host PCIe Interrupt Register Register */
192 #define PCI_CONTROL_STATUS_REG 0x000C /* PCI Control / Status Register */
193 #define PCIE_DEVICE_CONTROL_STATUS_REG 0x0010 /* PCIe Control / Status Register */
194 #define PCIE_LINK_CONTROL_STATUS_REG 0x0014 /* PCIe Link Control / Status Register */
195 #define PCIE_CONF_REG 0x0018 /* Host PCIe Configuration Reg */
196 #define PCIE_BUFFER_CTRL_REG 0x001C
197 #define HOST_TEST_REG 0x0020
198 #define HOST_COUNTER_REG 0x0024 /* Heart Beat Counter */
199 #define HOST_PCIE_DEBUG_REG 0x0028 /* Host PCIe Debug Register */
200 
201 #define HOST_PCIE_LATSTATS_1 0x0030
202 #define HOST_PCIE_LATSTATS_2 0x0034
203 
204 #define HOST_SPI_FLASH_CONTROL_REG 0x0040 /* SPI FLASH Control Register */
205 #define HOST_SPI_FLASH_DATA_REG 0x0044 /* SPI FLASH Data Register */
206 #define HOST_MON_REG 0x0048 /* Temperature Monitor/Volts Alarms */
207 
208 #define AURORA_STEP 0x0010 /* Duplicate blocks every STEP */
209 #define AURORA_CONTROL_REGA 0x0080 /* Aurora Control Register */
210 #define AURORA_STATUS_REGA 0x0084 /* Aurora Status Register */
211 #define SFP_I2C_DATA_REGA 0x0088 /* SFP I2C Control and Data Register */
212 #define AURORA_STATUS2_REGA 0x008C
213 
214 #define AURORA_CONTROL_REG(sfp) (AURORA_CONTROL_REGA + AURORA_STEP*(sfp))
215 #define AURORA_STATUS_REG(sfp) (AURORA_STATUS_REGA + AURORA_STEP*(sfp))
216 #define AURORA_STATUS2_REG(sfp) (AURORA_STATUS2_REGA + AURORA_STEP*(sfp))
217 #define SFP_I2C_DATA_REG(sfp) (SFP_I2C_DATA_REGA + AURORA_STEP*(sfp))
218 
219 #define HOST_COMMS_FIFO_CONTROL_REG 0x00C0 /* ACQ400 Receive Communications FIFO Control Register */
220 #define HOST_COMMS_FIFO_STATUS_REG 0x00C4 /* ACQ400 Receive Communications FIFO Status Register */
221 #define ACQ400_COMMS_READ 0x0400 /* ACQ400 Receive Communications FIFO data */
222 
223 
224 #define ASR(acr) ((acr)+4)
225 #define I2C(acr) ((acr)+8)
226 
227 
228 #define SFP_I2C_SCL1_R 0
229 #define SFP_I2C_SDA1_R 1
230 #define SFP_I2C_SCL1_W 8
231 #define SFP_I2C_SDA1_W 9
232 #define SFP_I2C_SCL2_R 0
233 #define SFP_I2C_SDA2_R 1
234 #define SFP_I2C_SCL2_W 8
235 #define SFP_I2C_SDA2_W 9
236 
237 #define AFHBA_SPI_BUSY (1<<31)
238 #define AFHBA_SPI_CTL_START (1<<7)
239 #define AFHBA_SPI_CS (1<<0)
240 #define AFHBA_SPI_HOLD (1<<1)
241 #define AFHBA_SPI_WP (1<<2)
242 
243 #define AFHBA_AURORA_CTRL_ENA (1<<31)
244 #define AFHBA_AURORA_CTRL_TXDIS (1<<16)
245 #define AFHBA_AURORA_CTRL_CLR (1<<7)
246 #define AFHBA_AURORA_CTRL_PWR_DWN (1<<4)
247 #define AFHBA_AURORA_CTRL_LOOPBACK (0x7)
248 
249 #define AFHBA_AURORA_STAT_SFP_PRESENTn (1<<31)
250 #define AFHBA_AURORA_STAT_SFP_LOS (1<<30)
251 #define AFHBA_AURORA_STAT_SFP_TX_FAULT (1<<29)
252 #define AFHBA_AURORA_STAT_HARD_ERR (1<<6)
253 #define AFHBA_AURORA_STAT_SOFT_ERR (1<<5)
254 #define AFHBA_AURORA_STAT_FRAME_ERR (1<<4)
255 #define AFHBA_AURORA_STAT_CHANNEL_UP (1<<1)
256 #define AFHBA_AURORA_STAT_LANE_UP (1<<0)
257 
258 #define AFHBA_AURORA_STAT_ERR \
259  (AFHBA_AURORA_STAT_SFP_LOS|AFHBA_AURORA_STAT_SFP_TX_FAULT|\
260  AFHBA_AURORA_STAT_HARD_ERR|AFHBA_AURORA_STAT_SOFT_ERR|\
261  AFHBA_AURORA_STAT_FRAME_ERR)
262 
263 
264 #define HOST_MON_TEMP_SHL 20
265 #define HOST_MON_USR_TEMP (1<<5)
266 #define HOST_MON_OVER_TEMP (1<<4)
267 #define HOST_MON_VOLT_ALARM 0x7
268 
269 /* BAR1 register definitions: enums are long-word offsets */
270 #define ZYNQ_BASE 0x0000
271 
272 enum ZYNQ_REGS {
273  Z_MOD_ID, /* 0x0000 */
274  Z_DMA_CTRL, /* 0x0004 */
275  Z_COMMS_HB, /* 0x0008 */
276  Z_AURORA_CTRL, /* 0x000C */
277  Z_AURORA_SR, /* 0x0010 */
278  Z_IDENT /* 0x0014 */
279 };
280 
281 
282 
283 #define PCIE_BASE 0x1000
284 
285 enum PCIE_REGS {
293 };
294 
295 #define PCIE_CONF_AF_PORT_SHL 16
296 
297 #define DMA_BASE 0x2000
298 enum DMA_REGS {
299  /* 2000 */ DMA_TEST,
300  /* 2004 */ DMA_CTRL,
301  /* 2008 */ DMA_DATA_FIFSTA,
302  /* 200c */ DMA_DESC_FIFSTA,
303  /* 2010 */ DMA_PUSH_DESC_STA,
304  /* 2014 */ DMA_PULL_DESC_STA,
305  /* 2018 */ DMA_PUSH_DATACOUNT,
306  /* 201c */ DMA_PUSH_GAP,
307  /* 2020 */ DMA_PUSH_DESC_LEN,
308  /* 2024 */ DMA_PULL_DESC_LEN,
309  /* 2028 */ DMA_REGS_COUNT,
310 };
311 
312 
313 
314 enum DMA_SEL {
317  DMA_BOTH_SEL = 0x3
318 };
319 
320 inline static const char* sDMA_SEL(enum DMA_SEL dma_sel)
321 {
322  switch(dma_sel){
323  case DMA_PUSH_SEL: return "PUSH";
324  case DMA_PULL_SEL: return "PULL";
325  case DMA_BOTH_SEL: return "PUSHPULL";
326  default: return "none";
327  }
328 }
329 
330 #define DMA_PUSH_DESC_FIFO 0x2040
331 #define DMA_PULL_DESC_FIFO 0x2080
332 
333 
334 
335 #define DMA_CTRL_PULL_SHL 16
336 #define DMA_CTRL_PUSH_SHL 0
337 
338 #define DMA_CTRL_EN 0x0001
339 #define DMA_CTRL_FIFO_RST 0x0010
340 #define DMA_CTRL_LOW_LAT 0x0020
341 #define DMA_CTRL_RECYCLE 0x0040
342 #define DMA_CTRL_RAM 0x8000
343 
344 #define DMA_DESCR_ADDR 0xfffffc00
345 #define DMA_DESCR_INTEN 0x00000100
346 #define DMA_DESCR_LEN 0x000000f0
347 #define DMA_DESCR_ID 0x0000000f
348 
349 #define DMA_DATA_FIFO_EMPTY 0x0001
350 #define DMA_DATA_FIFO_FULL 0x0002
351 #define DMA_DATA_FIFO_UNDER 0x0004
352 #define DMA_DATA_FIFO_OVER 0x0008
353 #define DMA_DATA_FIFO_COUNT 0xfff0
354 #define DMA_DATA_FIFO_COUNT_SHL 4
355 
356 #define DMA_DESCR_LEN_BYTES(descr) ((1<<((descr&DMA_DESCR_LEN)>>4))*1024)
357 
358 #define DMA_PUSH_DESC_RAM 0x6000
359 #define DMA_PULL_DESC_RAM 0x7000
360 
361 
362 #define DMA_DIR_DESC_FIFO(dma_sel) \
363  ((dma_sel)==DMA_PUSH_SEL? DMA_PUSH_DESC_FIFO: DMA_PULL_DESC_FIFO)
364 
365 #define DMA_DIR_DESC_LEN(dma_sel) \
366  ((dma_sel)==DMA_PUSH_SEL? DMA_PUSH_DESC_LEN: DMA_PULL_DESC_LEN)
367 
368 #define DMA_DIR_DESC_RAM(dma_sel) \
369  ((dma_sel)==DMA_PUSH_SEL? DMA_PUSH_DESC_RAM: DMA_PULL_DESC_RAM)
370 
371 static inline u32 dma_pp(enum DMA_SEL dma_sel, u32 bits)
372 {
373  u32 xx = 0;
374  if ((dma_sel&DMA_PUSH_SEL) != 0){
375  xx |= bits << DMA_CTRL_PUSH_SHL;
376  }
377  if ((dma_sel&DMA_PULL_SEL) != 0){
378  xx |= bits << DMA_CTRL_PULL_SHL;
379  }
380  return xx;
381 }
382 
383 
384 void afhba_write_reg(struct AFHBA_DEV *adev, int regoff, u32 value);
385 u32 afhba_read_reg(struct AFHBA_DEV *adev, int regoff);
386 /*
387 New "Special" Host Register area at offset 0xf000
388 
389 First Register is the Trigger Register - at 0xf000
390 
391 Set the Trigger by writing a 1 to bit 0 to Set it back to 0 again afterwards similar to the SOFT_TRIGGER Bit on the A9 Side.
392 */
393 #define COMMON_BASE 0xf000
396 };
397 
398 #define COM_SOFT_TRIGGER_EN 0x0001
399 
400 static inline u32 read_astatus2(struct AFHBA_DEV *adev)
401 {
402  return afhba_read_reg(adev, AURORA_STATUS2_REG(adev->sfp));
403 }
404 
405 #endif /* ACQ_FIBER_HBA_H_ */
DMA_PUSH_DESC_LEN
@ DMA_PUSH_DESC_LEN
Definition: acq-fiber-hba.h:307
PCIE_REGS
PCIE_REGS
Definition: acq-fiber-hba.h:285
AFHBA_DEV::sfp
enum AFHBA_DEV::SFP sfp
DMA_PUSH_DATACOUNT
@ DMA_PUSH_DATACOUNT
Definition: acq-fiber-hba.h:305
AFHBA_DEV::PciMapping::va
void * va
Definition: acq-fiber-hba.h:125
DMA_DATA_FIFSTA
@ DMA_DATA_FIFSTA
Definition: acq-fiber-hba.h:301
afhba_lookupDeviceFromClass
struct AFHBA_DEV * afhba_lookupDeviceFromClass(struct device *dev)
Definition: afhba_devman.c:52
afhba_lookupDev
struct AFHBA_DEV * afhba_lookupDev(struct device *dev)
Definition: afhba_devman.c:78
HostBuffer::pa
u32 pa
Definition: acq-fiber-hba.h:97
afhba_registerDevice
int afhba_registerDevice(struct AFHBA_DEV *tdev)
Definition: afhba_devman.c:27
AFHBA_DEV::SFP
SFP
Definition: acq-fiber-hba.h:134
Z_MOD_ID
@ Z_MOD_ID
Definition: acq-fiber-hba.h:273
AFHBA_DEV::PciMapping::name
char name[32]
Definition: acq-fiber-hba.h:128
afhba_remove_sysfs
void afhba_remove_sysfs(struct AFHBA_DEV *adev)
Definition: afhba_sysfs.c:600
afhba_stream_drv_init
int afhba_stream_drv_init(struct AFHBA_DEV *adev)
Definition: afhba_stream_drv.c:2229
AFHBA_DEV_PATH
Definition: acq-fiber-hba.h:163
DMA_REGS
DMA_REGS
Definition: acq-fiber-hba.h:298
AFHBA_DEV::hba_sfp_i2c
struct platform_device * hba_sfp_i2c[2]
Definition: acq-fiber-hba.h:146
Z_IDENT
@ Z_IDENT
Definition: acq-fiber-hba.h:278
afhba_minor.h
HostBuffer::BS_EMPTY
@ BS_EMPTY
Definition: acq-fiber-hba.h:103
AFHBA_DEV::ACR
unsigned ACR
Definition: acq-fiber-hba.h:135
AFHBA_DEV::mon_name
char mon_name[16]
Definition: acq-fiber-hba.h:113
afhba_read_reg
u32 afhba_read_reg(struct AFHBA_DEV *adev, int regoff)
Definition: afhba_core.c:48
afhba_lookupDevice
struct AFHBA_DEV * afhba_lookupDevice(int major)
Definition: afhba_devman.c:39
DMA_PUSH_GAP
@ DMA_PUSH_GAP
Definition: acq-fiber-hba.h:306
AFHBA_DEV::major
int major
Definition: acq-fiber-hba.h:118
AFHBA_DEV::link_up
int link_up
Definition: acq-fiber-hba.h:148
AFHBA_DEV::remote_com_bar
int remote_com_bar
Definition: acq-fiber-hba.h:130
afhba_debugfs.h
afhba_release
int afhba_release(struct inode *inode, struct file *file)
Definition: acq-fiber-hba.c:241
afhba_lookupDevicePci
struct AFHBA_DEV * afhba_lookupDevicePci(struct pci_dev *pci_dev)
Definition: afhba_devman.c:65
AFHBA_DEV_PATH::private2
int private2
Definition: acq-fiber-hba.h:168
ZYNQ_REGS
ZYNQ_REGS
Definition: acq-fiber-hba.h:272
HostBuffer::BSTATE
BSTATE
Definition: acq-fiber-hba.h:102
DMA_CTRL_PULL_SHL
#define DMA_CTRL_PULL_SHL
Definition: acq-fiber-hba.h:335
afhba_deleteDevice
void afhba_deleteDevice(struct AFHBA_DEV *tdev)
Definition: afhba_devman.c:34
AFHBA_DEV_PATH::minor
int minor
Definition: acq-fiber-hba.h:164
afhba_create_sysfs_class
void afhba_create_sysfs_class(struct AFHBA_DEV *adev)
Definition: afhba_sysfs.c:624
AFHBA_DEV::hb1
struct HostBuffer * hb1
Definition: acq-fiber-hba.h:141
HostBuffer::ibuf
int ibuf
Definition: acq-fiber-hba.h:95
PCI_CSR
@ PCI_CSR
Definition: acq-fiber-hba.h:288
AFHBA_DEV::PciMapping::len
unsigned len
Definition: acq-fiber-hba.h:126
AFHBA_DEV::SFP_A
@ SFP_A
Definition: acq-fiber-hba.h:134
DMA_CTRL_PUSH_SHL
#define DMA_CTRL_PUSH_SHL
Definition: acq-fiber-hba.h:336
AFHBA_DEV_PATH::dev
struct AFHBA_DEV * dev
Definition: acq-fiber-hba.h:165
HostBuffer::timestamp
u32 timestamp
Definition: acq-fiber-hba.h:106
PCIE_CNTRL
@ PCIE_CNTRL
Definition: acq-fiber-hba.h:286
Z_AURORA_SR
@ Z_AURORA_SR
Definition: acq-fiber-hba.h:277
HostBuffer::bstate
enum HostBuffer::BSTATE bstate
DMA_PULL_SEL
@ DMA_PULL_SEL
Definition: acq-fiber-hba.h:316
AFHBA_DEV::peer
struct AFHBA_DEV * peer
Definition: acq-fiber-hba.h:132
AFHBA_DEV::PciMapping::region
struct resource * region
Definition: acq-fiber-hba.h:127
rtm-t_ioctl.h
AFHBA_DEV::stream_dev
struct AFHBA_STREAM_DEV * stream_dev
Definition: acq-fiber-hba.h:143
DMA_PULL_DESC_LEN
@ DMA_PULL_DESC_LEN
Definition: acq-fiber-hba.h:308
HostBuffer::esta
u32 esta
Definition: acq-fiber-hba.h:105
HostBuffer::BS_FULL
@ BS_FULL
Definition: acq-fiber-hba.h:103
PCIE_DEV_CSR
@ PCIE_DEV_CSR
Definition: acq-fiber-hba.h:289
HostBuffer::BS_FULL_APP
@ BS_FULL_APP
Definition: acq-fiber-hba.h:103
afhba_create_sysfs
void afhba_create_sysfs(struct AFHBA_DEV *adev)
Definition: afhba_sysfs.c:590
DMA_PULL_DESC_STA
@ DMA_PULL_DESC_STA
Definition: acq-fiber-hba.h:304
DMA_SEL
DMA_SEL
Definition: acq-fiber-hba.h:314
afhba_remove_sysfs_class
void afhba_remove_sysfs_class(struct AFHBA_DEV *adev)
Definition: afhba_sysfs.c:642
AFHBA_DEV::slot_name
char slot_name[16]
Definition: acq-fiber-hba.h:114
afhba_devices
struct list_head afhba_devices
PCIE_BUFFER_CTRL
@ PCIE_BUFFER_CTRL
Definition: acq-fiber-hba.h:292
AFHBA_DEV::idx
int idx
Definition: acq-fiber-hba.h:117
AFHBA_DEV::SFP_C
@ SFP_C
Definition: acq-fiber-hba.h:134
AFHBA_DEV::list
struct list_head list
Definition: acq-fiber-hba.h:119
AFHBA_DEV::class_dev
struct device * class_dev
Definition: acq-fiber-hba.h:116
AFHBA_DEV::proc_dir_root
struct proc_dir_entry * proc_dir_root
Definition: acq-fiber-hba.h:137
AFHBA_DEV::PciMapping
Definition: acq-fiber-hba.h:122
DMA_DESC_FIFSTA
@ DMA_DESC_FIFSTA
Definition: acq-fiber-hba.h:302
HostBuffer::descr
u32 descr
Definition: acq-fiber-hba.h:100
AFHBA_DEV::aurora_status_read_count
int aurora_status_read_count
Definition: acq-fiber-hba.h:150
AFHBA_DEV::PciMapping::bar
int bar
Definition: acq-fiber-hba.h:123
DMA_PUSH_DESC_STA
@ DMA_PUSH_DESC_STA
Definition: acq-fiber-hba.h:303
DMA_CTRL
@ DMA_CTRL
Definition: acq-fiber-hba.h:300
AFHBA_DEV
Definition: acq-fiber-hba.h:111
HostBuffer::va
void * va
Definition: acq-fiber-hba.h:96
afhba_stream_drv_del
int afhba_stream_drv_del(struct AFHBA_DEV *adev)
Definition: afhba_stream_drv.c:2246
DMA_PUSH_SEL
@ DMA_PUSH_SEL
Definition: acq-fiber-hba.h:315
AFHBA_DEV::map_count
int map_count
Definition: acq-fiber-hba.h:120
AFHBA_DEV::name
char name[16]
Definition: acq-fiber-hba.h:112
AFHBA_DEV_PATH::my_buffers
struct list_head my_buffers
Definition: acq-fiber-hba.h:166
afhba_write_reg
void afhba_write_reg(struct AFHBA_DEV *adev, int regoff, u32 value)
Definition: afhba_core.c:40
AFHBA_STREAM_DEV
Definition: afhba_stream_drv.h:66
AFHBA_DEV::PciMapping::pa
u32 pa
Definition: acq-fiber-hba.h:124
AFHBA_DEV::debug_names
char * debug_names
Definition: acq-fiber-hba.h:139
AFHBA_DEV::remote
void * remote
Definition: acq-fiber-hba.h:133
COM_SOFT_TRIGGER
@ COM_SOFT_TRIGGER
Definition: acq-fiber-hba.h:395
DMA_BOTH_SEL
@ DMA_BOTH_SEL
Definition: acq-fiber-hba.h:317
HostBuffer::len
int len
Definition: acq-fiber-hba.h:98
AFHBA_DEV::mappings
struct AFHBA_DEV::PciMapping mappings[MAP_COUNT_MAX]
Z_COMMS_HB
@ Z_COMMS_HB
Definition: acq-fiber-hba.h:275
PCIE_INTR
@ PCIE_INTR
Definition: acq-fiber-hba.h:287
AFHBA_DEV::SFP_B
@ SFP_B
Definition: acq-fiber-hba.h:134
HostBuffer
Definition: acq-fiber-hba.h:94
MAP_COUNT_MAX
#define MAP_COUNT_MAX
Definition: acq-fiber-hba.h:77
HostBuffer::BS_FILLING
@ BS_FILLING
Definition: acq-fiber-hba.h:103
AFHBA_DEV::aurora_error_count
int aurora_error_count
Definition: acq-fiber-hba.h:149
Z_DMA_CTRL
@ Z_DMA_CTRL
Definition: acq-fiber-hba.h:274
Z_AURORA_CTRL
@ Z_AURORA_CTRL
Definition: acq-fiber-hba.h:276
COMMON_REGS
COMMON_REGS
Definition: acq-fiber-hba.h:394
PCIE_LINK_CSR
@ PCIE_LINK_CSR
Definition: acq-fiber-hba.h:290
PCIE_CONF
@ PCIE_CONF
Definition: acq-fiber-hba.h:291
DMA_TEST
@ DMA_TEST
Definition: acq-fiber-hba.h:299
HostBuffer::req_len
int req_len
Definition: acq-fiber-hba.h:99
u32
unsigned u32
Definition: local.h:60
AFHBA_DEV::pci_dev
struct pci_dev * pci_dev
Definition: acq-fiber-hba.h:115
AURORA_STATUS2_REG
#define AURORA_STATUS2_REG(sfp)
Definition: acq-fiber-hba.h:216
HostBuffer::list
struct list_head list
Definition: acq-fiber-hba.h:101
AFHBA_DEV::debug_dir
struct dentry * debug_dir
Definition: acq-fiber-hba.h:138
DMA_REGS_COUNT
@ DMA_REGS_COUNT
Definition: acq-fiber-hba.h:309
AFHBA_DEV::SFP_D
@ SFP_D
Definition: acq-fiber-hba.h:134
AFHBA_DEV::stream_fops
struct file_operations * stream_fops
Definition: acq-fiber-hba.h:144