processor-sdk/open-amp.git
4 years agorpmsg: remote_device: use hil_vdev_notify for remote_dev notify
Wendy Liang [Wed, 25 Jan 2017 07:48:08 +0000 (23:48 -0800)]
rpmsg: remote_device: use hil_vdev_notify for remote_dev notify

The rpmsg remote dev nofication is the vdev notification.
When it is called, the vq may not be ready. Use vdev notification
instead of vq notificataion.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil: add hil_notified
Wendy Liang [Wed, 25 Jan 2017 06:53:11 +0000 (22:53 -0800)]
hil: add hil_notified

Add hil_notified to handle notification from the remote.
The notification can be vdev notification, or vrings notification.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil: add proc_vdev reset callback
Wendy Liang [Wed, 25 Jan 2017 06:55:31 +0000 (22:55 -0800)]
hil: add proc_vdev reset callback

Add proc_vdev reset callback.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorpmsg: use hil_free_vqs to delete virtqueues
Wendy Liang [Tue, 24 Jan 2017 22:45:11 +0000 (14:45 -0800)]
rpmsg: use hil_free_vqs to delete virtqueues

Use hil_free_vqs to delete virtqueues of the specified vdev.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil: add free vqs for specified vdev
Wendy Liang [Wed, 25 Jan 2017 00:13:28 +0000 (16:13 -0800)]
hil: add free vqs for specified vdev

Add APIs to free vqs for the specified vdev.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil: add mutex lock to hil_proc
Wendy Liang [Wed, 25 Jan 2017 00:10:28 +0000 (16:10 -0800)]
hil: add mutex lock to hil_proc

Add mutex lock to hil_proc

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil: fix spaces in the headers
Wendy Liang [Tue, 24 Jan 2017 22:18:57 +0000 (14:18 -0800)]
hil: fix spaces in the headers

replace heading spaces with tab.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil: add hil_vdev_notify
Wendy Liang [Tue, 24 Jan 2017 22:11:52 +0000 (14:11 -0800)]
hil: add hil_vdev_notify

Add hil_vdev_notify to notify vdev config changes.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil: add intr info to proc_vdev
Wendy Liang [Tue, 24 Jan 2017 22:08:07 +0000 (14:08 -0800)]
hil: add intr info to proc_vdev

There should be notification settings for vdev.
Add intr info which stores the notification settings for
vdev.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agovirtio: replace _RESET status with _NEEDS_RESET
Wendy Liang [Tue, 24 Jan 2017 21:53:16 +0000 (13:53 -0800)]
virtio: replace _RESET status with _NEEDS_RESET

There is no _RESET status in virtio, remove it and
add _NEEDS_RESET status.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil: remove unused attributes
Wendy Liang [Tue, 24 Jan 2017 21:52:16 +0000 (13:52 -0800)]
hil: remove unused attributes

remove unused attributes from hil_proc struct

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoapps: generic: zynqmp_r5: sync linker script with latest xsdk
Wendy Liang [Tue, 24 Jan 2017 18:57:48 +0000 (10:57 -0800)]
apps: generic: zynqmp_r5: sync linker script with latest xsdk

Update the zynqmp_r5 generic linker script to match with the latest xsdk.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoapps: zynqmp_r5: add fw_chksum entry to rsc table
Wendy Liang [Tue, 24 Jan 2017 18:36:42 +0000 (10:36 -0800)]
apps: zynqmp_r5: add fw_chksum entry to rsc table

Add firmware checksum resource entry to the resource table.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoapps: zynqmp_r5: add rproc_mem to rsc table
Wendy Liang [Tue, 24 Jan 2017 18:32:20 +0000 (10:32 -0800)]
apps: zynqmp_r5: add rproc_mem to rsc table

Add rproc_mem resource entry to resource table.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremoteproc: resource table: add fw checksum rsc
Wendy Liang [Wed, 11 Jan 2017 00:14:49 +0000 (16:14 -0800)]
remoteproc: resource table: add fw checksum rsc

Add firmware checksum resource type to resource table.
It can be used for the master to check if the remote runs on
the expected firmware if it is still running before it tries
to boot the remote.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorproc: add rproc_mem resource entry
Wendy Liang [Mon, 23 Jan 2017 19:39:49 +0000 (11:39 -0800)]
rproc: add rproc_mem resource entry

