processor-sdk/open-amp.git
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>
4 years agoReplace llist rpmsg buf with libmetal scatter/gather list
Wendy Liang [Tue, 2 Aug 2016 22:50:47 +0000 (15:50 -0700)]
Replace llist rpmsg buf with libmetal scatter/gather list

Use libmetal scatter/gather list to replace the llist buffers.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremoteproc: rsc table: use libmetal to map memory
Wendy Liang [Tue, 2 Aug 2016 20:57:21 +0000 (13:57 -0700)]
remoteproc: rsc table: use libmetal to map memory

Use libmetal memory map API to do memory mapping.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremoteproc: ZynqMP R5: remove flushing caches
Wendy Liang [Tue, 2 Aug 2016 20:13:56 +0000 (13:13 -0700)]
remoteproc: ZynqMP R5: remove flushing caches

We should not flush all caches in the remoteproc driver when
it receives a kick from the other end or before it kick the
other end.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoZynqMP: init hil_proc with remoteproc plat API
Wendy Liang [Mon, 1 Aug 2016 04:09:43 +0000 (21:09 -0700)]
ZynqMP: init hil_proc with remoteproc plat API

Initialize the hil_proc with remoteproc platform API.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd remoteproc platform APIs
Wendy Liang [Mon, 1 Aug 2016 04:08:02 +0000 (21:08 -0700)]
Add remoteproc platform APIs

Add remoteproc platform APIs to setup the hil_proc
with the input platform user data.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorpmsg: run cache ops against cacheable buffers
Wendy Liang [Tue, 2 Aug 2016 18:42:32 +0000 (11:42 -0700)]
rpmsg: run cache ops against cacheable buffers

If the shared buffers are cacheable, flush cache
before it enqueues the buffer to send, and invalidate
cache before it reads the buffer to receive.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd metal device and I/O region to hil_proc
Wendy Liang [Mon, 1 Aug 2016 03:30:24 +0000 (20:30 -0700)]
Add metal device and I/O region to hil_proc

Add metal_device and I/O region to the following hil_proc elements:
* vring
* vring IPI
* shm (shared memory)

So that later, can use the metal device, I/O region to access the
device and the shared memory.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agozynqmp remoteproc: cleanup IPI in the driver probe
Wendy Liang [Fri, 29 Jul 2016 18:21:15 +0000 (11:21 -0700)]
zynqmp remoteproc: cleanup IPI in the driver probe

This patch is to clean up the IPI interrupts in the driver probe()
function.
It assumes the other end will not start triggering IPI until it
finish initialization.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoZynq7 master: Add the firmware table to app init
Wendy Liang [Mon, 1 Aug 2016 18:03:55 +0000 (11:03 -0700)]
Zynq7 master: Add the firmware table to app init

Add the firmware table to the application initialization.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agofirmware: move the firmware table out from lib
Wendy Liang [Mon, 1 Aug 2016 17:58:16 +0000 (10:58 -0700)]
firmware: move the firmware table out from lib

Move the predefined firmware table out from the library.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremoteproc: remove system cleanup related from lib
Wendy Liang [Thu, 28 Jul 2016 23:16:32 +0000 (16:16 -0700)]
remoteproc: remove system cleanup related from lib

Remove the metal_finish() and cache invalidation/disabling
from remoteproc lib as these are related to system cleanup.
They should be called from application instead.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: do the system cleanup in the app
Wendy Liang [Thu, 28 Jul 2016 23:12:28 +0000 (16:12 -0700)]
Apps: do the system cleanup in the app

Add cleanup function in the app to do the system cleanup.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: generic: Zynq7: add cleanup API
Wendy Liang [Thu, 28 Jul 2016 22:35:01 +0000 (15:35 -0700)]
Apps: generic: Zynq7: add cleanup API

