processor-sdk/open-amp.git
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>
4 years agohil_proc: introduce release()
Wendy Liang [Wed, 6 Jul 2016 00:08:47 +0000 (17:08 -0700)]
hil_proc: introduce release()

Introduce remoteproc specific release() to release
resource of a remote processor.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agozynqmp_r5 remoteproc: remove platform_get_processor_for_fw()
Wendy Liang [Tue, 5 Jul 2016 21:07:14 +0000 (14:07 -0700)]
zynqmp_r5 remoteproc: remove platform_get_processor_for_fw()

This function was to get the CPU ID (the index in
the proc_table which is a table to keep the remoteproc
platform data) from firmware.
However, the user application should know which platform
data in the table to initialize which remote processor.
It is not necessary to to have this function, and not
necessary to have the "CPU ID" in the firmware.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoapps: zynq: remove platform_get_processor_for_fw()
Wendy Liang [Wed, 29 Jun 2016 22:11:09 +0000 (15:11 -0700)]
apps: zynq: remove platform_get_processor_for_fw()

This function was to get the CPU ID (the index in
the proc_table which is a table to keep the remoteproc
platform data) from firmware.
However, the user application should know which platform
data in the table to initialize which remote processor.
It is not necessary to to have this function, and not
necessary to have the "CPU ID" in the firmware.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove hil_get_cpuforfw()
Wendy Liang [Tue, 5 Jul 2016 21:50:08 +0000 (14:50 -0700)]
Remove hil_get_cpuforfw()

As it is no longer required to specify CPU ID in the firmware,
remove the hil_get_cpuforfw().

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove platform_get_processor_info() from hil_proc
Wendy Liang [Tue, 5 Jul 2016 21:47:22 +0000 (14:47 -0700)]
Remove platform_get_processor_info() from hil_proc

As platform_get_processor_info() is no longer used, remove it
from hil_proc extern declaration.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremoteproc: Remove getting CPU Id from firmware
Wendy Liang [Wed, 29 Jun 2016 21:21:28 +0000 (14:21 -0700)]
remoteproc: Remove getting CPU Id from firmware

The CPU ID is the ID defined in the remoteproc data table
in the application, the user application should know
what what data should be used to do the remoteproc initialization.
It is not necessary to have CPU ID in the firmware.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoapps: update calling the remoteproc init API
Wendy Liang [Wed, 29 Jun 2016 21:14:31 +0000 (14:14 -0700)]
apps: update calling the remoteproc init API

As the remoteproc init API has changed, update how to call the API
in the demo applications.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoapps: zynq7: remove setting rproc platform data funciton
Wendy Liang [Wed, 29 Jun 2016 20:20:13 +0000 (13:20 -0700)]
apps: zynq7: remove setting rproc platform data funciton

Setting data function is defined in the remoteproc driver.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoapps: zynqmp r5: remove extra remoteproc information
Wendy Liang [Wed, 29 Jun 2016 20:07:27 +0000 (13:07 -0700)]
apps: zynqmp r5: remove extra remoteproc information

Remove not used remoteproc data from the remote proc data table.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agozynq a9 remoteproc: implement _initialize()
Wendy Liang [Wed, 29 Jun 2016 17:09:20 +0000 (10:09 -0700)]
zynq a9 remoteproc: implement _initialize()

Add _initialize() implementation to have remoteproc
driver specific initialization.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agozynqmp r5 remoteproc: implement _initialize()
Wendy Liang [Wed, 29 Jun 2016 06:08:10 +0000 (23:08 -0700)]
zynqmp r5 remoteproc: implement _initialize()

Add _initialize() implementation to have remoteproc
driver specific initialization.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoMake platform data as remote proc init input
Wendy Liang [Wed, 29 Jun 2016 05:57:41 +0000 (22:57 -0700)]
Make platform data as remote proc init input

Previously, the library relies on extern platform data variable.
This patch changes the remote processor initialization API to
have platform data as input argument and also allows each
remoteproc driver to have its own initialization implementation.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd initialize() hil_proc API
Wendy Liang [Mon, 27 Jun 2016 22:04:26 +0000 (15:04 -0700)]
Add initialize() hil_proc API

Introduce initialize() hil_proc API to set platform data for
each remoteproc processor.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorproc init: remove system init
Wendy Liang [Tue, 28 Jun 2016 22:31:53 +0000 (15:31 -0700)]
rproc init: remove system init

System init should be done outside the OpenAMP library.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorpmsg_init: caller to control whether to init env
Wendy Liang [Tue, 28 Jun 2016 23:08:47 +0000 (16:08 -0700)]
rpmsg_init: caller to control whether to init env

