]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
remoteproc: returns message for peek remote kick function
authorWendy Liang <wendy.liang@xilinx.com>
Thu, 14 Mar 2019 07:09:22 +0000 (00:09 -0700)
committerMichal Simek <michal.simek@xilinx.com>
Fri, 15 Mar 2019 10:23:46 +0000 (11:23 +0100)
Update the peek remote kick API to also return the message
from remote.

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/remoteproc/remoteproc_internal.h
drivers/remoteproc/remoteproc_sysfs.c
include/linux/remoteproc.h

index 1539c1807f433030b6cebb4259464c79b533e477..f8f867569324b03bddfedff6f0af8060752c6839 100644 (file)
@@ -115,10 +115,10 @@ bool rproc_allow_sysfs_kick(struct rproc *rproc)
 }
 
 static inline
-bool rproc_peek_remote_kick(struct rproc *rproc)
+bool rproc_peek_remote_kick(struct rproc *rproc, char *buf, size_t *len)
 {
        if (rproc->ops->peek_remote_kick)
-               return rproc->ops->peek_remote_kick(rproc);
+               return rproc->ops->peek_remote_kick(rproc, buf, len);
        else
                return false;
 }
index 7355048fc11ba56a9e7132b18acb7dd0bcd66ec5..437b887a58f54ce3c9ac52e0e70ddb1e1b5d46eb 100644 (file)
@@ -167,7 +167,7 @@ static ssize_t remote_kick_show(struct device *dev,
 
        buf[0] = '0';
        buf[1] = '\n';
-       if (rproc_peek_remote_kick(rproc))
+       if (rproc_peek_remote_kick(rproc, NULL, NULL))
                buf[0] += 1;
        return 2;
 }
index 8c0653a2fda004f0007d9e738f9e4785ecf8739d..4690000b938a8de47e6ff08119ca82993d7d9c52 100644 (file)
@@ -358,7 +358,7 @@ struct rproc_ops {
        int (*start)(struct rproc *rproc);
        int (*stop)(struct rproc *rproc);
        void (*kick)(struct rproc *rproc, int vqid);
-       bool (*peek_remote_kick)(struct rproc *rproc);
+       bool (*peek_remote_kick)(struct rproc *rproc, char *buf, size_t *len);
        void (*ack_remote_kick)(struct rproc *rproc);
        void * (*da_to_va)(struct rproc *rproc, u64 da, int len);
        int (*parse_fw)(struct rproc *rproc, const struct firmware *fw);