Commit Graph

10 Commits

Author SHA1 Message Date
Srinivas Kandagatla aaafb24ebe rpmsg: qcom_smd: add of_node node to edge device
This patch assigns the device node to the edge device, so that the edge
device drivers could read required device tree properties.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2017-07-26 09:59:27 -07:00
Bjorn Andersson b0b03b8119 rpmsg: Release rpmsg devices in backends
The rpmsg devices are allocated in the backends and as such must be
freed there as well.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2017-05-17 10:30:22 -07:00
Bjorn Andersson 0be363bf4b rpmsg: smd: Register rpmsg user space interface for edges
Create and register a rpmsg device for use with the rpmsg user space
interface, allowing user space to access SMD channels.

Also provide the "rpmsg_name" device attribute to expose the edge name
in sysfs, allowing the user to write udev rules for specific rpmsg
devices and their children.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2017-01-18 10:43:15 -08:00
Bjorn Andersson adaa11b02c rpmsg: qcom_smd: Implement endpoint "poll"
Add support for polling the status of the write buffer so that user
space can use rpmsg character devices in non-blocking mode.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2017-01-18 10:43:15 -08:00
Bjorn Andersson 5e53c42c33 rpmsg: qcom_smd: Add support for "label" property
Add support for the "label" property, used to give the edge a name other
than the one of the DT node. This allows the implementor to provide
consistently named edges when using the rpmsg character device.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2017-01-18 10:43:15 -08:00
Linus Torvalds 961288108e rpmsg updates for v4.10
Argument validation in public functions, function stubs for COMPILE_TEST-ing
 clients, preparation for exposing rpmsg endponts to user space and minor
 Qualcomm SMD fixes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJYTz1VAAoJEAsfOT8Nma3FhPEP/RtU0W3x/rkjLzEECJBTyEDF
 DUXnl8et2mi9mGaRN4FZ/1lgUXl2P0D/MlS6hnH/ScZEH6NNioS1t5lit0SSpcHq
 oqM9i6gUYYRJbW6m3a4OECpX+hZ1R/en1B5AAJ9Hu+jNr8ZB2/pcafCfaH651v32
 0tUng7rNa0icdm1lc7FGDHw/P0NYFmPkQmG8L/eExOafSLL/P2G+SyMMamBNlKZc
 iZzZ6Vww7Le4mMst61hM9GSRlxslm/AeP8dPQYhV+7pLCXztKAAsUQJX74GynBLe
 /pewePo+ZNlip//Okyodjz2iPkn3Yt6WFIHhVLuhlxDRZr/TOmqXsk2jBlS4oChh
 mBkHk42OybywJp+wWWIPplfZQ5sJYBd1kNOGLX7f6aC9ngSK3u3PfKVFqFxB1Wrn
 2Nuis2or+5fv84fIZcAAuyvm72BUrikLUjiKu0d7dCnR3B2/2voPAu8Lhb4AgVH6
 qchqfX7LH5fdnBGkFIpIujQ2SjOGT+5zT+72IlPdqkCEHUy4eukUAC7WqMzCiDwO
 i0IPREkddYX+6yhWrIRIX08u/sQ/r/VldpatSuuTlLsMWdBVRhZH4K8e2KBgtimB
 0JkJPb/1sde1NH31k4V+WsJ4vp0FEj0MUbeHkyhWiC6DwH1GaG/KETX5oy9zhj6n
 gTb8+gZvk1IaJPaDvUqe
 =yDjM
 -----END PGP SIGNATURE-----

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

Pull rpmsg updates from Bjorn Andersson:
 "Argument validation in public functions, function stubs for
  COMPILE_TEST-ing clients, preparation for exposing rpmsg endponts
  to user space and minor Qualcomm SMD fixes"

* tag 'rpmsg-v4.10' of git://github.com/andersson/remoteproc:
  dt-binding: soc: qcom: smd: Add label property
  rpmsg: qcom_smd: Correct return value for O_NONBLOCK
  rpmsg: Provide function stubs for API
  rpmsg: Handle invalid parameters in public API
  rpmsg: Support drivers without primary endpoint
  rpmsg: Introduce a driver override mechanism
  rpmsg: smd: Reduce restrictions when finding channel
2016-12-13 08:52:45 -08:00
Bjorn Andersson 1d74e7ed5d rpmsg: qcom_smd: Correct return value for O_NONBLOCK
qcom_smd_send() should return -EAGAIN for non-blocking channels with
insufficient space, so that we can propagate this event to user space.

Fixes: 53e2822e56 ("rpmsg: Introduce Qualcomm SMD backend")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-12-08 07:58:05 -08:00
Bjorn Andersson 8fc947230f rpmsg: smd: Expose edge registration functions
The edge registration functions is to be used from a remoteproc driver
to register and unregister an edge as the remote processor comes and
goes.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-11-14 21:52:14 -08:00
Bjorn Andersson 66dca399e6 rpmsg: smd: Reduce restrictions when finding channel
SMD channels are created by the remotes in "opening" state, but
sometimes as we close and try to reopen them they linger in closing
state.

Following the search for a matching channel the create_ept() will verify
that the channel is in a suitable state, so we can lax the restrictions
of the search function to work around above difference in behaviour.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-10-31 15:40:40 -07:00
Bjorn Andersson 53e2822e56 rpmsg: Introduce Qualcomm SMD backend
This introduces a new rpmsg backend for the Qualcomm SMD system,
allowing communication with various remote processors found in Qualcomm
platforms. The implementation is based on, and intends to replace,
drivers/soc/qcom/smd.c with the necessary adaptions for fitting with the
rpmsg core.

Based on original work by Sricharan R <sricharan@codeaurora.org>

Cc: Sricharan R <sricharan@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2016-09-08 22:15:26 -07:00