ipc: rpmsg_multi_instance: Use only rpsmg_mi_ctx_cfg for configuration

For the instance configuration the rpmsg_multi_instance code is
currently using a set of configuration info coming from two different
sources: the rpsmg_mi_ctx_cfg struct and Kconfig.

This is not only confusing but it's preventing to configure the
instances using information not coming from Kconfig (for example if we
want to configure the instance using DT).

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
This commit is contained in:
Carlo Caione 2021-07-29 11:11:21 +02:00 committed by Christopher Friedt
commit 66fb1bc2bc
6 changed files with 52 additions and 35 deletions

View file

@ -96,6 +96,8 @@ struct rpmsg_mi_ctx {
const struct device *ipm_tx_handle;
const struct device *ipm_rx_handle;
unsigned int ipm_tx_id;
uint32_t shm_status_reg_addr;
struct metal_io_region *shm_io;
struct metal_device shm_device;
@ -121,6 +123,12 @@ struct rpmsg_mi_ctx_cfg {
/** Name of instance. */
const char *name;
/** Physical address shared memory region. */
uintptr_t shm_addr;
/** Size shared memory region. */
size_t shm_size;
/** Stack area for k_work_q. */
k_thread_stack_t *ipm_stack_area;
@ -138,6 +146,9 @@ struct rpmsg_mi_ctx_cfg {
/** Name of the RX IPM channel. */
const char *ipm_rx_name;
/** IPM message identifier. */
unsigned int ipm_tx_id;
};
/** @brief Initialization of RPMsg instance.