Add fw_rsc_rproc_mem resource entry to tell the host the
remote processor's memory which can be used as shared memory.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorpmsg: remove setting remote dev active from remote dev kick
Wendy Liang [Mon, 16 Jan 2017 06:38:09 +0000 (22:38 -0800)]
rpmsg: remove setting remote dev active from remote dev kick

Move setting the remote device status from remote dev kick function
to the caller. It should be the caller to decide when it is ready.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorpmsg: start_ipc: only kick the remote if start_ipc from master
Wendy Liang [Mon, 16 Jan 2017 06:03:59 +0000 (22:03 -0800)]
rpmsg: start_ipc: only kick the remote if start_ipc from master

It only needs to kick the remote if it is the master calls
start_ipc after it is ready.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorpmsg: rdev_init: do not create rpmsg channels before remote is OK
Wendy Liang [Sun, 15 Jan 2017 07:06:42 +0000 (23:06 -0800)]
rpmsg: rdev_init: do not create rpmsg channels before remote is OK

It is the virtio master to allocate the vrings' memories, on the slave
side, it should not create channels before the master driver is OK.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorpmsg: remote_dev: add API to check if remote is ready
Wendy Liang [Tue, 24 Jan 2017 20:00:08 +0000 (12:00 -0800)]
rpmsg: remote_dev: add API to check if remote is ready

Add an API to check if the remote is ready.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorpmsg: remote_device: virio ops: get/set actual vdev status
Wendy Liang [Sun, 15 Jan 2017 07:03:39 +0000 (23:03 -0800)]
rpmsg: remote_device: virio ops: get/set actual vdev status

change get_status and set_status vdev operation to get/set the
actual virtio status from the resource table.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorsc table: move setting vring info to hil_get_vring_info
Wendy Liang [Fri, 13 Jan 2017 22:43:23 +0000 (14:43 -0800)]
rsc table: move setting vring info to hil_get_vring_info

moving setting vrings info to hil_get_vring_info() because
when resource table is passed the vring information maynot
have been setup yet.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremoteproc: rsc parser: set vdev_info to proc_vdev
Wendy Liang [Fri, 13 Jan 2017 19:58:58 +0000 (11:58 -0800)]
remoteproc: rsc parser: set vdev_info to proc_vdev

Store the vdev resource pointer to proc_vdev so that it will
be able to get remote update.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil: Add vdev_info to proc_vdev struct
Wendy Liang [Fri, 13 Jan 2017 19:50:00 +0000 (11:50 -0800)]
hil: Add vdev_info to proc_vdev struct

Add a field to point to the virtio dev information.
Currently, it will be the pointer to the vdev resource in the
resource table.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremoteproc: zynqMP_a53: Do not clear IPI irq when it is probed
Wendy Liang [Fri, 13 Jan 2017 18:53:47 +0000 (10:53 -0800)]
remoteproc: zynqMP_a53: Do not clear IPI irq when it is probed

Do not clear IPI irq when it is probed as it is possible for the other
end has already kicked IPI when it is probed.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agofix install paths to work for multilib
Wendy Liang [Fri, 3 Feb 2017 18:00:29 +0000 (10:00 -0800)]
fix install paths to work for multilib

When running multilib builds on 64-bit platforms, the system library
paths need to be adjusted to either lib64/lib32, or lib64/lib in a
distro specific way.  This is handled via CMAKE_INSTALL_LIBDIR/BINDIR
variable

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorpmsg: change channel state if nameservice is sent
Wendy Liang [Tue, 13 Dec 2016 01:15:56 +0000 (17:15 -0800)]
rpmsg: change channel state if nameservice is sent

Should not blindly change the channel state after
sending the name service message.
because it is possible that name service fails to send.
e.g. it fails to get the buffer to send the name service
message.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoUse meta-openamp to build Linux Userspace OpenAMP
Wendy Liang [Mon, 12 Dec 2016 17:48:17 +0000 (09:48 -0800)]
Use meta-openamp to build Linux Userspace OpenAMP

