summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 53b28e2)
raw | patch | inline | side by side (parent: 53b28e2)
author | Wendy Liang <jliang@xilinx.com> | |
Tue, 28 Jun 2016 22:31:53 +0000 (15:31 -0700) | ||
committer | Wendy Liang <jliang@xilinx.com> | |
Thu, 13 Oct 2016 05:01:43 +0000 (22:01 -0700) |
System init should be done outside the OpenAMP library.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
Signed-off-by: Wendy Liang <jliang@xilinx.com>
lib/include/openamp/rpmsg.h | patch | blob | history | |
lib/remoteproc/remoteproc.c | patch | blob | history | |
lib/rpmsg/rpmsg.c | patch | blob | history |
index 8bf92981c81aeefd9d75031187f981f1e30b6e54..1230f6b35b4be5a2daed7a7fe26b8072bdd366d5 100644 (file)
* @param channel_destroyed - callback function for channel deletion
* @default_cb - default callback for channel
* @param role - role of the other device, Master or Remote
- * @param init_env - 1 to initialize env, 0 not to
* @return - status of function execution
*
*/
int rpmsg_init(int dev_id, struct remote_device **rdev,
rpmsg_chnl_cb_t channel_created,
rpmsg_chnl_cb_t channel_destroyed,
- rpmsg_rx_cb_t default_cb, int role,
- int init_env);
+ rpmsg_rx_cb_t default_cb, int role);
/**
* rpmsg_deinit
index cf51ee51168d9038e1f9c43a55ab08cdf90245f3..32750e1581efece442facd082a7ae6d6c7fc91f9 100644 (file)
return RPROC_ERR_PARAM;
}
- /* Initialize environment component */
- struct metal_init_params init_params = METAL_INIT_DEFAULTS;
- status = metal_init(&init_params);
- if (status != RPROC_SUCCESS) {
- return status;
- }
-
rproc = env_allocate_memory(sizeof(struct remote_proc));
if (rproc) {
memset(rproc, 0x00, sizeof(struct remote_proc));
rpmsg_init(rproc->proc->cpu_id,
&rproc->rdev, channel_created,
channel_destroyed, default_cb,
- RPMSG_MASTER, 0);
+ RPMSG_MASTER);
} else {
status = RPROC_ERR_NO_RSC_TABLE;
}
return RPROC_ERR_PARAM;
}
- /* Initialize environment component */
- struct metal_init_params init_params = METAL_INIT_DEFAULTS;
- status = metal_init(&init_params);
- if (status != RPROC_SUCCESS) {
- return status;
- }
-
rproc = env_allocate_memory(sizeof(struct remote_proc));
if (rproc) {
memset((void *)rproc, 0x00, sizeof(struct remote_proc));
&rproc->rdev,
rproc->channel_created,
rproc->channel_destroyed,
- rproc->default_cb, RPMSG_MASTER, 0);
+ rproc->default_cb, RPMSG_MASTER);
#else
status =
rpmsg_init(rproc->proc->cpu_id,
&rproc->rdev,
rproc->channel_created,
rproc->channel_destroyed,
- rproc->default_cb, RPMSG_REMOTE, 0);
+ rproc->default_cb, RPMSG_REMOTE);
#endif
}
} else {
diff --git a/lib/rpmsg/rpmsg.c b/lib/rpmsg/rpmsg.c
index 0497ff82f8738aa9d3ae01834f5b7d682bae1e70..40f47d2bce237e9b1c43b755616c6d23a568fc36 100644 (file)
--- a/lib/rpmsg/rpmsg.c
+++ b/lib/rpmsg/rpmsg.c
* @param channel_destroyed - callback function for channel deletion
* @param default_cb - default callback for channel I/O
* @param role - role of the other device, Master or Remote
- * @param init_env - 1 to initialize env, 0 not to
*
* @return - status of function execution
*
int rpmsg_init(int dev_id, struct remote_device **rdev,
rpmsg_chnl_cb_t channel_created,
rpmsg_chnl_cb_t channel_destroyed,
- rpmsg_rx_cb_t default_cb, int role,
- int init_env)
+ rpmsg_rx_cb_t default_cb, int role)
{
int status;
- if (init_env) {
- /* Initialize IPC environment */
- struct metal_init_params init_params = METAL_INIT_DEFAULTS;
- status = metal_init(&init_params);
- if (status != RPMSG_SUCCESS)
- return status;
- }
-
/* Initialize the remote device for given cpu id */
status = rpmsg_rdev_init(rdev, dev_id, role, channel_created,
channel_destroyed, default_cb);