samples: openamp: Add support for Musca A

Musca A is a dual core SoC with both cores are CM33. Add
openAMP to support on it.

Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
This commit is contained in:
Karl Zhang 2019-07-16 10:26:13 +08:00 committed by Kumar Gala
commit 0e770c652a
7 changed files with 39 additions and 5 deletions

View file

@ -12,6 +12,8 @@ if("${BOARD}" STREQUAL "lpcxpresso54114_m4")
elseif("${BOARD}" STREQUAL "mps2_an521")
set(QEMU_EXTRA_FLAGS "-device;loader,file=${REMOTE_ZEPHYR_DIR}/zephyr.elf")
set(BOARD_REMOTE "mps2_an521_nonsecure")
elseif("${BOARD}" STREQUAL "v2m_musca")
set(BOARD_REMOTE "v2m_musca_nonsecure")
else()
message(FATAL_ERROR "${BOARD} was not supported for this sample")
endif()

View file

@ -26,6 +26,14 @@ Building the application for mps2_an521
:board: mps2_an521
:goals: debug
Building the application for v2m_musca
**************************************
.. zephyr-app-commands::
:zephyr-app: samples/subsys/ipc/openamp
:board: v2m_musca
:goals: debug
Open a serial terminal (minicom, putty, etc.) and connect the board with the
following settings:

View file

@ -6,7 +6,8 @@ cmake_minimum_required(VERSION 3.13.1)
#
if(("${BOARD}" STREQUAL "lpcxpresso54114_m0")
OR "${BOARD}" STREQUAL "mps2_an521_nonsecure")
OR "${BOARD}" STREQUAL "mps2_an521_nonsecure"
OR "${BOARD}" STREQUAL "v2m_musca_nonsecure")
message(INFO " ${BOARD} compile as slave in this sample")
else()
message(FATAL_ERROR "${BOARD} was not supported for this sample")

View file

@ -73,7 +73,8 @@ static u32_t virtio_get_features(struct virtio_device *vdev)
static void virtio_notify(struct virtqueue *vq)
{
#if defined(CONFIG_SOC_MPS2_AN521)
#if defined(CONFIG_SOC_MPS2_AN521) || \
defined(CONFIG_SOC_V2M_MUSCA_A)
u32_t current_core = sse_200_platform_get_cpu_id();
ipm_send(ipm_handle, 0, current_core ? 0 : 1, 0, 1);

View file

@ -4,7 +4,7 @@ sample:
name: OpenAMP example integration
tests:
sample.ipc.openamp:
platform_whitelist: lpcxpresso54114_m4 mps2_an521
platform_whitelist: lpcxpresso54114_m4 mps2_an521 v2m_musca
tags: ipm
harness: console
harness_config:

View file

@ -84,7 +84,8 @@ static void virtio_set_features(struct virtio_device *vdev,
static void virtio_notify(struct virtqueue *vq)
{
#if defined(CONFIG_SOC_MPS2_AN521)
#if defined(CONFIG_SOC_MPS2_AN521) || \
defined(CONFIG_SOC_V2M_MUSCA_A)
u32_t current_core = sse_200_platform_get_cpu_id();
ipm_send(ipm_handle, 0, current_core ? 0 : 1, 0, 1);
@ -286,7 +287,8 @@ void main(void)
(k_thread_entry_t)app_task,
NULL, NULL, NULL, K_PRIO_COOP(7), 0, K_NO_WAIT);
#if defined(CONFIG_SOC_MPS2_AN521)
#if defined(CONFIG_SOC_MPS2_AN521) || \
defined(CONFIG_SOC_V2M_MUSCA_A)
wakeup_cpu1();
k_sleep(500);
#endif /* #if defined(CONFIG_SOC_MPS2_AN521) */

View file

@ -0,0 +1,20 @@
/*
* Copyright (c) 2019 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
chosen {
/*
* shared memory reserved for the inter-processor communication
*/
zephyr,ipc_shm = &sramx;
zephyr,ipc = &mhu0;
};
sramx: memory@20018000 {
compatible = "mmio-sram";
reg = <0x20018000 0x8000>;
};
};