#include <linux/idr.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/list.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/rpmsg.h>
#include <linux/slab.h>
#include <linux/workqueue.h>
#include <linux/mailbox_client.h>
#include "rpmsg_internal.h"
#include "qcom_glink_native.h"
#define RPM_TOC_SIZE …
#define RPM_TOC_MAGIC …
#define RPM_TOC_MAX_ENTRIES …
#define RPM_TX_FIFO_ID …
#define RPM_RX_FIFO_ID …
#define to_rpm_pipe(p) …
struct rpm_toc_entry { … } __packed;
struct rpm_toc { … } __packed;
struct glink_rpm_pipe { … };
struct glink_rpm { … };
static size_t glink_rpm_rx_avail(struct qcom_glink_pipe *glink_pipe)
{ … }
static void glink_rpm_rx_peek(struct qcom_glink_pipe *glink_pipe,
void *data, unsigned int offset, size_t count)
{ … }
static void glink_rpm_rx_advance(struct qcom_glink_pipe *glink_pipe,
size_t count)
{ … }
static size_t glink_rpm_tx_avail(struct qcom_glink_pipe *glink_pipe)
{ … }
static unsigned int glink_rpm_tx_write_one(struct glink_rpm_pipe *pipe,
unsigned int head,
const void *data, size_t count)
{ … }
static void glink_rpm_tx_write(struct qcom_glink_pipe *glink_pipe,
const void *hdr, size_t hlen,
const void *data, size_t dlen)
{ … }
static void glink_rpm_tx_kick(struct qcom_glink_pipe *glink_pipe)
{ … }
static irqreturn_t qcom_glink_rpm_intr(int irq, void *data)
{ … }
static int glink_rpm_parse_toc(struct device *dev,
void __iomem *msg_ram,
size_t msg_ram_size,
struct glink_rpm_pipe *rx,
struct glink_rpm_pipe *tx)
{ … }
static int glink_rpm_probe(struct platform_device *pdev)
{ … }
static void glink_rpm_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id glink_rpm_of_match[] = …;
MODULE_DEVICE_TABLE(of, glink_rpm_of_match);
static struct platform_driver glink_rpm_driver = …;
static int __init glink_rpm_init(void)
{ … }
subsys_initcall(glink_rpm_init);
static void __exit glink_rpm_exit(void)
{ … }
module_exit(glink_rpm_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;