arch/x86_64/intel64/intel64_rtc.c: fix compilation

fix missing reference to comm_region->tsc_khz and
fix 'defined but not used' warnings in arch/x86_64/intel64_rtc.c

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
This commit is contained in:
p-szafonimateusz 2024-05-14 10:31:26 +02:00 committed by Alin Jerpelea
parent 9cfe255a81
commit 97726d9747
3 changed files with 4 additions and 7 deletions

View File

@ -38,7 +38,7 @@
* Public Data
****************************************************************************/
extern unsigned long g_x86_64_timer_freq;
unsigned long g_x86_64_timer_freq;
/****************************************************************************
* Public Functions

View File

@ -73,10 +73,8 @@ volatile bool g_rtc_enabled = false;
* Private Functions
****************************************************************************/
static unsigned long rtc_freq;
static unsigned long rtc_overflow;
extern unsigned long g_x86_64_timer_freq;
static unsigned long rtc_last;
static unsigned long rtc_overflows;
/****************************************************************************
* Private Functions
@ -92,7 +90,7 @@ static unsigned long rtc_read(void)
}
rtc_last = tmr;
tmr = (tmr / (rtc_freq / 1000000ul)) * 1000l;
tmr = (tmr / (g_x86_64_timer_freq / 1000000ul)) * 1000l;
return tmr;
}
@ -117,7 +115,6 @@ static unsigned long rtc_read(void)
int up_rtc_initialize(void)
{
rtc_freq = comm_region->tsc_khz * 1000L;
g_rtc_enabled = true;
return OK;

View File

@ -74,7 +74,7 @@
* Private Data
****************************************************************************/
unsigned long g_x86_64_timer_freq;
extern unsigned long g_x86_64_timer_freq;
static struct timespec g_goal_time_ts;
static uint64_t g_last_stop_time;