blob: 98831bd36d7c2d3371d63a710b197bfff4ada97e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* IMX MIC Platform Software Stack
*
* Copyright(c) 2020 NXP.
*
* Intel MIC Host driver.
*/
#ifndef _IMX_MIC_MAIN_H_
#define _IMX_MIC_MAIN_H_
#include <linux/cma.h>
#include <linux/dma-contiguous.h>
#include <linux/idr.h>
#include <linux/irqreturn.h>
#include <linux/mic_common.h>
#include <linux/module.h>
#include <linux/pci.h>
#include "../bus/vop_bus.h"
#include "../bus/cosm_bus.h"
#include "../common/imx_mic_common.h"
#define PCI_DEVICE_ID_IMX_MIC 0xCBED
#define IMX_MIC_TEMP_BAR 0
#define IMX_MIC_MMIO_BAR 2
#define IMX_MIC_APER_BAR 4
#define RC_SHMEM_ADDR_OFFSET 0x0
#define RC_SHMEM_SIZE_OFFSET 0x8
#define RC_MAP_ADDR_OFFSET 0x10
/**
* struct imx_mic_device - MIC device information for each card.
*
* @mmio: MMIO bar information.
* @aper: Aperture bar information.
* @id: The unique device id for this MIC device.
* @family: The MIC family to which this device belongs.
* @stepping: Stepping ID.
* @dp: virtio device page.
* @dp_dma_addr: virtio device page DMA address.
* @num_vectors: The number of MSI vectors that have been allocated.
* @temp_bar_base: Virtual address of temp bar.
* @pdev: Underlying PCI device.
* @vpdev: Virtio over PCIe device on the VOP virtual bus.
* @cosm_dev: COSM device
*/
struct imx_mic_device {
struct mic_mw mmio;
struct mic_mw aper;
int id;
enum mic_hw_family family;
u8 stepping;
void *dp;
dma_addr_t dp_dma_addr;
u32 num_vectors;
void __iomem *temp_bar_base;
struct pci_dev *pdev;
struct vop_device *vpdev;
struct cosm_device *cosm_dev;
};
extern struct cosm_hw_ops cosm_hw_ops;
#endif
|