mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-07-19 09:53:01 +00:00
DM: remove unused function vrtc_nvram_read
Change-Id: I0b8c42879256e53762aeb031f63fc043ae2d9128 Tracked-On: #3123 Signed-off-by: Ying Liu <ying2.liu@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
parent
dcd6d8b5a9
commit
8cb64cc71f
@ -850,36 +850,6 @@ vrtc_set_reg_a(struct vrtc *vrtc, uint8_t newval)
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
vrtc_nvram_read(struct vrtc *vrtc, int offset, uint8_t *retval)
|
||||
{
|
||||
time_t basetime;
|
||||
time_t curtime;
|
||||
uint8_t *ptr;
|
||||
|
||||
/*
|
||||
* Allow all offsets in the RTC to be read.
|
||||
*/
|
||||
if (offset < 0 || offset >= sizeof(struct rtcdev))
|
||||
return -1;
|
||||
|
||||
pthread_mutex_lock(&vrtc->mtx);
|
||||
|
||||
/*
|
||||
* Update RTC date/time fields if necessary.
|
||||
*/
|
||||
if (offset < 10 || offset == RTC_CENTURY) {
|
||||
curtime = vrtc_curtime(vrtc, &basetime);
|
||||
secs_to_rtc(curtime, vrtc, 0);
|
||||
}
|
||||
|
||||
ptr = (uint8_t *)(&vrtc->rtcdev);
|
||||
*retval = ptr[offset];
|
||||
pthread_mutex_unlock(&vrtc->mtx);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
vrtc_nvram_write(struct vrtc *vrtc, int offset, uint8_t value)
|
||||
{
|
||||
|
@ -48,7 +48,6 @@ void vrtc_deinit(struct vmctx *ctx);
|
||||
void vrtc_reset(struct vrtc *vrtc);
|
||||
time_t vrtc_get_time(struct vrtc *vrtc);
|
||||
int vrtc_set_time(struct vrtc *vrtc, time_t secs);
|
||||
int vrtc_nvram_read(struct vrtc *vrtc, int offset, uint8_t *retval);
|
||||
int vrtc_nvram_write(struct vrtc *vrtc, int offset, uint8_t value);
|
||||
int vrtc_addr_handler(struct vmctx *ctx, int vcpu, int in, int port,
|
||||
int bytes, uint32_t *eax, void *arg);
|
||||
|
Loading…
Reference in New Issue
Block a user