Файловый менеджер - Редактировать - /var/www/html/rpmsg.zip
Ðазад
PK ! 55� � Kconfignu �[��� # SPDX-License-Identifier: GPL-2.0 menu "Rpmsg drivers" # RPMSG always gets selected by whoever wants it config RPMSG tristate config RPMSG_CHAR tristate "RPMSG device interface" depends on RPMSG depends on NET help Say Y here to export rpmsg endpoints as device files, usually found in /dev. They make it possible for user-space programs to send and receive rpmsg packets. config RPMSG_NS tristate "RPMSG name service announcement" depends on RPMSG help Say Y here to enable the support of the name service announcement channel that probes the associated RPMsg device on remote endpoint service announcement. config RPMSG_MTK_SCP tristate "MediaTek SCP" depends on MTK_SCP select RPMSG help Say y here to enable support providing communication channels to remote processors in MediaTek platforms. This use IPI and IPC to communicate with remote processors. config RPMSG_QCOM_GLINK tristate select RPMSG config RPMSG_QCOM_GLINK_RPM tristate "Qualcomm RPM Glink driver" select RPMSG_QCOM_GLINK depends on HAS_IOMEM depends on MAILBOX help Say y here to enable support for the GLINK RPM communication driver, which serves as a channel for communication with the RPM in GLINK enabled systems. config RPMSG_QCOM_GLINK_SMEM tristate "Qualcomm SMEM Glink driver" select RPMSG_QCOM_GLINK depends on MAILBOX depends on QCOM_SMEM help Say y here to enable support for the GLINK SMEM communication driver, which provides support for using the GLINK communication protocol over SMEM. config RPMSG_QCOM_SMD tristate "Qualcomm Shared Memory Driver (SMD)" depends on MAILBOX depends on QCOM_SMEM select RPMSG help Say y here to enable support for the Qualcomm Shared Memory Driver providing communication channels to remote processors in Qualcomm platforms. config RPMSG_VIRTIO tristate "Virtio RPMSG bus driver" depends on HAS_DMA select RPMSG select RPMSG_NS select VIRTIO endmenu PK ! �h� � Makefilenu �[��� # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_RPMSG) += rpmsg_core.o obj-$(CONFIG_RPMSG_CHAR) += rpmsg_char.o obj-$(CONFIG_RPMSG_NS) += rpmsg_ns.o obj-$(CONFIG_RPMSG_MTK_SCP) += mtk_rpmsg.o qcom_glink-objs := qcom_glink_native.o qcom_glink_ssr.o obj-$(CONFIG_RPMSG_QCOM_GLINK) += qcom_glink.o obj-$(CONFIG_RPMSG_QCOM_GLINK_RPM) += qcom_glink_rpm.o obj-$(CONFIG_RPMSG_QCOM_GLINK_SMEM) += qcom_glink_smem.o obj-$(CONFIG_RPMSG_QCOM_SMD) += qcom_smd.o obj-$(CONFIG_RPMSG_VIRTIO) += virtio_rpmsg_bus.o PK ! ��O� � byteorder.hnu �[��� /* SPDX-License-Identifier: GPL-2.0 */ /* * Follows implementation found in linux/virtio_byteorder.h */ #ifndef _LINUX_RPMSG_BYTEORDER_H #define _LINUX_RPMSG_BYTEORDER_H #include <linux/types.h> #include <uapi/linux/rpmsg_types.h> static inline bool rpmsg_is_little_endian(void) { #ifdef __LITTLE_ENDIAN return true; #else return false; #endif } static inline u16 __rpmsg16_to_cpu(bool little_endian, __rpmsg16 val) { if (little_endian) return le16_to_cpu((__force __le16)val); else return be16_to_cpu((__force __be16)val); } static inline __rpmsg16 __cpu_to_rpmsg16(bool little_endian, u16 val) { if (little_endian) return (__force __rpmsg16)cpu_to_le16(val); else return (__force __rpmsg16)cpu_to_be16(val); } static inline u32 __rpmsg32_to_cpu(bool little_endian, __rpmsg32 val) { if (little_endian) return le32_to_cpu((__force __le32)val); else return be32_to_cpu((__force __be32)val); } static inline __rpmsg32 __cpu_to_rpmsg32(bool little_endian, u32 val) { if (little_endian) return (__force __rpmsg32)cpu_to_le32(val); else return (__force __rpmsg32)cpu_to_be32(val); } static inline u64 __rpmsg64_to_cpu(bool little_endian, __rpmsg64 val) { if (little_endian) return le64_to_cpu((__force __le64)val); else return be64_to_cpu((__force __be64)val); } static inline __rpmsg64 __cpu_to_rpmsg64(bool little_endian, u64 val) { if (little_endian) return (__force __rpmsg64)cpu_to_le64(val); else return (__force __rpmsg64)cpu_to_be64(val); } #endif /* _LINUX_RPMSG_BYTEORDER_H */ PK ! �.{ ns.hnu �[��� /* SPDX-License-Identifier: GPL-2.0 */ #ifndef _LINUX_RPMSG_NS_H #define _LINUX_RPMSG_NS_H #include <linux/mod_devicetable.h> #include <linux/rpmsg.h> #include <linux/rpmsg/byteorder.h> #include <linux/types.h> /** * struct rpmsg_ns_msg - dynamic name service announcement message * @name: name of remote service that is published * @addr: address of remote service that is published * @flags: indicates whether service is created or destroyed * * This message is sent across to publish a new service, or announce * about its removal. When we receive these messages, an appropriate * rpmsg channel (i.e device) is created/destroyed. In turn, the ->probe() * or ->remove() handler of the appropriate rpmsg driver will be invoked * (if/as-soon-as one is registered). */ struct rpmsg_ns_msg { char name[RPMSG_NAME_SIZE]; __rpmsg32 addr; __rpmsg32 flags; } __packed; /** * enum rpmsg_ns_flags - dynamic name service announcement flags * * @RPMSG_NS_CREATE: a new remote service was just created * @RPMSG_NS_DESTROY: a known remote service was just destroyed */ enum rpmsg_ns_flags { RPMSG_NS_CREATE = 0, RPMSG_NS_DESTROY = 1, }; /* Address 53 is reserved for advertising remote services */ #define RPMSG_NS_ADDR (53) int rpmsg_ns_register_device(struct rpmsg_device *rpdev); #endif PK ! �>��� � mtk_rpmsg.hnu �[��� /* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright 2019 Google LLC. */ #ifndef __LINUX_RPMSG_MTK_RPMSG_H #define __LINUX_RPMSG_MTK_RPMSG_H #include <linux/platform_device.h> #include <linux/remoteproc.h> typedef void (*ipi_handler_t)(void *data, unsigned int len, void *priv); /* * struct mtk_rpmsg_info - IPI functions tied to the rpmsg device. * @register_ipi: register IPI handler for an IPI id. * @unregister_ipi: unregister IPI handler for a registered IPI id. * @send_ipi: send IPI to an IPI id. wait is the timeout (in msecs) to wait * until response, or 0 if there's no timeout. * @ns_ipi_id: the IPI id used for name service, or -1 if name service isn't * supported. */ struct mtk_rpmsg_info { int (*register_ipi)(struct platform_device *pdev, u32 id, ipi_handler_t handler, void *priv); void (*unregister_ipi)(struct platform_device *pdev, u32 id); int (*send_ipi)(struct platform_device *pdev, u32 id, void *buf, unsigned int len, unsigned int wait); int ns_ipi_id; }; struct rproc_subdev * mtk_rpmsg_create_rproc_subdev(struct platform_device *pdev, struct mtk_rpmsg_info *info); void mtk_rpmsg_destroy_rproc_subdev(struct rproc_subdev *subdev); #endif PK ! b^#f\ \ qcom_smd.hnu �[��� /* SPDX-License-Identifier: GPL-2.0 */ #ifndef _LINUX_RPMSG_QCOM_SMD_H #define _LINUX_RPMSG_QCOM_SMD_H #include <linux/device.h> struct qcom_smd_edge; #if IS_ENABLED(CONFIG_RPMSG_QCOM_SMD) struct qcom_smd_edge *qcom_smd_register_edge(struct device *parent, struct device_node *node); int qcom_smd_unregister_edge(struct qcom_smd_edge *edge); #else static inline struct qcom_smd_edge * qcom_smd_register_edge(struct device *parent, struct device_node *node) { return NULL; } static inline int qcom_smd_unregister_edge(struct qcom_smd_edge *edge) { return 0; } #endif #endif PK ! Q��.� � qcom_glink.hnu �[��� /* SPDX-License-Identifier: GPL-2.0 */ #ifndef _LINUX_RPMSG_QCOM_GLINK_H #define _LINUX_RPMSG_QCOM_GLINK_H #include <linux/device.h> struct qcom_glink; #if IS_ENABLED(CONFIG_RPMSG_QCOM_GLINK) void qcom_glink_ssr_notify(const char *ssr_name); #else static inline void qcom_glink_ssr_notify(const char *ssr_name) {} #endif #if IS_ENABLED(CONFIG_RPMSG_QCOM_GLINK_SMEM) struct qcom_glink *qcom_glink_smem_register(struct device *parent, struct device_node *node); void qcom_glink_smem_unregister(struct qcom_glink *glink); #else static inline struct qcom_glink * qcom_glink_smem_register(struct device *parent, struct device_node *node) { return NULL; } static inline void qcom_glink_smem_unregister(struct qcom_glink *glink) {} #endif #endif PK ! ��� � virtio_rpmsg_bus.konu �[��� ELF >