Update instructions to use meta-openamp to build OpenAMP in
Linux userspace.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremoteproc: zynq: remove compile warning v2016.10
Sam Sortais [Fri, 4 Nov 2016 01:42:05 +0000 (18:42 -0700)]
remoteproc: zynq: remove compile warning

Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
4 years agoremoteproc: zynq: do not free proc mem in release
Wendy Liang [Thu, 3 Nov 2016 18:51:51 +0000 (11:51 -0700)]
remoteproc: zynq: do not free proc mem in release

As the hil_proc memory is allocated and free in the hil APIs.
We should not free it in the remoteproc driver.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoUpdate README for the OpenAMP on top of libmetal
Wendy Liang [Mon, 17 Oct 2016 21:00:37 +0000 (14:00 -0700)]
Update README for the OpenAMP on top of libmetal

Update the README file for the structure and the compilation basic
instructions for OpenAMP on top of libmetal.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove the system/machine dependent layers
Wendy Liang [Sat, 15 Oct 2016 00:21:07 +0000 (17:21 -0700)]
Remove the system/machine dependent layers

As libmetal provides system/machine dependent metal access functions,
we remove the system/machine dependent layers from OpenAMP.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoUse libmetal sleep and timestamp APIs
Wendy Liang [Sat, 15 Oct 2016 00:29:34 +0000 (17:29 -0700)]
Use libmetal sleep and timestamp APIs

Replace the OpenAMP sleep and timestamp APIs with
those provided from libmetal.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove machine specific include directory
Wendy Liang [Fri, 14 Oct 2016 18:31:51 +0000 (11:31 -0700)]
Remove machine specific include directory

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdding RPMsg Extension layer implementing zero-copy send and receive.
Marek Novak (NXA17138) [Wed, 24 Aug 2016 13:12:06 +0000 (15:12 +0200)]
Adding RPMsg Extension layer implementing zero-copy send and receive.

Signed-off-by: Marek Novak <marek.novak@nxp.com>
Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoUpdate applications RPMsg between processes
Wendy Liang [Mon, 12 Sep 2016 21:46:05 +0000 (14:46 -0700)]
Update applications RPMsg between processes

This patch is to update the application demos to show
the RPMsg between processes

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: zynqmp: Add API to get rsc table
Wendy Liang [Wed, 5 Oct 2016 20:48:25 +0000 (13:48 -0700)]
Apps: zynqmp: Add API to get rsc table

This API is introduced for applications to get the resource table
across different  platforms. For baremetal/RTOS, you don't actually
need this API, but for Linux userspace, it is required as it
can have multiple resource talbes for different remotes.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: zynq7: Add API to get rsc table
Wendy Liang [Fri, 30 Sep 2016 21:03:37 +0000 (14:03 -0700)]
Apps: zynq7: Add API to get rsc table

This API is introduced for applications to get the resource table
across different  platforms. For baremetal/RTOS, you don't actually
need this API, but for Linux userspace, it is required as it
can have multiple resource talbes for different remotes.

4 years agoApps: zynqmp_r5: Add API to get rsc table
Wendy Liang [Fri, 30 Sep 2016 20:56:40 +0000 (13:56 -0700)]
Apps: zynqmp_r5: Add API to get rsc table

This API is introduced for applications to get the resource table
across different  platforms. For baremetal/RTOS, you don't actually
need this API, but for Linux userspace, it is required as it
can have multiple resource talbes for different remotes.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd Linux application generic initialization
Wendy Liang [Mon, 12 Sep 2016 21:45:22 +0000 (14:45 -0700)]
Add Linux application generic initialization

Add apps common for RPMsg between Linux processes.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd Linux remoteproc between two processes
Wendy Liang [Mon, 12 Sep 2016 21:44:12 +0000 (14:44 -0700)]
Add Linux remoteproc between two processes

Introduce a remoteproc driver for the RPMsg between
two Linux processes.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoUpdate demo apps to use new HIL proc APIs
Wendy Liang [Thu, 22 Sep 2016 06:36:59 +0000 (23:36 -0700)]
Update demo apps to use new HIL proc APIs

As the hil_proc init APIs has been changed, the applications OpenAMP
initialization needs to update to use the new APIs.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoNot use remoteproc_plat in Zynq7 BM apps helpers
Wendy Liang [Fri, 23 Sep 2016 22:35:53 +0000 (15:35 -0700)]
Not use remoteproc_plat in Zynq7 BM apps helpers

