From: Loic Pallardy <loic.pallardy@st.com> To: bjorn.andersson@linaro.org, ohad@wizery.com, lee.jones@linaro.org Cc: loic.pallardy@st.com, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@stlinux.com, patrice.chotard@st.com, hugues.fruchet@st.com, peter.griffin@linaro.org Subject: [PATCH v2 3/6] include: virtio_rpmsg: add virtio rpmsg configuration structure Date: Tue, 31 Jan 2017 13:51:34 +0100 [thread overview] Message-ID: <1485867097-6960-4-git-send-email-loic.pallardy@st.com> (raw) In-Reply-To: <1485867097-6960-1-git-send-email-loic.pallardy@st.com> 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> --- No change since V1 --- include/linux/rpmsg/virtio_rpmsg.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 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..5f3f0d0 --- /dev/null +++ b/include/linux/rpmsg/virtio_rpmsg.h @@ -0,0 +1,32 @@ + +#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 + * @va: virtual address (used when buffer allocated by low level driver) + * @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; + u64 va; + u32 da; + u32 pa; + u32 len; + u32 buf_size; + u32 reserved; +} __packed; + +#endif -- 1.9.1
WARNING: multiple messages have this Message-ID (diff)
From: Loic Pallardy <loic.pallardy@st.com> To: <bjorn.andersson@linaro.org>, <ohad@wizery.com>, <lee.jones@linaro.org> Cc: <loic.pallardy@st.com>, <linux-remoteproc@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <kernel@stlinux.com>, <patrice.chotard@st.com>, <hugues.fruchet@st.com>, <peter.griffin@linaro.org> Subject: [PATCH v2 3/6] include: virtio_rpmsg: add virtio rpmsg configuration structure Date: Tue, 31 Jan 2017 13:51:34 +0100 [thread overview] Message-ID: <1485867097-6960-4-git-send-email-loic.pallardy@st.com> (raw) In-Reply-To: <1485867097-6960-1-git-send-email-loic.pallardy@st.com> 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> --- No change since V1 --- include/linux/rpmsg/virtio_rpmsg.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 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..5f3f0d0 --- /dev/null +++ b/include/linux/rpmsg/virtio_rpmsg.h @@ -0,0 +1,32 @@ + +#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 + * @va: virtual address (used when buffer allocated by low level driver) + * @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; + u64 va; + u32 da; + u32 pa; + u32 len; + u32 buf_size; + u32 reserved; +} __packed; + +#endif -- 1.9.1
next prev parent reply other threads:[~2017-01-31 12:51 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-01-31 12:51 [PATCH v2 0/6] virtio_rpmsg: make rpmsg channel configurable Loic Pallardy 2017-01-31 12:51 ` Loic Pallardy 2017-01-31 12:51 ` [PATCH v2 1/6] rpmsg: virtio_rpmsg: set rpmsg_buf_size customizable Loic Pallardy 2017-01-31 12:51 ` Loic Pallardy 2017-01-31 12:51 ` [PATCH v2 2/6] rpmsg: virtio_rpmsg_bus: fix sg_set_buf() when addr is not a valid kernel address Loic Pallardy 2017-01-31 12:51 ` Loic Pallardy 2017-01-31 12:51 ` Loic Pallardy [this message] 2017-01-31 12:51 ` [PATCH v2 3/6] include: virtio_rpmsg: add virtio rpmsg configuration structure Loic Pallardy 2017-01-31 12:51 ` [PATCH v2 4/6] rpmsg: virtio_rpmsg: get buffer configuration from virtio Loic Pallardy 2017-01-31 12:51 ` Loic Pallardy 2017-01-31 12:51 ` [PATCH v2 5/6] rpmsg: virtio_rpmsg: don't allocate buffer if provided by low level driver Loic Pallardy 2017-01-31 12:51 ` Loic Pallardy 2017-01-31 18:29 ` kbuild test robot 2017-01-31 18:29 ` kbuild test robot 2017-01-31 12:51 ` [PATCH v2 6/6] rpmsg: virtio_rpmsg: set buffer configuration to virtio Loic Pallardy 2017-01-31 12:51 ` Loic Pallardy 2017-02-08 10:21 ` [PATCH v2 0/6] virtio_rpmsg: make rpmsg channel configurable Hugues FRUCHET
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1485867097-6960-4-git-send-email-loic.pallardy@st.com \ --to=loic.pallardy@st.com \ --cc=bjorn.andersson@linaro.org \ --cc=hugues.fruchet@st.com \ --cc=kernel@stlinux.com \ --cc=lee.jones@linaro.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-remoteproc@vger.kernel.org \ --cc=ohad@wizery.com \ --cc=patrice.chotard@st.com \ --cc=peter.griffin@linaro.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.