]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/open-amp.git/commitdiff
rproc init: remove system init
authorWendy Liang <jliang@xilinx.com>
Tue, 28 Jun 2016 22:31:53 +0000 (15:31 -0700)
committerWendy 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>
lib/include/openamp/rpmsg.h
lib/remoteproc/remoteproc.c
lib/rpmsg/rpmsg.c

index 8bf92981c81aeefd9d75031187f981f1e30b6e54..1230f6b35b4be5a2daed7a7fe26b8072bdd366d5 100644 (file)
@@ -330,7 +330,6 @@ static inline int rpmsg_trysend_offchannel(struct rpmsg_channel *rpdev,
  * @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 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
  *
  */
  * @return - status of function execution
  *
  */
@@ -338,8 +337,7 @@ static inline int rpmsg_trysend_offchannel(struct rpmsg_channel *rpdev,
 int rpmsg_init(int dev_id, struct remote_device **rdev,
               rpmsg_chnl_cb_t channel_created,
               rpmsg_chnl_cb_t channel_destroyed,
 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
 
 /**
  * rpmsg_deinit
index cf51ee51168d9038e1f9c43a55ab08cdf90245f3..32750e1581efece442facd082a7ae6d6c7fc91f9 100644 (file)
@@ -66,13 +66,6 @@ int remoteproc_resource_init(struct rsc_table_info *rsc_info,
                return RPROC_ERR_PARAM;
        }
 
                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));
        rproc = env_allocate_memory(sizeof(struct remote_proc));
        if (rproc) {
                memset(rproc, 0x00, sizeof(struct remote_proc));
@@ -91,7 +84,7 @@ int remoteproc_resource_init(struct rsc_table_info *rsc_info,
                                    rpmsg_init(rproc->proc->cpu_id,
                                               &rproc->rdev, channel_created,
                                               channel_destroyed, default_cb,
                                    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;
                        }
                        } else {
                                status = RPROC_ERR_NO_RSC_TABLE;
                        }
@@ -192,13 +185,6 @@ int remoteproc_init(char *fw_name, rpmsg_chnl_cb_t channel_created,
                return RPROC_ERR_PARAM;
        }
 
                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 = env_allocate_memory(sizeof(struct remote_proc));
        if (rproc) {
                memset((void *)rproc, 0x00, sizeof(struct remote_proc));
@@ -345,14 +331,14 @@ int remoteproc_boot(struct remote_proc *rproc)
                                               &rproc->rdev,
                                               rproc->channel_created,
                                               rproc->channel_destroyed,
                                               &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,
 #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 {
 #endif
                        }
                } else {
index 0497ff82f8738aa9d3ae01834f5b7d682bae1e70..40f47d2bce237e9b1c43b755616c6d23a568fc36 100644 (file)
@@ -72,7 +72,6 @@
  * @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 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
  *
  *
  * @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,
 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;
 
 {
        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);
        /* Initialize the remote device for given cpu id */
        status = rpmsg_rdev_init(rdev, dev_id, role, channel_created,
                                 channel_destroyed, default_cb);