Commit 21b6657e authored by Loic PALLARDY's avatar Loic PALLARDY Committed by Bjorn Andersson

remoteproc: core: transform struct fw_rsc_vdev_vring reserved field in pa

In current implementation, struct fw_rsc_vdev_vring which describes
vring resource in firmware resource table owns only device address,
because it assumes that host is responsible of vring allocation and
only device address is needed by coprocessor.
But if vrings need to be fixed in system memory map for any reasons
(security, SoC charactieristics...), physical address is needed exatly
identified the memory chunck by host.

For that let's transform reserved field of struct fw_rsc_vdev_vring
to pa (physical address).
Signed-off-by: default avatarLoic Pallardy <loic.pallardy@st.com>
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent cd583051
...@@ -266,12 +266,6 @@ rproc_parse_vring(struct rproc_vdev *rvdev, struct fw_rsc_vdev *rsc, int i) ...@@ -266,12 +266,6 @@ rproc_parse_vring(struct rproc_vdev *rvdev, struct fw_rsc_vdev *rsc, int i)
dev_dbg(dev, "vdev rsc: vring%d: da 0x%x, qsz %d, align %d\n", dev_dbg(dev, "vdev rsc: vring%d: da 0x%x, qsz %d, align %d\n",
i, vring->da, vring->num, vring->align); i, vring->da, vring->num, vring->align);
/* make sure reserved bytes are zeroes */
if (vring->reserved) {
dev_err(dev, "vring rsc has non zero reserved bytes\n");
return -EINVAL;
}
/* verify queue size and vring alignment are sane */ /* verify queue size and vring alignment are sane */
if (!vring->num || !vring->align) { if (!vring->num || !vring->align) {
dev_err(dev, "invalid qsz (%d) or alignment (%d)\n", dev_err(dev, "invalid qsz (%d) or alignment (%d)\n",
......
...@@ -241,7 +241,7 @@ struct fw_rsc_trace { ...@@ -241,7 +241,7 @@ struct fw_rsc_trace {
* @notifyid is a unique rproc-wide notify index for this vring. This notify * @notifyid is a unique rproc-wide notify index for this vring. This notify
* index is used when kicking a remote processor, to let it know that this * index is used when kicking a remote processor, to let it know that this
* vring is triggered. * vring is triggered.
* @reserved: reserved (must be zero) * @pa: physical address
* *
* This descriptor is not a resource entry by itself; it is part of the * This descriptor is not a resource entry by itself; it is part of the
* vdev resource type (see below). * vdev resource type (see below).
...@@ -255,7 +255,7 @@ struct fw_rsc_vdev_vring { ...@@ -255,7 +255,7 @@ struct fw_rsc_vdev_vring {
u32 align; u32 align;
u32 num; u32 num;
u32 notifyid; u32 notifyid;
u32 reserved; u32 pa;
} __packed; } __packed;
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment