diff options
Diffstat (limited to 'include/linux/switchtec.h')
-rw-r--r-- | include/linux/switchtec.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/switchtec.h b/include/linux/switchtec.h index ab400af6f0ce..eee0412bdf4b 100644 --- a/include/linux/switchtec.h +++ b/include/linux/switchtec.h | |||
@@ -29,6 +29,7 @@ | |||
29 | #define SWITCHTEC_EVENT_EN_IRQ BIT(3) | 29 | #define SWITCHTEC_EVENT_EN_IRQ BIT(3) |
30 | #define SWITCHTEC_EVENT_FATAL BIT(4) | 30 | #define SWITCHTEC_EVENT_FATAL BIT(4) |
31 | 31 | ||
32 | #define SWITCHTEC_DMA_MRPC_EN BIT(0) | ||
32 | enum { | 33 | enum { |
33 | SWITCHTEC_GAS_MRPC_OFFSET = 0x0000, | 34 | SWITCHTEC_GAS_MRPC_OFFSET = 0x0000, |
34 | SWITCHTEC_GAS_TOP_CFG_OFFSET = 0x1000, | 35 | SWITCHTEC_GAS_TOP_CFG_OFFSET = 0x1000, |
@@ -46,6 +47,10 @@ struct mrpc_regs { | |||
46 | u32 cmd; | 47 | u32 cmd; |
47 | u32 status; | 48 | u32 status; |
48 | u32 ret_value; | 49 | u32 ret_value; |
50 | u32 dma_en; | ||
51 | u64 dma_addr; | ||
52 | u32 dma_vector; | ||
53 | u32 dma_ver; | ||
49 | } __packed; | 54 | } __packed; |
50 | 55 | ||
51 | enum mrpc_status { | 56 | enum mrpc_status { |
@@ -342,6 +347,14 @@ struct pff_csr_regs { | |||
342 | 347 | ||
343 | struct switchtec_ntb; | 348 | struct switchtec_ntb; |
344 | 349 | ||
350 | struct dma_mrpc_output { | ||
351 | u32 status; | ||
352 | u32 cmd_id; | ||
353 | u32 rtn_code; | ||
354 | u32 output_size; | ||
355 | u8 data[SWITCHTEC_MRPC_PAYLOAD_SIZE]; | ||
356 | }; | ||
357 | |||
345 | struct switchtec_dev { | 358 | struct switchtec_dev { |
346 | struct pci_dev *pdev; | 359 | struct pci_dev *pdev; |
347 | struct device dev; | 360 | struct device dev; |
@@ -381,6 +394,9 @@ struct switchtec_dev { | |||
381 | u8 link_event_count[SWITCHTEC_MAX_PFF_CSR]; | 394 | u8 link_event_count[SWITCHTEC_MAX_PFF_CSR]; |
382 | 395 | ||
383 | struct switchtec_ntb *sndev; | 396 | struct switchtec_ntb *sndev; |
397 | |||
398 | struct dma_mrpc_output *dma_mrpc; | ||
399 | dma_addr_t dma_mrpc_dma_addr; | ||
384 | }; | 400 | }; |
385 | 401 | ||
386 | static inline struct switchtec_dev *to_stdev(struct device *dev) | 402 | static inline struct switchtec_dev *to_stdev(struct device *dev) |