ipc_service: Automatically include source files for backends
The purpose of this change is to allow to enable more than one backend at once by removing choice from ipc-service backend Kconfig and depending backend Kconfig option on existing of correct compatible. Overwriting IPC_SERVICE_BACKEND option in some places is removes as no longer needed. Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
This commit is contained in:
parent
5d18f93561
commit
d877e1dded
5 changed files with 19 additions and 34 deletions
|
@ -39,14 +39,6 @@ config BT_RPMSG
|
|||
Bluetooth HCI driver for communication with another CPU
|
||||
using RPMsg framework.
|
||||
|
||||
if BT_RPMSG
|
||||
|
||||
choice IPC_SERVICE_BACKEND
|
||||
default IPC_SERVICE_BACKEND_RPMSG
|
||||
endchoice
|
||||
|
||||
endif # BT_RPMSG
|
||||
|
||||
config BT_SPI
|
||||
bool "SPI HCI"
|
||||
depends on SPI
|
||||
|
|
|
@ -22,7 +22,7 @@ extern "C" {
|
|||
*/
|
||||
|
||||
/** Number of endpoints. */
|
||||
#define NUM_ENDPOINTS CONFIG_IPC_SERVICE_NUM_ENDPOINTS_PER_INSTANCE
|
||||
#define NUM_ENDPOINTS CONFIG_IPC_SERVICE_BACKEND_RPMSG_NUM_ENDPOINTS_PER_INSTANCE
|
||||
|
||||
struct ipc_rpmsg_ept;
|
||||
|
||||
|
|
|
@ -179,10 +179,6 @@ endif
|
|||
menu "nRF 802.15.4 serialization"
|
||||
depends on NRF_802154_SER_HOST || NRF_802154_SER_RADIO
|
||||
|
||||
choice IPC_SERVICE_BACKEND
|
||||
default IPC_SERVICE_BACKEND_RPMSG
|
||||
endchoice
|
||||
|
||||
config NRF_802154_SER_LOG
|
||||
bool "802.15.4 serialization logs"
|
||||
default n
|
||||
|
|
|
@ -1,12 +1,19 @@
|
|||
# Copyright (c) 2021 Nordic Semiconductor (ASA)
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
choice IPC_SERVICE_BACKEND
|
||||
prompt "IPC service backend"
|
||||
DT_COMPAT_ZEPHYR_IPC_OPENAMP_STATIC_VRINGS := zephyr,ipc-openamp-static-vrings
|
||||
DT_COMPAT_ZEPHYR_IPC_ICMSG := zephyr,ipc-icmsg
|
||||
|
||||
config IPC_SERVICE_REG_BACKEND_PRIORITY
|
||||
int "Initialization priority of modules registering IPC backend"
|
||||
default 46
|
||||
help
|
||||
The backend must be registered before the endpoint register.
|
||||
|
||||
config IPC_SERVICE_BACKEND_RPMSG
|
||||
bool "OpenAMP RPMSG backend with static VRINGs"
|
||||
depends on MBOX
|
||||
default $(dt_compat_enabled,$(DT_COMPAT_ZEPHYR_IPC_OPENAMP_STATIC_VRINGS))
|
||||
select IPC_SERVICE_RPMSG
|
||||
select IPC_SERVICE_STATIC_VRINGS
|
||||
select OPENAMP
|
||||
|
@ -14,29 +21,12 @@ config IPC_SERVICE_BACKEND_RPMSG
|
|||
config IPC_SERVICE_BACKEND_ICMSG
|
||||
bool "ICMSG backend with ICMsg buffer"
|
||||
depends on MBOX
|
||||
default $(dt_compat_enabled,$(DT_COMPAT_ZEPHYR_IPC_ICMSG))
|
||||
select IPC_SERVICE_ICMSG_BUF
|
||||
help
|
||||
Chosing this backend results in single endpoint implementation based
|
||||
on ringbuf.
|
||||
|
||||
config IPC_SERVICE_BACKEND_ZTEST
|
||||
depends on ZTEST
|
||||
bool "IPC service backend test"
|
||||
|
||||
endchoice
|
||||
|
||||
config IPC_SERVICE_NUM_ENDPOINTS_PER_INSTANCE
|
||||
int "Max number of registered endpoints per instance"
|
||||
default 2
|
||||
help
|
||||
Maximal number of endpoints that can be registered for one instance.
|
||||
|
||||
config IPC_SERVICE_REG_BACKEND_PRIORITY
|
||||
int "Initialization priority of modules registering IPC backend"
|
||||
default 46
|
||||
help
|
||||
The backend must be registered before the endpoint register.
|
||||
|
||||
config IPC_SERVICE_RPMSG
|
||||
bool "RPMsg support library"
|
||||
help
|
||||
|
|
|
@ -21,4 +21,11 @@ config IPC_SERVICE_BACKEND_RPMSG_SHMEM_RESET
|
|||
When this parameter is set to 'y' the status region of the shared
|
||||
memory is reset on kernel initialization.
|
||||
|
||||
endif # IP_SERVICE_BACKEND_RPMSG
|
||||
config IPC_SERVICE_BACKEND_RPMSG_NUM_ENDPOINTS_PER_INSTANCE
|
||||
int "Max number of registered endpoints per instance"
|
||||
default 2
|
||||
help
|
||||
Maximal number of endpoints that can be registered for one instance
|
||||
for RPMSG backend.
|
||||
|
||||
endif # IPC_SERVICE_BACKEND_RPMSG
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue