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

Commit 754a8023 authored by Konstantin Dorfman's avatar Konstantin Dorfman
Browse files

soc: qcom: add secure processor communication (spcom) driver



This driver supports communication with secure processor subsystem
over rpmsg and ungerlying glink transport layer.
The communication is based on using shared memory and interrupts.
This driver exposes interface to user space.

Migrate from using glink api to rpmsg api:
- removed not used glink functionality
- removed not used kernel api to spcom functionality
- implemented rpmsg driver registration for each new spcom channel
open/close/tx/rx/poll flows fixes:
- rpmsg_abort flag introduced to synchronize close() of a channel with
  pending sending or receiving data from the channel
- tx implemented as rpmsg_trysend() every 10ms (timeout_msec total)
- poll imlemented link up/down events as first/last rpmsg device
  probed/removed
- locking

ION api replaced by dma-buf:
ION api depricated.
This change implements following functionality:
Lock/unlock shared buffer by reference counting on underline dma-buf.
Translation user allocated shared buffer virtual address to
physical address (to enable SPU access to the buffer).

Change-Id: I28d704b18a3b0de9711ff3235c3f5551e7302557
Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>
parent 4cec0cd6
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
Qualcomm Technologies, Inc. Secure Proccessor Communication (spcom)

Required properties:
-compatible : should be "qcom,spcom"
-qcom,spcom-ch-names: predefined channels name string

Example:
    qcom,spcom {
            compatible = "qcom,spcom";
            qcom,spcom-ch-names = "sp_kernel" , "sp_ssr";
    };
+13 −0
Original line number Diff line number Diff line
@@ -432,6 +432,19 @@ config MSM_SPSS_UTILS
	  because the SPSS firmware size is too small to support multiple
	  HW versions.

config MSM_SPCOM
	depends on QCOM_GLINK
	bool "Secure Processor Communication over GLINK"
	help
	  spcom driver allows loading Secure Processor Applications and
	  sending messages to Secure Processor Applications.
	  spcom provides interface to both user space app and kernel driver.
	  It is using glink as the transport layer, which provides multiple
	  logical channels over single physical channel.
	  The physical layer is based on shared memory and interrupts.
	  spcom provides clients/server API, although currently only one client
	  or server is allowed per logical channel.

config QTI_RPMH_API
	bool "QTI RPMH (h/w accelerators) Communication API"
	select MAILBOX
+1 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ obj-$(CONFIG_MEM_SHARE_QMI_SERVICE) += memshare/
obj-$(CONFIG_MSM_PIL_SSR_GENERIC) += subsys-pil-tz.o
obj-$(CONFIG_MSM_PIL)   +=      peripheral-loader.o
obj-$(CONFIG_QCOM_RUN_QUEUE_STATS) += rq_stats.o
obj-$(CONFIG_MSM_SPCOM) += spcom.o
obj-$(CONFIG_QCOM_BUS_SCALING) += msm_bus/
obj-$(CONFIG_QCOM_COMMAND_DB) += cmd-db.o
obj-$(CONFIG_QTI_RPMH_API) += rpmh.o