Skip to content

Commit

Permalink
Timer frequency info log format change
Browse files Browse the repository at this point in the history
Signed-off-by: Balaji Gontumukkala <[email protected]>
  • Loading branch information
gontumukkala-balaji committed Oct 8, 2024
1 parent 515914e commit 6d985e1
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions val/common/src/acs_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ val_timer_create_info_table(uint64_t *timer_info_table)
uint64_t timer_num;
uint64_t gt_entry;
uint64_t timer_entry;
double freq_mhz;
uint64_t freq_mhz;

if (timer_info_table == NULL) {
val_print(ACS_PRINT_ERR, "Input for Create Info table cannot be NULL\n", 0);
Expand All @@ -253,10 +253,15 @@ val_timer_create_info_table(uint64_t *timer_info_table)
}

freq_mhz = val_timer_get_info(TIMER_INFO_CNTFREQ, 0);
if (freq_mhz != 0)
freq_mhz = freq_mhz/1000000;

val_print(ACS_PRINT_TEST, " TIMER_INFO: System Counter frequency : %.2f MHz\n", freq_mhz);
if (freq_mhz != 0) {
freq_mhz = freq_mhz/1000;
if (freq_mhz > 1000) {
freq_mhz = req_mhz/1000;
val_print(ACS_PRINT_TEST, " TIMER_INFO: System Counter frequency : %ld MHz\n", freq_mhz);
} else {
val_print(ACS_PRINT_TEST, " TIMER_INFO: System Counter frequency : %ld KHz\n", freq_mhz);
}
}

val_print(ACS_PRINT_TEST, " TIMER_INFO: Number of system timers : %4d\n",
g_timer_info_table->header.num_platform_timer);
Expand Down

0 comments on commit 6d985e1

Please sign in to comment.