Add system/platform dependent API to do the system cleanup.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: generic: ZynqMP R5: add cleanup API
Wendy Liang [Thu, 28 Jul 2016 22:16:33 +0000 (15:16 -0700)]
Apps: generic: ZynqMP R5: add cleanup API

Add system/platform dependent API to do the system cleanup.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoapp: Update init data def due to hil_proc change
Wendy Liang [Fri, 15 Jul 2016 18:32:17 +0000 (11:32 -0700)]
app: Update init data def due to hil_proc change

Update the machine initialization data definition due
to the change of hil_proc struct.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoIntroduce hil_proc rsc header and rsc data struct
Wendy Liang [Fri, 15 Jul 2016 18:25:59 +0000 (11:25 -0700)]
Introduce hil_proc rsc header and rsc data struct

Introduce hil_proc resource header
so that user can specify their hardware resource in such a format:
{
  <resource_header>
  <user_defined_resource>
}
User don't have to define the full hil_proc in their application.
This way can sperate data structure definition from internal
implementation and user input.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoapps: pass RPMsg role to remoteproc init API
Wendy Liang [Tue, 12 Jul 2016 20:29:17 +0000 (13:29 -0700)]
apps: pass RPMsg role to remoteproc init API

As it is required to pass RPMsg role argument to
remoteproc_resource_init(), we need to give this
argument in the caller function in the demo apps.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremoteproc: Add support for peers without firmware
Edgar E. Iglesias [Tue, 17 Nov 2015 10:30:26 +0000 (11:30 +0100)]
remoteproc: Add support for peers without firmware

Add support for initiating communication with a peer that does
not carry any firmware package. This is for example useful
when the remote processor already is running.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremoteproc: remove ipi deinit function
Wendy Liang [Sun, 10 Jul 2016 06:17:46 +0000 (23:17 -0700)]
remoteproc: remove ipi deinit function

Each remoteproc driver is responsible to define the way to handle
IPI interrupt after the remoteproc resource is deleted.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd checking stdatomic header file checking
Wendy Liang [Sat, 9 Jul 2016 23:53:02 +0000 (16:53 -0700)]
Add checking stdatomic header file checking

Check wheter stdatomic header file exists, if not, use the
atomic operations defined in libmetal, if not, use the
atomic operations defined in libmetal.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoZynq7:platform_patova: return the correct va
Wendy Liang [Tue, 19 Jul 2016 22:24:59 +0000 (15:24 -0700)]
Zynq7:platform_patova: return the correct va

This patch is to correct the pa to va conversion
in zynq7 generic.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorpmsg: Not convert va to pa when getting tx/rx buf
Wendy Liang [Fri, 8 Jul 2016 16:55:29 +0000 (09:55 -0700)]
rpmsg: Not convert va to pa when getting tx/rx buf

Logical address should be used of the buffer got from
rpmsg_get_tx_buffer. We should not convert logical
address back to physical address for the buffer need to
be returned.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil_proc: Use logical address in proc_vring
Wendy Liang [Thu, 7 Jul 2016 23:35:39 +0000 (16:35 -0700)]
hil_proc: Use logical address in proc_vring

It is not necessary to maintain the physical address in hil_proc,
and actually the physical address field phy_addr is already used
as logical address. This patch is to rename the physical address
data field to logical address.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil_proc: initialize with proc->ops->initialize()
Wendy Liang [Wed, 6 Jul 2016 05:58:57 +0000 (22:58 -0700)]
hil_proc: initialize with proc->ops->initialize()

Use proc->ops->initialize() for the remote processor initialization,
which will initialize the hil_proc and memory map the shared
memory specified in proc_shm.

The hil_create_proc() will only link the initialized hil_proc
to the hil_proc list.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil_proc: use proc->ops->release()
Wendy Liang [Wed, 6 Jul 2016 00:18:53 +0000 (17:18 -0700)]
hil_proc: use proc->ops->release()

Use proc->ops->release() to release resource of each remote
proc driver. This allow each remote processor to define its
own resource release function.

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