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:
yliu79 2019-05-22 10:20:08 -07:00 committed by ACRN System Integration
parent dcd6d8b5a9
commit 8cb64cc71f
2 changed files with 0 additions and 31 deletions

View File

@ -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 int
vrtc_nvram_write(struct vrtc *vrtc, int offset, uint8_t value) vrtc_nvram_write(struct vrtc *vrtc, int offset, uint8_t value)
{ {

View File

@ -48,7 +48,6 @@ void vrtc_deinit(struct vmctx *ctx);
void vrtc_reset(struct vrtc *vrtc); void vrtc_reset(struct vrtc *vrtc);
time_t vrtc_get_time(struct vrtc *vrtc); time_t vrtc_get_time(struct vrtc *vrtc);
int vrtc_set_time(struct vrtc *vrtc, time_t secs); 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_nvram_write(struct vrtc *vrtc, int offset, uint8_t value);
int vrtc_addr_handler(struct vmctx *ctx, int vcpu, int in, int port, int vrtc_addr_handler(struct vmctx *ctx, int vcpu, int in, int port,
int bytes, uint32_t *eax, void *arg); int bytes, uint32_t *eax, void *arg);