]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/open-amp.git/commitdiff
apps: update calling the remoteproc init API
authorWendy Liang <jliang@xilinx.com>
Wed, 29 Jun 2016 21:14:31 +0000 (14:14 -0700)
committerWendy Liang <jliang@xilinx.com>
Thu, 13 Oct 2016 05:01:44 +0000 (22:01 -0700)
As the remoteproc init API has changed, update how to call the API
in the demo applications.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
apps/echo_test/echo_testd.c
apps/echo_test/echo_testd_remoteproc_master.c
apps/func_test_suite/func_test_suite.c
apps/func_test_suite/func_test_suite_remoteproc_master.c
apps/matrix_multiply/matrix_multiplyd.c
apps/matrix_multiply/matrix_multiplyd_remoteproc_master.c
apps/rpc_demo/rpc_demo.c

index 9aa42e9ae53b5617350ca6ebc189823177b09d30..b371f44ebc79195010887170d1b555279bb22301 100644 (file)
@@ -25,6 +25,7 @@ static struct rpmsg_endpoint *rp_ept;
 static struct remote_proc *proc = NULL;
 static struct rsc_table_info rsc_info;
 extern const struct remote_resource_table resources;
+extern struct hil_proc proc_table[];
 
 /* External functions */
 extern void init_system();
@@ -46,7 +47,8 @@ int main()
 
        /* Initialize RPMSG framework */
        status =
-           remoteproc_resource_init(&rsc_info, rpmsg_channel_created,
+           remoteproc_resource_init(&rsc_info, &proc_table[0],
+                                    rpmsg_channel_created,
                                     rpmsg_channel_deleted, rpmsg_read_cb,
                                     &proc);
 
index e81450e14c662dbec4c21952edf3590beab2031d..3eacb86377da8ce5cecaef54c19884b4b94c92e5 100644 (file)
@@ -39,6 +39,9 @@ static int shutdown_called = 0;
 /* External functions */
 extern void init_system();
 
+/* External variables */
+extern struct hil_proc proc_table[];
+
 /* Application entry point */
 int main()
 {
@@ -57,7 +60,7 @@ int main()
        init_system();
 
        status =
-           remoteproc_init((void *)fw_name, rpmsg_channel_created,
+           remoteproc_init((void *)fw_name, &proc_table[0], rpmsg_channel_created,
                            rpmsg_channel_deleted, rpmsg_read_cb, &proc);
 
        if (!status) {
index a996883dd00ee674c0c072c663db33093995258c..1da6213096a8412165d637bdd92f3cbf60d4aecc 100644 (file)
@@ -35,6 +35,7 @@ static char firmware_name[] = "baremetal-fn-test-suite-remote-firmware";
 static char r_buffer[512];
 static struct rsc_table_info rsc_info;
 extern const struct remote_resource_table resources;
+extern struct hil_proc proc_table[];
 
 /* External functions */
 extern void init_system();
@@ -58,7 +59,8 @@ int main()
 
        /* This API creates the virtio devices for this remote node and initializes
           other relevant resources defined in the resource table */
-       remoteproc_resource_init(&rsc_info, rpmsg_channel_created,
+       remoteproc_resource_init(&rsc_info, &proc_table[0],
+                                rpmsg_channel_created,
                                 rpmsg_channel_deleted, rpmsg_read_default_cb,
                                 &proc);
 
index 821565f2abb14dadb7d75f8e3d532cb142f393a2..33eb1b7a5071b81b47646cfb2cf28cb742e8707a 100644 (file)
@@ -52,6 +52,9 @@ struct _payload *r_payload = NULL;
 /* External functions */
 extern void init_system();
 
+/* External variables */
+extern struct hil_proc proc_table[];
+
 void sleep()
 {
        int i;
@@ -157,7 +160,7 @@ int test_execute_suite(char *firmware_name)
        int i;
 
        status =
-           remoteproc_init((void *)firmware_name, rpmsg_channel_created,
+           remoteproc_init((void *)firmware_name, &proc_table[0], rpmsg_channel_created,
                            rpmsg_channel_deleted, rpmsg_read_default_cb,
                            &proc);
 
index fa083aa6786d59d06dad4ac2d902b37a87db6a6d..471e381541ad0f99b0b96347106ee9208a74cc1c 100644 (file)
@@ -39,6 +39,7 @@ static matrix matrix_result;
 static struct remote_proc *proc = NULL;
 static struct rsc_table_info rsc_info;
 extern const struct remote_resource_table resources;
+extern struct hil_proc proc_table[];
 
 /* External functions */
 extern void init_system();
@@ -61,7 +62,8 @@ int main()
 
        /* Initialize RPMSG framework */
        status =
-           remoteproc_resource_init(&rsc_info, rpmsg_channel_created,
+           remoteproc_resource_init(&rsc_info, &proc_table[0],
+                                    rpmsg_channel_created,
                                     rpmsg_channel_deleted, rpmsg_read_cb,
                                     &proc);
        if (status < 0) {
index b94848a8b7364a24d7decedbd77a91efaf0e65c7..8561f050d3f9c578fddee8868d9572aab4f08e7a 100644 (file)
@@ -58,6 +58,9 @@ static int shutdown_called = 0;
 /* External functions */
 extern void init_system();
 
+/* External variables */
+extern struct hil_proc proc_table[];
+
 static void Matrix_Multiply(const matrix * m, const matrix * n, matrix * r)
 {
        int i, j, k;
@@ -98,7 +101,7 @@ int main()
        init_system();
 
        status =
-           remoteproc_init((void *)fw_name, rpmsg_channel_created,
+           remoteproc_init((void *)fw_name, &proc_table[0], rpmsg_channel_created,
                            rpmsg_channel_deleted, rpmsg_read_cb, &proc);
 
        if (!status) {
index 17caccf89643cd4506474b0a380b15693f72b8be..0ba32a4ec6710b36490c60d85429c0a665d8fb89 100755 (executable)
@@ -28,6 +28,7 @@ volatile int chnl_cb_flag = 0;
 static struct remote_proc *proc = NULL;
 static struct rsc_table_info rsc_info;
 extern const struct remote_resource_table resources;
+extern struct hil_proc proc_table[];
 
 /* External functions */
 extern void init_system();
@@ -66,7 +67,8 @@ int main()
        rsc_info.size = sizeof(resources);
 
        /* Initialize RPMSG framework */
-       status = remoteproc_resource_init(&rsc_info, rpmsg_channel_created,
+       status = remoteproc_resource_init(&rsc_info, &proc_table[0],
+                                         rpmsg_channel_created,
                                          rpmsg_channel_deleted, rpmsg_read_cb,
                                          &proc);
        if (status < 0) {