static u64 read_rtc(void) { int result; u64 rtc_val; u64 tb_val; result = lv1_get_rtc(&rtc_val, &tb_val); BUG_ON(result); return rtc_val; }
static int ps3_gettime(device_t dev, struct timespec *ts) { uint64_t rtc, tb; int result; result = lv1_get_rtc(&rtc, &tb); if (result) return (result); ts->tv_sec = rtc + Y2K; ts->tv_nsec = 0; return (0); }