Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/rockchip/rk805.c
Show First 20 Lines • Show All 835 Lines • ▼ Show 20 Lines | rk805_settime(device_t dev, struct timespec *ts) | ||||
error = rk805_write(dev, RK805_RTC_CTRL, &ctrl, 1); | error = rk805_write(dev, RK805_RTC_CTRL, &ctrl, 1); | ||||
if (error != 0) | if (error != 0) | ||||
return (error); | return (error); | ||||
error = rk805_write(dev, RK805_RTC_SECS, data, 7); | error = rk805_write(dev, RK805_RTC_SECS, data, 7); | ||||
ctrl &= ~RK805_RTC_CTRL_STOP; | ctrl &= ~RK805_RTC_CTRL_STOP; | ||||
rk805_write(dev, RK805_RTC_CTRL, &ctrl, 1); | rk805_write(dev, RK805_RTC_CTRL, &ctrl, 1); | ||||
if (bootverbose) | |||||
device_printf(dev, | |||||
"Set RTC at %04x-%02x-%02x %02x:%02x:%02x[.%09ld]\n", | |||||
bct.year, bct.mon, bct.day, bct.hour, bct.min, bct.sec, | |||||
bct.nsec); | |||||
return (error); | return (error); | ||||
} | } | ||||
static int | static int | ||||
rk805_attach(device_t dev) | rk805_attach(device_t dev) | ||||
{ | { | ||||
struct rk805_softc *sc; | struct rk805_softc *sc; | ||||
struct rk805_reg_sc *reg; | struct rk805_reg_sc *reg; | ||||
▲ Show 20 Lines • Show All 115 Lines • Show Last 20 Lines |