Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d064080d authored by Chris Lew's avatar Chris Lew
Browse files

rpmsg: Add snapshot of RPMSG Glink drivers



This snapshot is taken as of msm-4.14 'commit <67942dbf2187>
("Merge "net: netfilter: IRC DCC for private clients"")'.

This change brings the rpmsg and rpmsg glink drivers up to date with
the fixes from msm-4.14 and also adds the spi and spss transports from
msm-4.14. In addition, change the copyrights to SPDX format.

Change-Id: Idc0c9ad00c0562a7f3e2807ea9cfca644680dd9d
Signed-off-by: default avatarChris Lew <clew@codeaurora.org>
parent 4e1105e2
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -39,6 +39,28 @@ config RPMSG_QCOM_GLINK_SMEM
	  which provides support for using the GLINK communication protocol
	  over SMEM.

config RPMSG_QCOM_GLINK_SPSS
	tristate "QTI SPSS Glink driver"
	select RPMSG_QCOM_GLINK_NATIVE
	depends on MAILBOX
	depends on QCOM_SMEM
	select QSEE_IPC_IRQ
	help
	  Say y here to enable support for the GLINK SPSS communication driver,
	  which provides support for using the GLINK communication protocol
	  over SMEM. This protocol maps the smem and then shares the mapped
	  region with the remote proc by writing the smem descriptor location
	  and size into shared registers.

config RPMSG_QCOM_GLINK_SPI
	tristate "QTI SPI Glink driver"
	help
	  Say y here to enable support for the GLINK SPI communication driver,
	  which provides support for using the GLINK communication protocol
	  over SPI. This transport performs marshaling of GLINK commands and
	  data to the appropriate SPI bus wire format and allows for GLINK
	  communication with remote subsystems that are external to the SoC.

config RPMSG_QCOM_SMD
	tristate "Qualcomm Shared Memory Driver (SMD)"
	depends on MAILBOX
+2 −0
Original line number Diff line number Diff line
@@ -4,5 +4,7 @@ obj-$(CONFIG_RPMSG_CHAR) += rpmsg_char.o
obj-$(CONFIG_RPMSG_QCOM_GLINK_RPM) += qcom_glink_rpm.o
obj-$(CONFIG_RPMSG_QCOM_GLINK_NATIVE) += qcom_glink_native.o
obj-$(CONFIG_RPMSG_QCOM_GLINK_SMEM) += qcom_glink_smem.o
obj-$(CONFIG_RPMSG_QCOM_GLINK_SPSS) += qcom_glink_spss.o
obj-$(CONFIG_RPMSG_QCOM_GLINK_SPI) += qcom_glink_spi.o
obj-$(CONFIG_RPMSG_QCOM_SMD)	+= qcom_smd.o
obj-$(CONFIG_RPMSG_VIRTIO)	+= virtio_rpmsg_bus.o
+375 −47

File changed.

Preview size limit exceeded, changes collapsed.

+2 −0
Original line number Diff line number Diff line
@@ -22,6 +22,8 @@ struct qcom_glink_pipe {
	void (*write)(struct qcom_glink_pipe *glink_pipe,
		      const void *hdr, size_t hlen,
		      const void *data, size_t dlen);

	void (*reset)(struct qcom_glink_pipe *glink_pipe);
};

struct qcom_glink;
+4 −5
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2016, Linaro Ltd
 * Copyright (c) 2018, The Linux Foundation, All rights reserved.
 */

#include <linux/io.h>
@@ -90,13 +91,11 @@ static void glink_smem_rx_peak(struct qcom_glink_pipe *np,

	len = min_t(size_t, count, pipe->native.length - tail);
	if (len) {
		__ioread32_copy(data, pipe->fifo + tail,
				len / sizeof(u32));
		memcpy_fromio(data, pipe->fifo + tail, len);
	}

	if (len != count) {
		__ioread32_copy(data + len, pipe->fifo,
				(count - len) / sizeof(u32));
		memcpy_fromio(data + len, pipe->fifo, (count - len));
	}
}

@@ -109,7 +108,7 @@ static void glink_smem_rx_advance(struct qcom_glink_pipe *np,
	tail = le32_to_cpu(*pipe->tail);

	tail += count;
	if (tail > pipe->native.length)
	if (tail >= pipe->native.length)
		tail -= pipe->native.length;

	*pipe->tail = cpu_to_le32(tail);
Loading