time: add aml time profile function [1/1]
PD#SWPL-141778
Problem:
need calculate cost time in every stages
Solution:
add aml time profile for testing cost time in stages
Verify:
s1a_bg201
Change-Id: I025b6ac7defedcf5319bbd04796407d1e9811787
Signed-off-by: benlong.zhou <benlong.zhou@amlogic.com>
diff --git a/common/board_r.c b/common/board_r.c
index 2e337d3..a57282c 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -481,6 +481,21 @@
/* Initialize from environment */
image_load_addr = env_get_ulong("loadaddr", 16, image_load_addr);
+#ifdef CONFIG_AMLOGIC_MODIFY
+#ifdef CONFIG_AMLOGIC_TIME_PROFILE
+ {
+ char *tmp_env = NULL;
+
+ printf("time profile start TE: %d us\n", get_time());
+ tmp_env = env_get("time_profile");
+ if (tmp_env && !strcmp(tmp_env, "1")) {
+ gd->time_print_flag = 1;
+ printf("enable time profile print\n");
+ }
+ }
+#endif
+#endif
+
return 0;
}