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:
parent
9cfe255a81
commit
97726d9747
@ -38,7 +38,7 @@
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
extern unsigned long g_x86_64_timer_freq;
|
||||
unsigned long g_x86_64_timer_freq;
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user