As remoteproc_plat has been removed, update the Zynq7 baremetal apps
helper functions not to use those APIs.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove remoteproc_plat from Zynq remoteproc driver
Wendy Liang [Fri, 23 Sep 2016 23:02:54 +0000 (16:02 -0700)]
Remove remoteproc_plat from Zynq remoteproc driver

As remoteproc_plat has been removed, update the Zynq
baremetal/RTOS driver to remove using remoteproc_plat.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoNot use remoteproc_plat in ZynqMP apps helper functions
Wendy Liang [Thu, 22 Sep 2016 06:34:36 +0000 (23:34 -0700)]
Not use remoteproc_plat in ZynqMP apps helper functions

As remoteproc_plat has been removed, update the ZynqMP Linux
userspace apps helper functions not to use those APIs.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove remoteproc_plat in ZynqMP rproc driver
Wendy Liang [Thu, 22 Sep 2016 06:33:00 +0000 (23:33 -0700)]
Remove remoteproc_plat in ZynqMP rproc driver

As remoteproc_plat has been removed, update the remoteproc driver
not to use that APIs.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoNot use remoteproc_plat in ZynqMP R5 apps helpers
Wendy Liang [Thu, 22 Sep 2016 06:29:35 +0000 (23:29 -0700)]
Not use remoteproc_plat in ZynqMP R5 apps helpers

As remoteproc_plat has been removed, update the ZynqMP R5 apps
helper functions not to use those APIs.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove remoteproc_plat from ZynqMP R5 rproc driver
Wendy Liang [Thu, 22 Sep 2016 06:25:41 +0000 (23:25 -0700)]
Remove remoteproc_plat from ZynqMP R5 rproc driver

As remoteproc_plat has been removed, update the driver not
to use that driver.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoupdate hil_proc not to add new user data struct
Wendy Liang [Thu, 22 Sep 2016 06:24:48 +0000 (23:24 -0700)]
update hil_proc not to add new user data struct

This patch is to:
* hide hil_proc data struct details from user
* not to introduce new data structure for user to understand

Here is the new flow:
For RPMsg slave:
* proc = hil_create_proc(<hil_proc_ops>)
* hil_set_rpmsg_channel()
* hil_set_ipi()
* remoteproc_resource_init(<rsc_tabl>,<hil_proc>, ...)

For RPMsg master:
* proc = hil_create_proc(<hil_proc_ops>)
* hil_set_rpmsg_channel()
* hil_set_shm()
* hil_set_ipi()
* remoteproc_resource_init(<rsc_tabl>,<hil_proc>, ...)

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoIntroduce openamp_print
Wendy Liang [Thu, 1 Sep 2016 18:28:36 +0000 (11:28 -0700)]
Introduce openamp_print

Add openamp_print() instead of directly using printf for
printing in OpenAMP repo.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: update zynqmp example
Wendy Liang [Thu, 1 Sep 2016 22:28:02 +0000 (15:28 -0700)]
Apps: update zynqmp example

Update the ZynqMP example to move the firmware run on
TCM instead of OCM.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: move linux helper to linux/machine
Wendy Liang [Thu, 1 Sep 2016 22:26:33 +0000 (15:26 -0700)]
Apps: move linux helper to linux/machine

As the application initialization is system dependent,
move the helper.c which for the system initialization
to linux/machine.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd DTSI example to OpenAMP in Linux userspace
Wendy Liang [Fri, 26 Aug 2016 22:56:39 +0000 (15:56 -0700)]
Add DTSI example to OpenAMP in Linux userspace

Add the DTSI example to OpenAMP in Linux userspace.
The example is for Xilinx Zynq Ultrascale+ MPSoC.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agozynq_remoteproc: solve the atomic warning
Wendy Liang [Fri, 19 Aug 2016 16:46:11 +0000 (09:46 -0700)]
zynq_remoteproc: solve the atomic warning

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoadd option to exclude dependency check
Sam Sortais [Mon, 22 Aug 2016 17:37:36 +0000 (10:37 -0700)]
add option to exclude dependency check

Add option to avoid checking for pre-existence of libmetal.a.
Add option to avoid checking external include existence.
This is needed in case cmake is invoked before those others are created.

Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
4 years agoadd explicit include to errno.h
Sam Sortais [Fri, 19 Aug 2016 05:32:30 +0000 (22:32 -0700)]
add explicit include to errno.h

Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
4 years agoadd freertos env
Sam Sortais [Thu, 18 Aug 2016 11:10:11 +0000 (04:10 -0700)]
add freertos env

