summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c4a4ed8)
raw | patch | inline | side by side (parent: c4a4ed8)
author | Wendy Liang <jliang@xilinx.com> | |
Sat, 15 Oct 2016 00:29:34 +0000 (17:29 -0700) | ||
committer | Wendy Liang <jliang@xilinx.com> | |
Sat, 15 Oct 2016 04:40:00 +0000 (21:40 -0700) |
Replace the OpenAMP sleep and timestamp APIs with
those provided from libmetal.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
those provided from libmetal.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
lib/common/hil.c | patch | blob | history | |
lib/include/openamp/env.h | patch | blob | history | |
lib/remoteproc/remoteproc.c | patch | blob | history | |
lib/rpmsg/rpmsg.c | patch | blob | history |
diff --git a/lib/common/hil.c b/lib/common/hil.c
index b522aa2ac31d18635dd0454582f2949dd14c908b..301c7e27de7d88a7054caf20788b45f0e4d43524 100644 (file)
--- a/lib/common/hil.c
+++ b/lib/common/hil.c
#include <metal/device.h>
#include <metal/shmem.h>
#include <metal/utilities.h>
+#include <metal/time.h>
#define DEFAULT_VRING_MEM_SIZE 0x10000
proc->ops->boot_cpu(proc, start_addr);
}
#if defined (OPENAMP_BENCHMARK_ENABLE)
- boot_time_stamp = env_get_timestamp();
+ boot_time_stamp = metal_get_timestamp();
#endif
return 0;
proc->ops->shutdown_cpu(proc);
}
#if defined (OPENAMP_BENCHMARK_ENABLE)
- shutdown_time_stamp = env_get_timestamp();
+ shutdown_time_stamp = metal_get_timestamp();
#endif
}
index a399d89b6f9ede818513b82dbf4e78c9261ac180..c86e92a688756e7f1832ed15eacd9ad8f010eec4 100644 (file)
#define openamp_dbg(...)
#endif
-/**
- * env_sleep_msec
- *
- * Suspends the calling thread for given time in msecs.
- *
- * @param num_msec - delay in msecs
- */
-void env_sleep_msec(int num_msec);
-
-/**
- * env_get_timestamp
- *
- * Returns a 64 bit time stamp.
- *
- *
- */
-unsigned long long env_get_timestamp(void);
-
#endif /* _ENV_H_ */
index 50fb8c6b6bf33455aa1b361c6df420260bbef6d4..406532214b1f20766fe469e368a8fc352f4c2eb2 100644 (file)
#include "openamp/hil.h"
#include "metal/sys.h"
#include "metal/alloc.h"
+#include "metal/sleep.h"
/**
* remoteproc_resource_init
if (status == RPROC_SUCCESS) {
/* Wait for remote side to come up. This delay is arbitrary and may
* need adjustment for different configuration of remote systems */
- env_sleep_msec(RPROC_BOOT_DELAY);
+ metal_sleep_usec(RPROC_BOOT_DELAY);
/* Initialize RPMSG "messaging" component */
diff --git a/lib/rpmsg/rpmsg.c b/lib/rpmsg/rpmsg.c
index c48d12ac89b84acd24411e2554904ae1ae682957..32943d65f63e897b2897e035b4b79b01f497b928 100644 (file)
--- a/lib/rpmsg/rpmsg.c
+++ b/lib/rpmsg/rpmsg.c
#include "openamp/rpmsg.h"
#include "metal/sys.h"
#include "metal/cache.h"
+#include "metal/sleep.h"
/**
* rpmsg_init
* Wait parameter is true - pool the buffer for
* 15 secs as defined by the APIs.
*/
- env_sleep_msec(RPMSG_TICKS_PER_INTERVAL);
+ metal_sleep_usec(RPMSG_TICKS_PER_INTERVAL);
metal_mutex_acquire(&rdev->lock);
buffer = rpmsg_get_tx_buffer(rdev, &buff_len, &idx);
metal_mutex_release(&rdev->lock);
* Wait parameter is true - pool the buffer for
* 15 secs as defined by the APIs.
*/
- env_sleep_msec(RPMSG_TICKS_PER_INTERVAL);
+ metal_sleep_usec(RPMSG_TICKS_PER_INTERVAL);
metal_mutex_acquire(&rdev->lock);
hdr = (struct rpmsg_hdr *) rpmsg_get_tx_buffer(rdev, &buff_len, &idx);
metal_mutex_release(&rdev->lock);