diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2019-10-01 12:33:25 +0200 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2020-08-04 14:03:14 +0100 |
commit | 8845b8e1482c68588d06b4c7d094fe9940cc464a (patch) | |
tree | f3c37658c7c177305b162abe6be967991cfc7403 | |
parent | 3b9327b5ea5185ebec554cc34d81b539c781aa16 (diff) |
WIP: ivshmem: Add header file
Common defines and structures for the ivshmem device.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
-rw-r--r-- | include/linux/ivshmem.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/linux/ivshmem.h b/include/linux/ivshmem.h new file mode 100644 index 000000000000..bad8547f071b --- /dev/null +++ b/include/linux/ivshmem.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef _LINUX_IVSHMEM_H +#define _LINUX_IVSHMEM_H + +#include <linux/types.h> + +#define IVSHM_PROTO_UNDEFINED 0x0000 +#define IVSHM_PROTO_NET 0x0001 +#define IVSHM_PROTO_VIRTIO_FRONT 0x8000 +#define IVSHM_PROTO_VIRTIO_BACK 0xc000 +#define IVSHM_PROTO_VIRTIO_DEVID_MASK 0x7fff + +#define IVSHM_CFG_PRIV_CNTL 0x03 +# define IVSHM_PRIV_CNTL_ONESHOT_INT BIT(0) +#define IVSHM_CFG_STATE_TAB_SZ 0x04 +#define IVSHM_CFG_RW_SECTION_SZ 0x08 +#define IVSHM_CFG_OUTPUT_SECTION_SZ 0x10 +#define IVSHM_CFG_ADDRESS 0x18 + +struct ivshm_regs { + u32 id; + u32 max_peers; + u32 int_control; + u32 doorbell; + u32 state; +}; + +#define IVSHM_INT_ENABLE BIT(0) + +#endif /* _LINUX_IVSHMEM_H */ |