summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8e98f04)
raw | patch | inline | side by side (parent: 8e98f04)
author | Suman Anna <s-anna@ti.com> | |
Fri, 22 Feb 2019 23:37:49 +0000 (17:37 -0600) | ||
committer | Suman Anna <s-anna@ti.com> | |
Mon, 25 Feb 2019 19:15:11 +0000 (13:15 -0600) |
The actual payload size for OMAP Mailboxes is 32-bits, and the type
to use with the OMAP Mailbox driver is mbox_msg_t. This type can vary
in size (32-bits or 64-bits) depending on the platform the driver is
being built for. Update the PRU remoteproc driver to use the types and
macros provided by the OMAP Mailbox driver to always convert safely
between the mailbox payload size and the pointers the data is exchanged
between the OMAP Mailbox implementation driver and its client drivers.
Signed-off-by: Suman Anna <s-anna@ti.com>
to use with the OMAP Mailbox driver is mbox_msg_t. This type can vary
in size (32-bits or 64-bits) depending on the platform the driver is
being built for. Update the PRU remoteproc driver to use the types and
macros provided by the OMAP Mailbox driver to always convert safely
between the mailbox payload size and the pointers the data is exchanged
between the OMAP Mailbox implementation driver and its client drivers.
Signed-off-by: Suman Anna <s-anna@ti.com>
drivers/remoteproc/pru_rproc.c | patch | blob | history |
index 8d1bb5151f0f8ef97a09c0f40ed4067c512b9339..0d5dfda6c8dd0fa6d9b9cd065b00ad21b2ba5c2d 100644 (file)
#include <linux/mailbox_client.h>
#include <linux/module.h>
#include <linux/of_device.h>
+#include <linux/omap-mailbox.h>
#include <linux/pruss.h>
#include <linux/pruss_driver.h>
#include <linux/remoteproc.h>
{
struct pru_rproc *pru = container_of(client, struct pru_rproc, client);
struct device *dev = &pru->rproc->dev;
- u32 msg = (u32)data;
+ u32 msg = to_omap_mbox_msg(data);
dev_dbg(dev, "mbox msg: 0x%x\n", msg);
struct device *dev = &rproc->dev;
struct pru_rproc *pru = rproc->priv;
int ret;
+ mbox_msg_t msg = (mbox_msg_t)vq_id;
dev_dbg(dev, "kicking vqid %d on PRU%d\n", vq_id, pru->id);
* send the index of the triggered virtqueue in the mailbox
* payload
*/
- ret = mbox_send_message(pru->mbox, (void *)vq_id);
+ ret = mbox_send_message(pru->mbox, (void *)msg);
if (ret < 0)
dev_err(dev, "mbox_send_message failed: %d\n", ret);
}