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

Commit 426b8eeb authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'rpmsg-v4.13' of git://github.com/andersson/remoteproc

Pull rpmsg updates from Bjorn Andersson:
 "This introduces the Qualcomm GLINK protocol driver and
  DeviceTree-based modalias support, as well as a number of smaller
  fixes"

* tag 'rpmsg-v4.13' of git://github.com/andersson/remoteproc:
  rpmsg: Make modalias work for DeviceTree based devices
  rpmsg: Drop VIRTUALIZATION dependency from RPMSG_VIRTIO
  rpmsg: Don't overwrite release op of rpdev
  rpmsg: virtio_rpmsg_bus: cleanup multiple assignment to ops
  rpmsg: virtio_rpmsg_bus: fix nameservice address
  rpmsg: cleanup incorrect function in dev_err message
  rpmsg: virtio_rpmsg_bus: fix announce for devices without endpoint
  rpmsg: Introduce Qualcomm RPM glink driver
  soc: qcom: Add device tree binding for GLINK RPM
  rpmsg: Release rpmsg devices in backends
parents 0dfaeb61 f4ce8528
Loading
Loading
Loading
Loading
+73 −0
Original line number Diff line number Diff line
Qualcomm RPM GLINK binding

This binding describes the Qualcomm RPM GLINK, a fifo based mechanism for
communication with the Resource Power Management system on various Qualcomm
platforms.

- compatible:
	Usage: required
	Value type: <stringlist>
	Definition: must be "qcom,glink-rpm"

- interrupts:
	Usage: required
	Value type: <prop-encoded-array>
	Definition: should specify the IRQ used by the remote processor to
		    signal this processor about communication related events

- qcom,rpm-msg-ram:
	Usage: required
	Value type: <prop-encoded-array>
	Definition: handle to RPM message memory resource

- mboxes:
	Usage: required
	Value type: <prop-encoded-array>
	Definition: reference to the "rpm_hlos" mailbox in APCS, as described
		    in mailbox/mailbox.txt

= GLINK DEVICES
Each subnode of the GLINK node represent function tied to a virtual
communication channel. The name of the nodes are not important. The properties
of these nodes are defined by the individual bindings for the specific function
- but must contain the following property:

- qcom,glink-channels:
	Usage: required
	Value type: <stringlist>
	Definition: a list of channels tied to this function, used for matching
		    the function to a set of virtual channels

= EXAMPLE
The following example represents the GLINK RPM node on a MSM8996 device, with
the function for the "rpm_request" channel defined, which is used for
regualtors and root clocks.

	apcs_glb: mailbox@9820000 {
		compatible = "qcom,msm8996-apcs-hmss-global";
		reg = <0x9820000 0x1000>;

		#mbox-cells = <1>;
	};

	rpm_msg_ram: memory@68000 {
		compatible = "qcom,rpm-msg-ram";
		reg = <0x68000 0x6000>;
	};

	rpm-glink {
		compatible = "qcom,glink-rpm";

		interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;

		qcom,rpm-msg-ram = <&rpm_msg_ram>;

		mboxes = <&apcs_glb 0>;

		rpm-requests {
			compatible = "qcom,rpm-msm8996";
			qcom,glink-channels = "rpm_requests";

			...
		};
	};
+10 −1
Original line number Diff line number Diff line
@@ -13,6 +13,16 @@ config RPMSG_CHAR
	  in /dev. They make it possible for user-space programs to send and
	  receive rpmsg packets.

config RPMSG_QCOM_GLINK_RPM
	tristate "Qualcomm RPM Glink driver"
	select RPMSG
	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_SMD
	tristate "Qualcomm Shared Memory Driver (SMD)"
	depends on QCOM_SMEM
@@ -26,6 +36,5 @@ config RPMSG_VIRTIO
	tristate
	select RPMSG
	select VIRTIO
	select VIRTUALIZATION

endmenu
+1 −0
Original line number Diff line number Diff line
obj-$(CONFIG_RPMSG)		+= rpmsg_core.o
obj-$(CONFIG_RPMSG_CHAR)	+= rpmsg_char.o
obj-$(CONFIG_RPMSG_QCOM_GLINK_RPM) += qcom_glink_rpm.o
obj-$(CONFIG_RPMSG_QCOM_SMD)	+= qcom_smd.o
obj-$(CONFIG_RPMSG_VIRTIO)	+= virtio_rpmsg_bus.o
+1233 −0

File added.

Preview size limit exceeded, changes collapsed.

+11 −0
Original line number Diff line number Diff line
@@ -969,6 +969,14 @@ static const struct rpmsg_endpoint_ops qcom_smd_endpoint_ops = {
	.poll = qcom_smd_poll,
};

static void qcom_smd_release_device(struct device *dev)
{
	struct rpmsg_device *rpdev = to_rpmsg_device(dev);
	struct qcom_smd_device *qsdev = to_smd_device(rpdev);

	kfree(qsdev);
}

/*
 * Create a smd client device for channel that is being opened.
 */
@@ -998,6 +1006,7 @@ static int qcom_smd_create_device(struct qcom_smd_channel *channel)

	rpdev->dev.of_node = qcom_smd_match_channel(edge->of_node, channel->name);
	rpdev->dev.parent = &edge->dev;
	rpdev->dev.release = qcom_smd_release_device;

	return rpmsg_register_device(rpdev);
}
@@ -1013,6 +1022,8 @@ static int qcom_smd_create_chrdev(struct qcom_smd_edge *edge)
	qsdev->edge = edge;
	qsdev->rpdev.ops = &qcom_smd_device_ops;
	qsdev->rpdev.dev.parent = &edge->dev;
	qsdev->rpdev.dev.release = qcom_smd_release_device;

	return rpmsg_chrdev_register_device(&qsdev->rpdev);
}

Loading