env_sleep_msec is needed by openamp lib.
this will eventually disapear when moved to libmetal.

Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
4 years agomatrix_multiplyd clarify main loop
Sam Sortais [Thu, 18 Aug 2016 09:22:45 +0000 (02:22 -0700)]
matrix_multiplyd clarify main loop

Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
4 years agorpc_demo code cleanup
Sam Sortais [Thu, 18 Aug 2016 07:12:37 +0000 (00:12 -0700)]
rpc_demo code cleanup

Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
4 years agoecho_testd simplify main loop
Sam Sortais [Thu, 18 Aug 2016 04:35:44 +0000 (21:35 -0700)]
echo_testd simplify main loop

Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
4 years agocleanup: const definition, unused includes,...
Sam Sortais [Thu, 18 Aug 2016 00:46:28 +0000 (17:46 -0700)]
cleanup: const definition, unused includes,...

Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
4 years agoCMake: generic: ZynqMP R5: udpate to use libxil, libmetal
Wendy Liang [Tue, 16 Aug 2016 05:31:23 +0000 (22:31 -0700)]
CMake: generic: ZynqMP R5: udpate to use libxil, libmetal

Update ZynqMP R5 generic CMake toolchain file to use libxil, libmetal
libraries.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoCMake: Zynq: generic: update to use xil,metal lib
Wendy Liang [Tue, 16 Aug 2016 05:24:17 +0000 (22:24 -0700)]
CMake: Zynq: generic: update to use xil,metal lib

Default Zynq generic CMake toolchain file is updated to use libxil and
libmetal libraries.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: Remove the need to have old Zynq includes
Wendy Liang [Tue, 16 Aug 2016 05:09:46 +0000 (22:09 -0700)]
Apps: Remove the need to have old Zynq includes

Remove the need to have old Zynq include headers.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: CMake: allow system machine linker option
Wendy Liang [Tue, 16 Aug 2016 04:59:47 +0000 (21:59 -0700)]
Apps: CMake: allow system machine linker option

Allow to specify system/machine specific linker option.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: ZynqMP R5: specify full linker script option
Wendy Liang [Tue, 16 Aug 2016 04:48:39 +0000 (21:48 -0700)]
Apps: ZynqMP R5: specify full linker script option

Instead of just specifying the linker script, specify the
system machine specific linker option.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: Zynq: Update to use libmetal I/O and device
Wendy Liang [Tue, 16 Aug 2016 04:47:29 +0000 (21:47 -0700)]
Apps: Zynq: Update to use libmetal I/O and device

Update Zynq generic system implementation to use libmetal I/O and
device APIs

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove Zynq7 generic system implementation
Wendy Liang [Tue, 16 Aug 2016 04:19:59 +0000 (21:19 -0700)]
Remove Zynq7 generic system implementation

As the Zynq7 generic system implementation is covered by libmetal,
removed the implementation in the OpenAMP repo.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoZynq remoteproc: update to use libmetal APIs
Wendy Liang [Tue, 16 Aug 2016 04:06:22 +0000 (21:06 -0700)]
Zynq remoteproc: update to use libmetal APIs

Update the Zynq remoteproc driver to user libmetal I/O region
for IPI, and implement the hil_proc poll() for application to
poll if virings are notified.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove ZynqMP R5 system/machine specific files
Wendy Liang [Mon, 15 Aug 2016 23:30:54 +0000 (16:30 -0700)]
Remove ZynqMP R5 system/machine specific files

Remove ZynqMP R5 system/machine specific files
as they are no longer required.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoUpdate CMake files to compile OpenAMP for Linux
Wendy Liang [Mon, 15 Aug 2016 22:49:54 +0000 (15:49 -0700)]
Update CMake files to compile OpenAMP for Linux

This patch is to enable to build OpenAMP for Linux
userspace.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: Add Linux and ZynqMP layer
Wendy Liang [Mon, 15 Aug 2016 22:47:07 +0000 (15:47 -0700)]
Apps: Add Linux and ZynqMP layer

