Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1610621

[PATCH v4 3/5] include: virtio_rpmsg: add virtio rpmsg configuration structure

From Loic Pallardy <loic.pallardy@st.com>
Newsgroups linux.kernel
Subject [PATCH v4 3/5] include: virtio_rpmsg: add virtio rpmsg configuration structure
Date 2017-03-28 14:00 +0200
Message-ID <tpXX5-72Y-27@gated-at.bofh.it> (permalink)
References <tpXX4-72Y-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Rpmsg channel configuration should be identical on host and
coprocessor side.
This patch proposes a new structure named struct virtio_rpmsg_cfg
to gather all configuration information to characterize the
communication link and.
This structure will be exchanged with coprocessor via the resource
table, expanding struct fw_rsc_vdev. It will guarantee that host
and coprocessor will share the same information.
virtio_rpmsg will access it thanks to virtio get and set features.
Presence of struct virtio_rpmsg_cfg is optional.

Signed-off-by: Loic Pallardy <loic.pallardy@st.com>
---
Changes since V3:
- remove va field from struct virtio_rpmsg_cfg

---
 include/linux/rpmsg/virtio_rpmsg.h | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 include/linux/rpmsg/virtio_rpmsg.h

diff --git a/include/linux/rpmsg/virtio_rpmsg.h b/include/linux/rpmsg/virtio_rpmsg.h
new file mode 100644
index 0000000..2d31636
--- /dev/null
+++ b/include/linux/rpmsg/virtio_rpmsg.h
@@ -0,0 +1,30 @@
+
+#ifndef _LINUX_VIRTIO_RPMSG_H
+#define _LINUX_VIRTIO_RPMSG_H
+
+/* Offset in struct fw_rsc_vdev */
+#define RPMSG_CONFIG_OFFSET	0
+
+/**
+ * struct virtio_rpmsg_cfg - optional configuration field for virtio rpmsg
+ * provided at probe time by virtio (get/set)
+ * @id: virtio cfg id (as in virtio_ids.h)
+ * @version: virtio_rpmsg_cfg structure version number
+ * @da: device address
+ * @pa: physical address
+ * @len: length (in bytes)
+ * @buf_size: size of rpmsg buffer size (defined by firmware else default value
+ *	      used)
+ * @reserved: reserved (must be zero)
+ */
+struct virtio_rpmsg_cfg {
+	u32 id;
+	u32 version;
+	u32 da;
+	u32 pa;
+	u32 len;
+	u32 buf_size;
+	u32 reserved;
+} __packed;
+
+#endif
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 0/5] virtio_rpmsg: make rpmsg channel configurable Loic Pallardy <loic.pallardy@st.com> - 2017-03-28 14:00 +0200
  [PATCH v4 2/5] rpmsg: virtio_rpmsg_bus: fix sg_set_buf() when addr is not a valid kernel address Loic Pallardy <loic.pallardy@st.com> - 2017-03-28 14:00 +0200
  [PATCH v4 4/5] rpmsg: virtio_rpmsg: get buffer configuration from virtio Loic Pallardy <loic.pallardy@st.com> - 2017-03-28 14:00 +0200
  [PATCH v4 3/5] include: virtio_rpmsg: add virtio rpmsg configuration structure Loic Pallardy <loic.pallardy@st.com> - 2017-03-28 14:00 +0200
  [PATCH v4 5/5] rpmsg: virtio_rpmsg: set buffer configuration to virtio Loic Pallardy <loic.pallardy@st.com> - 2017-03-28 14:00 +0200
  [PATCH v4 1/5] rpmsg: virtio_rpmsg: set rpmsg_buf_size customizable Loic Pallardy <loic.pallardy@st.com> - 2017-03-28 14:00 +0200

csiph-web