09 Jun, 2017
4 commits
-
Commit 2a596c353234 ("MLK-13981-2 rpmsg: imx: enable rpmsg virt tty")
enabled support for imx7ulp but it broke support for imx7d since the
currently distributed M4 image for imx7d still uses the old
"rpmsg-openamp-demo-channel" naming.While we could change the channel name in the M4 image it is better to
maintain backwards compatibility, so add the old naming back to the id
table.Signed-off-by: Octavian Purdila
-
Add rpmsg-keys driver on i.mx7ulp-evk board since vol+/vol- keys
are connected on m4 side and have to get the status of keys by
rpmsg.Signed-off-by: Robin Gong
[Irina: updated for 4.9 APIs]
Signed-off-by: Irina Tirdea -
- add the .data into the imx_rpmsg_dt_ids table, thus
the driver can distinguish the different platforms.Signed-off-by: Richard Zhu
Tested-by: Daniel Baluta -
- change the module_init to subsys_initcall.
Otherwise, the pf1550-rpmsg would be invoked before
the rpmsg bus driver on imx7ulp.
Then, sdhc wouldn't be powered up properly if pf1550
isn't functional.
- remove the no longer used imc_rpmsg_exit.
- pass the real device id if the shared irq is requested.Signed-off-by: Richard Zhu
Tested-by: Daniel Baluta
08 Jun, 2017
3 commits
-
- move imx_rpmsg from arch/arm/ to drivers/rpmsg.
- use the new MU generic APIs in the rpmsg implementation.
- Validated the pingpong test on both imx6sx and imx7d sdb boards.Signed-off-by: Richard Zhu
-
Message can be transferred between remote
device and iMX7ULP M4.
Then the message can be transferred between A7
and M4 by rpmsg channel.
demo howto:
- insmode the imx_rpmsg_tty.ko module after
login A7/Linux.
- Receive messages. Used the following command
to dump out the msg from the virtual tty.
./unit_tests/mxc_mcc_tty_test.out /dev/ttyRPMSG 115200 R 100 1000 &
- Send: use the following command to send the
message to M4.
echo /dev/ttyRPMSGSigned-off-by: Richard Zhu
-
rpmsg core didn't take care of high memory case which may be triggered
in 1:3 kernel/userspace memory split. Get correct page by vmalloc_to_page
instead of virt_to_page.Signed-off-by: Robin Gong
23 Feb, 2017
3 commits
-
Set the imx rpmsg tests to be module in defaut.
Signed-off-by: Richard Zhu
(cherry picked from commit 20adce35ef6abfd6b0a52207febe069c7f09a1be) -
send a message to our remote processor, and tell remote
processor about this channelSigned-off-by: Richard Zhu
(cherry picked from commit 2708c004a60c5b6da020803ee9291b83984d4a65) -
enable the rpmsg pingpong and tty string echo tests
on imx amp socs
- pingpong test howto
insmod imx_rpmsg_pingpong.ko- tty string echo test howto
- step 1, load the imx_rpmsg_tty.ko
insmod imx_rpmsg_tty.ko
- step 2, lanunch the mxc_mcc_tty_test.out in backend
./mxc_mcc_tty_test.out /dev/ttyRPMSG 115200 R 512 512 &
- step 3, issue the echo command
echo > /dev/ttyRPMSGSigned-off-by: Richard Zhu
26 Jan, 2017
1 commit
-
commit 63447646ac657fde00bb658ce21a3431940ae0ad upstream.
Since commit 4dffed5b3ac796b ("rpmsg: Name rpmsg devices based on
channel id"), it is no more possible for a firmware to register twice
a service (on different endpoints). rpmsg_register_device function
is failing when calling device_add for the second time as second
device has the same name as first one already register.
It is because name is based only on service name and so is not more
unique. Previously name was unique thanks to the use of rpmsg_dev_index.This patch adds destination and source endpoint numbers device name to
create an unique identifier.Fixes: 4dffed5b3ac7 ("rpmsg: Name rpmsg devices based on channel id")
Acked-by: Peter Griffin
Signed-off-by: Loic Pallardy
[bjorn: flipped name and address in device name]
Signed-off-by: Bjorn Andersson
Signed-off-by: Greg Kroah-Hartman
12 Jan, 2017
1 commit
-
commit 1d74e7ed5dc1903ac081574a9b6aa94e7ba4ad45 upstream.
qcom_smd_send() should return -EAGAIN for non-blocking channels with
insufficient space, so that we can propagate this event to user space.Fixes: 53e2822e56c7 ("rpmsg: Introduce Qualcomm SMD backend")
Signed-off-by: Bjorn Andersson
Signed-off-by: Greg Kroah-Hartman
12 Sep, 2016
1 commit
-
The ARM allmodconfig build broke with the addition of the SMD rpmsg
driver that conflicts with the driver its replaces:WARNING: drivers/soc/qcom/smd: 'qcom_smd_register_edge' exported twice. Previous export was in drivers/rpmsg/qcom_smd.ko
WARNING: drivers/soc/qcom/smd: 'qcom_smd_unregister_edge' exported twice. Previous export was in drivers/rpmsg/qcom_smd.koThere is already a dependency that is meant to avoid the broken
configuration, but that only prevents the case where at least
one of the two are built-in, but not if both are modules.This changes the dependency to "=n", to ensure that the new driver
can only be enabled if the other one is completely disabled.Signed-off-by: Arnd Bergmann
Fixes: 53e2822e56c7 ("rpmsg: Introduce Qualcomm SMD backend")
Signed-off-by: Bjorn Andersson
09 Sep, 2016
17 commits
-
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
Cc: Sricharan R
Signed-off-by: Bjorn Andersson -
Some rpmsg backends support holding on to and redelivering messages upon
failed handling of them, so provide a way for the callback to report and
error and allow the backends to handle this.Signed-off-by: Bjorn Andersson
-
Move virtio rpmsg implementation details from the public header file to
the virtio rpmsg implementation.Signed-off-by: Bjorn Andersson
-
Create a container struct virtio_rpmsg_channel around the rpmsg_channel
to keep virtio backend information separate from the rpmsg and public
API. This makes the public structures independant of virtio.Signed-off-by: Bjorn Andersson
-
Move the device and endpoint indirection tables to the rpmsg internal
header file, to hide them from the public API.Signed-off-by: Bjorn Andersson
-
Extract the generic rpmsg core functionality from the virtio rpmsg
implementation, splitting the implementation in a rpmsg core and a
virtio backend.Based on initial work by Sricharan R
Cc: Sricharan R
Signed-off-by: Bjorn Andersson -
The tail of create_channel() is common among all rpmsg backends, so
split it off from the virtio specific part to allow it to be extracted
to the rpmsg core.Signed-off-by: Bjorn Andersson
-
Extract and move the helper function for finding rpmsg child devices to
the core.Signed-off-by: Bjorn Andersson
-
Move the rpmsg_send() and rpmsg_destroy_ept() interface to the rpmsg
core, so that we eventually can hide the rpmsg_endpoint ops from the
public API.Signed-off-by: Bjorn Andersson
-
Add indirection table for rpmsg_endpoint related operations and move
virtio implementation behind this, this finishes of the decoupling of
the virtio implementation from the public API.Signed-off-by: Bjorn Andersson
-
Extract the now indirect rpmsg_create_ept() interface to a separate
file and start building up a rpmsg core.Signed-off-by: Bjorn Andersson
-
To allow for multiple backend implementations add an indireection table
for rpmsg_device related operations and move the virtio implementation
behind this table.Signed-off-by: Bjorn Andersson
-
The rpmsg device representing struct is called rpmsg_channel and the
variable name used throughout is rpdev, with the communication happening
on endpoints it's clearer to just call this a "device" in a public API.Signed-off-by: Bjorn Andersson
-
As we introduce support for additional rpmsg backends, some of these
only supports point-to-point "links" represented by a name. By making
rpmsg_create_ept() take a channel_info struct we allow for these
backends to either be passed a source address, a destination address or
a name identifier.Signed-off-by: Bjorn Andersson
-
The rpmsg_send() operations has been taking a rpmsg_device, but this
forces users of secondary rpmsg_endpoints to use the rpmsg_sendto()
interface - by extracting source and destination from the given data
structures. If we instead pass the rpmsg_endpoint to these functions a
service can use rpmsg_sendto() to respond to messages, even on secondary
endpoints.In addition this would allow us to support operations on multiple
channels in future backends that does not support off-channel
operations.Signed-off-by: Bjorn Andersson
-
By basing rpmsg device names on channel id we end up with human readable
device names in sysfs and debug logs.Reviewed-by: Sarangdhar Joshi
Signed-off-by: Bjorn Andersson -
Make it possible to match rpmsg devices based on device tree node, in
addition to the id table. In some of these cases the rpmsg driver would
not have a id_table, so make this optional.Signed-off-by: Bjorn Andersson
13 Aug, 2016
5 commits
-
There are couple of print_hex_dump traces used in rpmsg code which
prints the actual byte messages being transferred between host and
the remote processors. These traces are quiet verbose and affects
performance, if the appropriate trace level is enabled. These hex
dumps are needed rather rarely, but are quite useful when debugging
complex IPC corner cases. So, this patch switches these hex dump
traces to use the dynamic_hex_dump() API.The hex dump traces are also enabled only when CONFIG_DYNAMIC_DEBUG
is enabled. This switch allows flexibility of controlling these
traces through dynamic debug, instead of removing them completely.Signed-off-by: Suman Anna
Signed-off-by: Bjorn Andersson -
This patch fixes most of the existing alignment checkpatch check
warnings of the type "Alignment should match open parenthesis"
in the virtio rpmsg bus code. A couple of them have been left as
is to not exceed the 80-char limit.Signed-off-by: Suman Anna
Signed-off-by: Bjorn Andersson -
The dma_addr_t types can be printed properly using the %pad
printk format-specifier, there is no need to resort to the
unsigned long long type-casting to deal with different possible
type sizes.Signed-off-by: Suman Anna
Signed-off-by: Bjorn Andersson -
These types of error prints are superfluous. The system will
pick up on OOM issues and let the user know. While at this,
fix the usage of using a structure instead of the actual
variable in one of the allocations.Signed-off-by: Suman Anna
Signed-off-by: Bjorn Andersson -
It should never have been there in the first place.
Signed-off-by: Lee Jones
Signed-off-by: Bjorn Andersson
11 Aug, 2016
1 commit
-
Found with scripts/coccinelle/misc/boolconv.cocci.
Signed-off-by: Andrew F. Davis
Signed-off-by: Bjorn Andersson
07 May, 2016
1 commit
-
Add register_rpmsg_driver helper macro that adds THIS_MODULE to
rpmsg_driver for the registering driver. We rename and modify
the existing register_rpmsg_driver to enable this.Signed-off-by: Andrew F. Davis
Acked-by: Suman Anna
Signed-off-by: Bjorn Andersson
13 Jan, 2016
1 commit
-
checkpatch.pl wants arrays of strings declared as follows:
static const char * const names[] = { "vq-1", "vq-2", "vq-3" };
Currently the find_vqs() function takes a const char *names[] argument
so passing checkpatch.pl's const char * const names[] results in a
compiler error due to losing the second const.This patch adjusts the find_vqs() prototype and updates all virtio
transports. This makes it possible for virtio_balloon.c, virtio_input.c,
virtgpu_kms.c, and virtio_rpmsg_bus.c to use the checkpatch.pl-friendly
type.Signed-off-by: Stefan Hajnoczi
Signed-off-by: Michael S. Tsirkin
Acked-by: Bjorn Andersson
13 Mar, 2015
1 commit
-
virtio spec requires that all drivers set DRIVER_OK
before using devices. While rpmsg isn't yet
included in the virtio 1 spec, previous spec versions
also required this.virtio rpmsg violates this rule: is calls kick
before setting DRIVER_OK.The fix isn't trivial since simply calling virtio_device_ready earlier
would mean we might get an interrupt in parallel with adding buffers.Instead, split kick out to prepare+notify calls. prepare before
virtio_device_ready - when we know we won't get interrupts. notify right
afterwards.Signed-off-by: Michael S. Tsirkin
Acked-by: Ohad Ben-Cohen
Signed-off-by: Rusty Russell
27 Nov, 2014
1 commit
-
Adjust the number of rpmsg buffers to rely on the size of the
vring, instead of using the hard coded value of 512 (256 per
direction).This is needed when small vrings are being used, where 256
buffers are too much to fit in a vring.While considering the vring size, keep using the 512 hard coded
value as an upper limit to avoid wacky resource tables consuming
unreasonable amount of memory.NOTE: The number of buffers is already assumed to be symmetrical
in each direction, and that logic is unchanged.Signed-off-by: Suman Anna
[edit commit message, small code and comment simplification]
Signed-off-by: Ohad Ben-Cohen