Add the Linux system and ZynqMP layer to do the ZynqMP
Linux system specific initialization.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd Linux env
Wendy Liang [Mon, 15 Aug 2016 22:45:07 +0000 (15:45 -0700)]
Add Linux env

this is to add the OpenAMO Linux evnvironment layer.
This is a temporary workaround as the sleep and timestamp is not
implemented in the libmetal yet.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd proxy deamon service demo application
Wendy Liang [Mon, 15 Aug 2016 22:42:46 +0000 (15:42 -0700)]
Add proxy deamon service demo application

This application will listen the proxy RPMsg
endpoint, it will implement the file operations
specified in the RPMsg.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd matrix multiplication client demo application
Wendy Liang [Mon, 15 Aug 2016 22:39:56 +0000 (15:39 -0700)]
Add matrix multiplication client demo application

This application is to generate random 6*6 matrices, send them
to the remote, and wait for the result, and then it will check
if the result is as expected.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd echo_test client demo applicaiton
Wendy Liang [Mon, 15 Aug 2016 22:35:29 +0000 (15:35 -0700)]
Add echo_test client demo applicaiton

This application is to send message to the other end
and wait for the other end to send it back and check if
the message echoed back is the same as expected.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd zynqMP APU to RPU remoteproc driver
Wendy Liang [Mon, 15 Aug 2016 22:32:30 +0000 (15:32 -0700)]
Add zynqMP APU to RPU remoteproc driver

This driver is used to trigger IPI if application has
a message to send, or for applicaiton to morning the IPI
and vrings to see if there was message sent from the RPU
is available.

It polls the IPI ISR to see if the other side kicks the APU.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoenv: introduce OpenAMP debug
Wendy Liang [Mon, 15 Aug 2016 22:28:21 +0000 (15:28 -0700)]
env: introduce OpenAMP debug

If OPENAMP_DEBUG is defined, enable to use openamp_dbg
to print debugging messages.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoOpenAMP: env: remove unused env funcitons
Wendy Liang [Mon, 15 Aug 2016 22:03:05 +0000 (15:03 -0700)]
OpenAMP: env: remove unused env funcitons

Remove the following env functions which have been replaced
by the libmetal functions:
 * locking
 * va to pa conversion and vice versa
 * interrupt handling

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoReplace alloc/free memory with the libmetal APIs
Wendy Liang [Fri, 12 Aug 2016 21:55:59 +0000 (14:55 -0700)]
Replace alloc/free memory with the libmetal APIs

Replace:
 * env_allocate_memory with metal_allocate_memory
 * env_free_memory with metal_free_memory

4 years agoremoteproc: r5 to a53: remove shm mem map
Wendy Liang [Fri, 12 Aug 2016 17:44:41 +0000 (10:44 -0700)]
remoteproc: r5 to a53: remove shm mem map

As the Cortex R5 to A53 remoteproc calls the remoteproc platform
for initialization, the shared memory mapping is done in the
remoteproc platform, remove the duplication from this remoteproc
driver.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremoteproc plat: init shmem if required
Wendy Liang [Fri, 12 Aug 2016 17:41:07 +0000 (10:41 -0700)]
remoteproc plat: init shmem if required

memory map the shared memory if shared memory is provided.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorpc_demo: print to proxy before it send shutdown
Wendy Liang [Thu, 11 Aug 2016 18:47:37 +0000 (11:47 -0700)]
rpc_demo: print to proxy before it send shutdown

Print to the proxy before it sends the ready to shutdown
message to the remote.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorpmsg_retarget: check if proxy is created
Wendy Liang [Thu, 11 Aug 2016 18:44:55 +0000 (11:44 -0700)]
rpmsg_retarget: check if proxy is created

Only do rpmsg_retarget if proxy is created.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremoteproc: shutdown before rpmsg deinit
Wendy Liang [Tue, 9 Aug 2016 23:10:27 +0000 (16:10 -0700)]
remoteproc: shutdown before rpmsg deinit

As the rpmsg deinit will delete the remoteproc,
will need to shutdown the remote before the remoteproc
is deleted.

There should be another fix to do the shutdown after
rpmsg channels shutdown but before deleting the remoteproc.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremoteproc: not del remoteproc after deinit rpmsg
Wendy Liang [Tue, 9 Aug 2016 22:45:22 +0000 (15:45 -0700)]
remoteproc: not del remoteproc after deinit rpmsg