Add parameter to rpmsg_init() to allow caller to specify
whether to initialize environment in the function.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoReplace llist with metal_list for rpmsg endpoint
Wendy Liang [Fri, 27 May 2016 23:23:59 +0000 (16:23 -0700)]
Replace llist with metal_list for rpmsg endpoint

Use metal_list to keep rpmsg endpoints

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoReplace llist with metal_list for rpmsg channels
Wendy Liang [Fri, 27 May 2016 22:48:32 +0000 (15:48 -0700)]
Replace llist with metal_list for rpmsg channels

Use metal_list for rpmsg_channels.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: add list node in platform info new hil_proc
Wendy Liang [Fri, 27 May 2016 22:38:17 +0000 (15:38 -0700)]
Apps: add list node in platform info new hil_proc

There is metal_list node added to hil_proc struct.
Add its field to the prefilled platform data.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoport hil_proc to use metal_list
Wendy Liang [Mon, 23 May 2016 23:37:31 +0000 (16:37 -0700)]
port hil_proc to use metal_list

use metal_list instead of llist in hil_proc.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoreplace env_print with printf
Wendy Liang [Thu, 2 Jun 2016 00:12:11 +0000 (17:12 -0700)]
replace env_print with printf

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove OpenAMP env_print and env_assert
Wendy Liang [Thu, 2 Jun 2016 00:05:28 +0000 (17:05 -0700)]
Remove OpenAMP env_print and env_assert

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoIntroduce RPMSG_ASSERT
Wendy Liang [Thu, 2 Jun 2016 00:48:32 +0000 (17:48 -0700)]
Introduce RPMSG_ASSERT

Remove OpenAMP env assert.

Similar to virtqueue assert, introduce RPMSG_ASSERT

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove memory barrier definition from OpenAMP env
Wendy Liang [Wed, 1 Jun 2016 23:37:40 +0000 (16:37 -0700)]
Remove memory barrier definition from OpenAMP env

As we use atomic operations to setup memory fence.
It is not required to define memory barrier in
OpenAMP.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoReplace OpenAMP memory barrier with atomic operation
Wendy Liang [Wed, 1 Jun 2016 23:29:52 +0000 (16:29 -0700)]
Replace OpenAMP memory barrier with atomic operation

Use atomic_thread_fence() to setup memory fence.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremove memory barrier from zynqmp remoteproc driver
Wendy Liang [Wed, 1 Jun 2016 23:16:32 +0000 (16:16 -0700)]
remove memory barrier from zynqmp remoteproc driver

As memory barrier is already called in virtio before
kicking the remote. It is not required to call again before
raising the IPI interrupt.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove env_strncmp()
Wendy Liang [Wed, 1 Jun 2016 00:22:55 +0000 (17:22 -0700)]
Remove env_strncmp()

env_strncmp() has been replaced with strncmp().

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoReplace env_strncmp() wisth strncmp()
Wendy Liang [Wed, 1 Jun 2016 00:19:41 +0000 (17:19 -0700)]
Replace env_strncmp() wisth strncmp()

Replace env_strncmp() with standard C function strncmp().

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove env_strcmp()
Wendy Liang [Wed, 1 Jun 2016 00:14:02 +0000 (17:14 -0700)]
Remove env_strcmp()

env_strcmp() has been replaced by strcmp()

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoReplace env_strcmp() with strcmp()
Wendy Liang [Wed, 1 Jun 2016 00:10:58 +0000 (17:10 -0700)]
Replace env_strcmp() with strcmp()

Repalce env_strcmp() with standard c function strcmp().

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove env_strncpy()
Wendy Liang [Tue, 31 May 2016 23:59:23 +0000 (16:59 -0700)]
Remove env_strncpy()

env_strncpy has been replaced by strncpy().

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoReplace env_strncpy() with strncpy()
Wendy Liang [Tue, 31 May 2016 23:52:36 +0000 (16:52 -0700)]
Replace env_strncpy() with strncpy()

Replace env_strncpy() with strncpy() standard C function.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove undefined env_strcpy()
Wendy Liang [Tue, 31 May 2016 23:46:07 +0000 (16:46 -0700)]
Remove undefined env_strcpy()

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove undefined env_strlen()
Wendy Liang [Tue, 31 May 2016 23:44:26 +0000 (16:44 -0700)]
Remove undefined env_strlen()

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove env_memcpy()
Wendy Liang [Tue, 31 May 2016 23:37:43 +0000 (16:37 -0700)]
Remove env_memcpy()

