Apps: Remove the need to have old Zynq includes
authorWendy Liang <jliang@xilinx.com>
Tue, 16 Aug 2016 05:09:46 +0000 (22:09 -0700)
committerWendy Liang <jliang@xilinx.com>
Thu, 13 Oct 2016 05:01:49 +0000 (22:01 -0700)
Remove the need to have old Zynq include headers.

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 53dd802ce7c6cd3b7525428ba853a718542fa9e9..4f6a3634baaf25e156451505ed025a7122954cfd 100644 (file)
@@ -9,10 +9,6 @@ This application echoes back data that was sent to it by the master core. */
 #include "rsc_table.h"
 #include "platform_info.h"
 
-#ifdef ZYNQ7_BAREMETAL
-#include "baremetal.h"
-#endif
-
 #define SHUTDOWN_MSG   0xEF56A55A
 
 /* Internal functions */
@@ -37,10 +33,6 @@ int main()
 {
        int status = 0;
 
-#ifdef ZYNQ7_BAREMETAL
-       SWITCH_TO_SYS_MODE();
-#endif
-
        /* Initialize HW system components */
        init_system();
 
index 4dd893cca42ce4b699874e464db8a68c79f5aaa3..e4efe1b75b849a220252a2ca236afdf0993b458b 100644 (file)
@@ -72,12 +72,8 @@ int main()
                return -1;
        }
 
-       while (1) {
-
-               if (shutdown_called == 1) {
-                       break;
-               }
-               sleep();
+       while (!shutdown_called) {
+               hil_poll(proc->proc, 0);
        }
 
        /* Send shutdown message to remote */
index f30af91c9910d339c6ac9d9ca78333e57eda3b9e..945817df338c8ae8c919110674dc934c5adf5083 100644 (file)
 #include "test_suite.h"
 #include "platform_info.h"
 
-#ifdef ZYNQ7_BAREMETAL
-#include "baremetal.h"
-#endif
-
 #define EPT_ADDR        59
 
 /* Application provided callbacks */
@@ -48,11 +44,6 @@ int main()
        int uninit = 0;
        struct ept_cmd_data *ept_data;
 
-#ifdef ZYNQ7_BAREMETAL
-       /* Switch to System Mode */
-       SWITCH_TO_SYS_MODE();
-#endif
-
        /* Initialize HW system components */
        init_system();
 
index 178583e22eb7cbbf77ed28192eef8ac458e0f4aa..3a671fde8f3127caca1266a4578f4b1696971c0e 100644 (file)
@@ -11,10 +11,7 @@ the rpmsg APIs and shutsdown the core once the test has been completed.*/
 #include <stdlib.h>
 #include "openamp/open_amp.h"
 #include "test_suite.h"
-
-#ifdef ZYNQ7_BAREMETAL
-#include "baremetal.h"
-#endif
+#include "platform_info.h"
 
 
 /* Application provided callbacks */
@@ -64,10 +61,6 @@ void sleep()
 
 int main()
 {
-#ifdef ZYNQ7_BAREMETAL
-       /* Switch to System Mode */
-       SWITCH_TO_SYS_MODE();
-#endif
 
        /* Initialize HW system components */
        init_system();
index 2d94b2a22635585dbda18e2845ae9335ccb2fd99..9bff5bae20ac5a77a988732fa136eec2dc3ec17b 100644 (file)
@@ -10,10 +10,6 @@ multiplies them and returns the result to the master core. */
 #include "rsc_table.h"
 #include "platform_info.h"
 
-#ifdef ZYNQ7_BAREMETAL
-#include "baremetal.h"
-#endif
-
 #define        MAX_SIZE                6
 #define NUM_MATRIX              2
 #define SHUTDOWN_MSG            0xEF56A55A
@@ -52,10 +48,6 @@ int main()
 
        int status = 0;
 
-#ifdef ZYNQ7_BAREMETAL
-       SWITCH_TO_SYS_MODE();
-#endif
-
        /* Initialize HW system components */
        init_system();
 
index 1e550819d3a9854f020f3e05580dca5bb9e5df3d..8f5ce65c15605ed24966f33fb75e0a7c844550e3 100644 (file)
@@ -16,13 +16,6 @@ Linux to gracefully shutdown. */
 #include <string.h>
 #include "openamp/open_amp.h"
 
-#define BAREMETAL_MASTER 1
-
-#ifdef ZYNQ7_BAREMETAL
-#include "baremetal.h"
-#endif
-
-
 #define MAX_SIZE        6
 #define NUM_MATRIX      2
 
@@ -93,11 +86,6 @@ int main()
        int i;
        int shutdown_msg = SHUTDOWN_MSG;
 
-#ifdef ZYNQ7_BAREMETAL
-       /* Switch to System Mode */
-       SWITCH_TO_SYS_MODE();
-#endif
-
        /* Initialize HW system components */
        init_system();
 
@@ -126,13 +114,10 @@ int main()
 
                        /* Send the result of matrix multiplication back to master. */
                        rpmsg_send(app_rp_chnl, &matrix_result, sizeof(matrix));
-
                        int_flag = 0;
-
-                       sleep();
                }
 
-               sleep();
+               hil_poll(proc->proc, 0);
        }
 
        /* Send shutdown message to remote */
index d48be367b29628833734c7821782cea68101f429..33b9d9539d27eeea244978b2fdb9342493bdf7ca 100755 (executable)
 #include "platform_info.h"
 #include "openamp/rpmsg_retarget.h"
 
-#ifdef ZYNQ7_BAREMETAL
-#include "baremetal.h"
-#endif
-
 /* Internal functions */
 static void rpmsg_channel_created(struct rpmsg_channel *rp_chnl);
 static void rpmsg_channel_deleted(struct rpmsg_channel *rp_chnl);
@@ -58,10 +54,6 @@ int main()
        int ret;
        int status;
 
-#ifdef ZYNQ7_BAREMETAL
-       SWITCH_TO_SYS_MODE();
-#endif
-
        /* Initialize HW system components */
        init_system();