summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-10-17 08:10:24 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-10-17 08:10:24 +0200
commit9156b904baf981561a8ed486db52746b04d2e464 (patch)
tree1679c7e689d541f5c1a5663c2ee201036407857e /include/linux
parent854cdfbe265ebd99619bc6edc594d59b07c156fe (diff)
parent22763dab152cb38c0912fe688f564a54aeaaea88 (diff)
downloadbarebox-9156b904baf981561a8ed486db52746b04d2e464.tar.gz
barebox-9156b904baf981561a8ed486db52746b04d2e464.tar.xz
Merge branch 'for-next/remoteproc'
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/remoteproc.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h
new file mode 100644
index 0000000000..feee9ee4ee
--- /dev/null
+++ b/include/linux/remoteproc.h
@@ -0,0 +1,51 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Remote Processor Framework
+ *
+ * Copyright(c) 2011 Texas Instruments, Inc.
+ * Copyright(c) 2011 Google, Inc.
+ */
+
+#ifndef REMOTEPROC_H
+#define REMOTEPROC_H
+
+#include <firmware.h>
+
+struct resource_table {
+ u32 ver;
+ u32 num;
+ u32 reserved[2];
+ u32 offset[0];
+} __packed;
+
+struct firmware {
+ size_t size;
+ const u8 *data;
+};
+
+struct rproc;
+
+struct rproc_ops {
+ int (*start)(struct rproc *rproc);
+ int (*stop)(struct rproc *rproc);
+ void * (*da_to_va)(struct rproc *rproc, u64 da, int len);
+ int (*load)(struct rproc *rproc, const struct firmware *fw);
+};
+
+struct rproc {
+ struct firmware_handler fh;
+ const char *name;
+ void *priv;
+ struct rproc_ops *ops;
+ struct device_d dev;
+ int index;
+
+ void *fw_buf;
+ size_t fw_buf_ofs;
+};
+
+struct rproc *rproc_alloc(struct device_d *dev, const char *name,
+ const struct rproc_ops *ops, int len);
+int rproc_add(struct rproc *rproc);
+
+#endif /* REMOTEPROC_H */