env_memcpy() has been replaced by memcpy()

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoReplace env_memcpy() with memcpy()
Wendy Liang [Tue, 31 May 2016 23:33:32 +0000 (16:33 -0700)]
Replace env_memcpy() with memcpy()

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove env_memset()
Wendy Liang [Tue, 31 May 2016 23:31:44 +0000 (16:31 -0700)]
Remove env_memset()

Use ANSI C memset() instead.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoReplace env_memset() with memset()
Wendy Liang [Tue, 31 May 2016 23:00:21 +0000 (16:00 -0700)]
Replace env_memset() with memset()

There is memset() in standard C.
There is no need to redefine env_memset()

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove env_init()
Wendy Liang [Tue, 31 May 2016 20:37:24 +0000 (13:37 -0700)]
Remove env_init()

As env_init() has been replaced with metal_init(),
remove it from the code.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoReplace env_init() with metal_init()
Wendy Liang [Tue, 31 May 2016 20:55:06 +0000 (13:55 -0700)]
Replace env_init() with metal_init()

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agosh_mem.c: Remove unused status var
Wendy Liang [Tue, 31 May 2016 19:34:00 +0000 (12:34 -0700)]
sh_mem.c: Remove unused status var

Removed unused status variable in shared memory
create pool function.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove OpenAMP env mutex implementation
Wendy Liang [Tue, 31 May 2016 19:20:03 +0000 (12:20 -0700)]
Remove OpenAMP env mutex implementation

As libmetal mutex has been ported to OpenAMP,
remove the OpenAMP env mutex implementation.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoReplace ENV mutex with the libmetal mutex
Wendy Liang [Wed, 10 Aug 2016 19:27:53 +0000 (12:27 -0700)]
Replace ENV mutex with the libmetal mutex

This patch is to replace the OpoenAMP env mutex with
the libmetal mutex.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd libmetal to the libraries to build OpenAMP app
Wendy Liang [Fri, 27 May 2016 20:52:10 +0000 (13:52 -0700)]
Add libmetal to the libraries to build OpenAMP app

Add libmetal to the libraries list required to build
the OpenAMP example app.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoCheck libmetal include dir
Wendy Liang [Fri, 27 May 2016 20:49:09 +0000 (13:49 -0700)]
Check libmetal include dir

Add libmetal include directory when buildling
OpenAMP library.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd CMake depends to check OpenAMP dependencies
Wendy Liang [Fri, 27 May 2016 20:43:30 +0000 (13:43 -0700)]
Add CMake depends to check OpenAMP dependencies

Introduce depends.cmake to check dependencies for
OpenAMP library.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd CMake module for look for libmetal
Wendy Liang [Fri, 27 May 2016 20:38:48 +0000 (13:38 -0700)]
Add CMake module for look for libmetal

Add a CMake module to look for the libmetal library
and header files.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoZynqMP_R5: Add support to out of repo libxil
Wendy Liang [Fri, 27 May 2016 20:33:49 +0000 (13:33 -0700)]
ZynqMP_R5: Add support to out of repo libxil

Allow CMake to search for libxil and its header files.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoshared mem: fix the get first zero bit function
Wendy Liang [Thu, 13 Oct 2016 04:12:49 +0000 (21:12 -0700)]
shared mem: fix the get first zero bit function

The previous API doesn't work on 64bit machine.
This patch is to fix it.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoswap the trace and devmem rsc handler
Wendy Liang [Wed, 12 Oct 2016 22:17:47 +0000 (15:17 -0700)]
swap the trace and devmem rsc handler

