#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/remoteproc.h>
#include <linux/rpmsg/mtk_rpmsg.h>
#include <linux/slab.h>
#include <linux/workqueue.h>
#include "rpmsg_internal.h"
struct mtk_rpmsg_rproc_subdev { … };
#define to_mtk_subdev(d) …
struct mtk_rpmsg_channel_info { … };
struct rpmsg_ns_msg { … } __packed;
struct mtk_rpmsg_device { … };
struct mtk_rpmsg_endpoint { … };
#define to_mtk_rpmsg_device(r) …
#define to_mtk_rpmsg_endpoint(r) …
static const struct rpmsg_endpoint_ops mtk_rpmsg_endpoint_ops;
static void __mtk_ept_release(struct kref *kref)
{ … }
static void mtk_rpmsg_ipi_handler(void *data, unsigned int len, void *priv)
{ … }
static struct rpmsg_endpoint *
__mtk_create_ept(struct mtk_rpmsg_rproc_subdev *mtk_subdev,
struct rpmsg_device *rpdev, rpmsg_rx_cb_t cb, void *priv,
u32 id)
{ … }
static struct rpmsg_endpoint *
mtk_rpmsg_create_ept(struct rpmsg_device *rpdev, rpmsg_rx_cb_t cb, void *priv,
struct rpmsg_channel_info chinfo)
{ … }
static void mtk_rpmsg_destroy_ept(struct rpmsg_endpoint *ept)
{ … }
static int mtk_rpmsg_send(struct rpmsg_endpoint *ept, void *data, int len)
{ … }
static int mtk_rpmsg_trysend(struct rpmsg_endpoint *ept, void *data, int len)
{ … }
static const struct rpmsg_endpoint_ops mtk_rpmsg_endpoint_ops = …;
static void mtk_rpmsg_release_device(struct device *dev)
{ … }
static const struct rpmsg_device_ops mtk_rpmsg_device_ops = …;
static struct device_node *
mtk_rpmsg_match_device_subnode(struct device_node *node, const char *channel)
{ … }
static int mtk_rpmsg_register_device(struct mtk_rpmsg_rproc_subdev *mtk_subdev,
struct rpmsg_channel_info *info)
{ … }
static void mtk_register_device_work_function(struct work_struct *register_work)
{ … }
static int mtk_rpmsg_create_device(struct mtk_rpmsg_rproc_subdev *mtk_subdev,
char *name, u32 addr)
{ … }
static int mtk_rpmsg_ns_cb(struct rpmsg_device *rpdev, void *data, int len,
void *priv, u32 src)
{ … }
static int mtk_rpmsg_prepare(struct rproc_subdev *subdev)
{ … }
static void mtk_rpmsg_unprepare(struct rproc_subdev *subdev)
{ … }
static void mtk_rpmsg_stop(struct rproc_subdev *subdev, bool crashed)
{ … }
struct rproc_subdev *
mtk_rpmsg_create_rproc_subdev(struct platform_device *pdev,
struct mtk_rpmsg_info *info)
{ … }
EXPORT_SYMBOL_GPL(…);
void mtk_rpmsg_destroy_rproc_subdev(struct rproc_subdev *subdev)
{ … }
EXPORT_SYMBOL_GPL(…);
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;