Browse Source

samples: openamp_rsc_table: Add the option to use predefined vring ID

Currently, Zephyr is always sending back notifications to
AP (e.g Linux in our case) on channel 0.

But this currently doesn't work if Linux uses other channel
id for communication. So, add option to use predefined
vring ID that can accomodate Linux used ID.

Signed-off-by: Alexandru Lastur <alexandru.lastur@nxp.com>
pull/79870/head
Alexandru Lastur 10 months ago committed by Carles Cufí
parent
commit
ec2dd19d45
  1. 16
      lib/open-amp/Kconfig
  2. 4
      lib/open-amp/resource_table.h
  3. 2
      samples/subsys/ipc/openamp_rsc_table/boards/imx8mp_evk_mimx8ml8_m7.conf

16
lib/open-amp/Kconfig

@ -18,3 +18,19 @@ config OPENAMP_RSC_TABLE_NUM_RPMSG_BUFF @@ -18,3 +18,19 @@ config OPENAMP_RSC_TABLE_NUM_RPMSG_BUFF
help
This option specifies the number of buffer used in a Vring for
interprocessor communication
config OPENAMP_RSC_TABLE_IPM_RX_ID
int "IPM RX channel ID"
default 0
depends on OPENAMP_RSC_TABLE
help
This option specifies the IPM RX channel ID used in a VRING
for interprocessor communication
config OPENAMP_RSC_TABLE_IPM_TX_ID
int "IPM TX channel ID"
default 1
depends on OPENAMP_RSC_TABLE
help
This option specifies the IPM TX channel ID used in a VRING
for interprocessor communication

4
lib/open-amp/resource_table.h

@ -17,8 +17,8 @@ extern "C" { @@ -17,8 +17,8 @@ extern "C" {
#if (CONFIG_OPENAMP_RSC_TABLE_NUM_RPMSG_BUFF > 0)
#define VDEV_ID 0xFF
#define VRING0_ID 0 /* (master to remote) fixed to 0 for Linux compatibility */
#define VRING1_ID 1 /* (remote to master) fixed to 1 for Linux compatibility */
#define VRING0_ID CONFIG_OPENAMP_RSC_TABLE_IPM_RX_ID /* (host to remote) */
#define VRING1_ID CONFIG_OPENAMP_RSC_TABLE_IPM_TX_ID /* (remote to host) */
#define VRING_COUNT 2
#define RPMSG_IPU_C0_FEATURES 1

2
samples/subsys/ipc/openamp_rsc_table/boards/imx8mp_evk_mimx8ml8_m7.conf

@ -7,3 +7,5 @@ CONFIG_LOG=y @@ -7,3 +7,5 @@ CONFIG_LOG=y
CONFIG_LOG_BACKEND_UART=y
CONFIG_LOG_DEFAULT_LEVEL=0
CONFIG_LOG_MODE_MINIMAL=y
CONFIG_OPENAMP_RSC_TABLE_IPM_RX_ID=1
CONFIG_OPENAMP_RSC_TABLE_IPM_TX_ID=0

Loading…
Cancel
Save