Match the resource handlers sequence in the resource
handlers table to the resource type definition sequence.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoFixed cast to (void *) preventing error free compilation with g++ (#24)
Simon Brummer [Thu, 22 Sep 2016 20:08:26 +0000 (22:08 +0200)]
Fixed cast to (void *) preventing error free compilation with g++ (#24)

5 years agovirtio: Redefine vring_avail_event
Edgar E. Iglesias [Thu, 19 Nov 2015 13:58:09 +0000 (14:58 +0100)]
virtio: Redefine vring_avail_event

Redefine vring_avail_event to avoid accessing ring.id as
a 16bit integer and breaking the C aliasing rules.

This fixes a build warning:
virtio/virtqueue.c: In function ‘vq_ring_must_notify_host’:
virtio/virtqueue.c:658:9: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
         event_idx = vring_avail_event(&vq->vq_ring);
         ^

No functional change.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Wendy Liang <jliang@xilinx.com>
5 years agoUse standard types in resource table
Wendy Liang [Fri, 1 Jul 2016 17:54:08 +0000 (10:54 -0700)]
Use standard types in resource table

Resource table fields are declared as unsigned int or char.
As the lengths of these types varies between different platforms,
reousrce table may change shape. Change these fields to uint32_t
or uint8_t.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
5 years agorpmsg.h: move code to maximize match against Linux
Wendy Liang [Fri, 1 Jul 2016 22:18:38 +0000 (15:18 -0700)]
rpmsg.h: move code to maximize match against Linux

Move rpmsg_send() and rpmsg_sendto() to maximize match against
Linux include/linux/rpmsg.h

Signed-off-by: Wendy Liang <jliang@xilinx.com>
Signed-off-by: Cyril Chemparathy <cyril.chemparathy@xilinx.com>
5 years agoRemove redundant checking in rpmsg send
Wendy Liang [Fri, 1 Jul 2016 22:13:15 +0000 (15:13 -0700)]
Remove redundant checking in rpmsg send

As rpmag_send_offchannel_raw() does the input arguments
checking, remove the redundant checking in its caller
rpmsg send functions.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
5 years agorpmsg.h: remove leading space of function declare
Wendy Liang [Fri, 1 Jul 2016 22:01:10 +0000 (15:01 -0700)]
rpmsg.h: remove leading space of function declare

Remove leading spece of function declaration and definition.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
Cyril Chemparathy <cyril.chemparathy@xilinx.com>

5 years agoUse standard types in rpmsg
Cyril Chemparathy [Thu, 23 Jun 2016 23:08:35 +0000 (16:08 -0700)]
Use standard types in rpmsg

The use of integer types in rpmsg headers is wrong, and consequently
doesn't match the Linux definitions on 64-bit platforms.

This patch fixes the issue by replacing with stdint types.

Signed-off-by: Cyril Chemparathy <cyril.chemparathy@xilinx.com>
Signed-off-by: Wendy Liang <jliang@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
5 years agoCorrect the name of the Xilinx supported platform
Wendy Liang [Wed, 18 May 2016 05:03:16 +0000 (22:03 -0700)]
Correct the name of the Xilinx supported platform

Correct the name of Xilinx Zynq UltraScale+ MPSoC platform.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
5 years agochange rpmsg error base v2016.04
Wendy Liang [Thu, 21 Apr 2016 21:39:52 +0000 (14:39 -0700)]
change rpmsg error base

This is to fix the issue that RPMSG and VQUEUE use the same
error base.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
5 years agoFix rpmsg_end on REMOTE causes buffer "leak"
Wendy Liang [Wed, 20 Apr 2016 22:51:23 +0000 (15:51 -0700)]
Fix rpmsg_end on REMOTE causes buffer "leak"

void getting tx buffer out of the buffers pool when the payload
to be sent does not fit into the buffer length.

Signed-off-by: Michal Princ (NXA17570) <michal.princ@nxp.com>
Signed-off-by: Wendy Liang <jliang@xilinx.com>
5 years agoAdd env_assert() API
Wendy Liang [Thu, 21 Apr 2016 21:31:42 +0000 (14:31 -0700)]
Add env_assert() API

Signed-off-by: Wendy Liang <jliang@xilinx.com>
5 years agoAdd missing #else statement into the compiler.h
Michal Princ (NXA17570) [Wed, 20 Apr 2016 10:40:56 +0000 (12:40 +0200)]
Add missing #else statement into the compiler.h

Signed-off-by: Michal Princ (NXA17570) <michal...@nxp.com>
5 years agoAdd maintainers file
Wendy Liang [Thu, 14 Apr 2016 18:51:04 +0000 (11:51 -0700)]
Add maintainers file

Signed-off-by: Wendy Liang <jliang@xilinx.com>
5 years agoAdd license file
Wendy Liang [Thu, 14 Apr 2016 17:45:10 +0000 (10:45 -0700)]
Add license file

Signed-off-by: Wendy Liang <jliang@xilinx.com>
5 years agoChange the NXP copyright to Freescale
Michal Princ (NXA17570) [Tue, 19 Apr 2016 10:56:09 +0000 (12:56 +0200)]
Change the NXP copyright to Freescale

Signed-off-by: Michal Princ (NXA17570) <michal.princ@nxp.com>
5 years agoFix double free, occurs if a channel destroyed callback is fired from interrupt durin...
Michal Princ (NXA17570) [Thu, 31 Mar 2016 09:05:04 +0000 (11:05 +0200)]
Fix double free, occurs if a channel destroyed callback is fired from interrupt during the rpmsg_deinit function running in non-interrupt context.

- rpmsg_rdev_get_chnl_from_addr() removed because it is not used

Signed-off-by: Michal Princ (NXA17570) <michal.princ@nxp.com>