Remoteproc is deleted when deinit rpmsg, do not delete
the remoteproc again.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoUse libmetal_memset/memcpy_io for device memory
Wendy Liang [Tue, 9 Aug 2016 05:39:02 +0000 (22:39 -0700)]
Use libmetal_memset/memcpy_io for device memory

The default memset/memcpy doesn't always work for device memory as
some architecture assumes device memory access needs to be address aligned.
the libemtal memset/memcpy IO allows unaligned device memory address.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: generic: ZynqMP R5: use libmetal ISR
Wendy Liang [Sat, 6 Aug 2016 05:34:11 +0000 (22:34 -0700)]
Apps: generic: ZynqMP R5: use libmetal ISR

Use libmetal ISR in ZynqMP R5 generic for interrupt handling.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoUse uintptr_t for firmware addr
Wendy Liang [Sat, 6 Aug 2016 05:22:54 +0000 (22:22 -0700)]
Use uintptr_t for firmware addr

Use uintptr_t for firmware address to avoid compilation warning

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremoteproc: zynqmp_r5: Update to use libmetal irq
Wendy Liang [Sat, 6 Aug 2016 05:18:14 +0000 (22:18 -0700)]
remoteproc: zynqmp_r5: Update to use libmetal irq

Update ZynqMP R5 remoteproc driver to use libmetal IRQ APIs

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: remoteproc slave: use hil_poll()
Wendy Liang [Thu, 4 Aug 2016 18:51:28 +0000 (11:51 -0700)]
Apps: remoteproc slave: use hil_poll()

Use hil_poll() to wait for remoteproc to be signaled.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: platform info: ZynqMP r5: update IPI info
Wendy Liang [Thu, 4 Aug 2016 17:02:38 +0000 (10:02 -0700)]
Apps: platform info: ZynqMP r5: update IPI info

Add sync lock to IPI info, it is used by the remoteproc driver
to know if the vring is signaled by the other end.

This is dependent to the remoteproc driver implementation.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: remoteproc slave: user libmetal dev
Wendy Liang [Thu, 4 Aug 2016 18:34:49 +0000 (11:34 -0700)]
Apps: remoteproc slave: user libmetal dev

Update the remoteproc slave applications to use libmetal device
for platform initialization.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: platform init: ZynqMP r5: use libmetal dev
Wendy Liang [Thu, 4 Aug 2016 16:56:15 +0000 (09:56 -0700)]
Apps: platform init: ZynqMP r5: use libmetal dev

Use libmetal device in the platform initialization data

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorpmsg proxy: Use hil_proc poll to wait
Wendy Liang [Thu, 4 Aug 2016 16:47:22 +0000 (09:47 -0700)]
rpmsg proxy: Use hil_proc poll to wait

Use hil_proc poll() API to wait for remoteproc to be signaled.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoZynqmp R5 remoteproc: implement poll function
Wendy Liang [Thu, 4 Aug 2016 16:41:51 +0000 (09:41 -0700)]
Zynqmp R5 remoteproc: implement poll function

Implement the poll() function in the ZynqMP R5 driver.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd hil_proc poll()
Wendy Liang [Thu, 4 Aug 2016 05:19:10 +0000 (22:19 -0700)]
Add hil_proc poll()

Add hil_proc poll() for user to poll if the remoteproc has been
signaled.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agovirtqueue: Use I/O region for pa to va convertion
Wendy Liang [Wed, 3 Aug 2016 16:46:44 +0000 (09:46 -0700)]
virtqueue: Use I/O region for pa to va convertion

In the virtqueue implementation, use I/O region for the physical
address to virtual address converstion.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove llist from the library
Wendy Liang [Wed, 3 Aug 2016 00:00:19 +0000 (17:00 -0700)]
Remove llist from the library

As llist has been replaced with the metal_list and metal_sg,
we can remove the llist from the OpenAMP library.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agovirtqueue: Add shared memory I/O region
Wendy Liang [Tue, 2 Aug 2016 23:56:50 +0000 (16:56 -0700)]
virtqueue: Add shared memory I/O region

Add shared memory I/O region to the virtqueue struct.

Signed-off-by: Wendy Liang <jliang@xilinx.com>