Changeset View
Changeset View
Standalone View
Standalone View
sys/x86/isa/atrtc.c
Show First 20 Lines • Show All 554 Lines • ▼ Show 20 Lines | atrtc_resume(device_t dev) | ||||
atrtc_restore(); | atrtc_restore(); | ||||
return(0); | return(0); | ||||
} | } | ||||
static int | static int | ||||
atrtc_settime(device_t dev __unused, struct timespec *ts) | atrtc_settime(device_t dev __unused, struct timespec *ts) | ||||
{ | { | ||||
struct bcd_clocktime bct; | struct bcd_clocktime bct; | ||||
int r; | |||||
clock_ts_to_bcd(ts, &bct, false); | r = clock_ts_to_bcd(ts, &bct, false); | ||||
if (r) | |||||
return (EINVAL); | |||||
clock_dbgprint_bcd(dev, CLOCK_DBG_WRITE, &bct); | clock_dbgprint_bcd(dev, CLOCK_DBG_WRITE, &bct); | ||||
mtx_lock(&atrtc_time_lock); | mtx_lock(&atrtc_time_lock); | ||||
mtx_lock_spin(&atrtc_lock); | mtx_lock_spin(&atrtc_lock); | ||||
/* Disable RTC updates and interrupts. */ | /* Disable RTC updates and interrupts. */ | ||||
rtcout_locked(RTC_STATUSB, RTCSB_HALT | RTCSB_24HR); | rtcout_locked(RTC_STATUSB, RTCSB_HALT | RTCSB_24HR); | ||||
▲ Show 20 Lines • Show All 111 Lines • Show Last 20 Lines |