Lines Matching refs:rtc_tm
131 static int s3c_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm) in s3c_rtc_gettime() argument
142 rtc_tm->tm_min = readb(info->base + S3C2410_RTCMIN); in s3c_rtc_gettime()
143 rtc_tm->tm_hour = readb(info->base + S3C2410_RTCHOUR); in s3c_rtc_gettime()
144 rtc_tm->tm_mday = readb(info->base + S3C2410_RTCDATE); in s3c_rtc_gettime()
145 rtc_tm->tm_mon = readb(info->base + S3C2410_RTCMON); in s3c_rtc_gettime()
146 rtc_tm->tm_year = readb(info->base + S3C2410_RTCYEAR); in s3c_rtc_gettime()
147 rtc_tm->tm_sec = readb(info->base + S3C2410_RTCSEC); in s3c_rtc_gettime()
154 if (rtc_tm->tm_sec == 0 && !have_retried) { in s3c_rtc_gettime()
159 rtc_tm->tm_sec = bcd2bin(rtc_tm->tm_sec); in s3c_rtc_gettime()
160 rtc_tm->tm_min = bcd2bin(rtc_tm->tm_min); in s3c_rtc_gettime()
161 rtc_tm->tm_hour = bcd2bin(rtc_tm->tm_hour); in s3c_rtc_gettime()
162 rtc_tm->tm_mday = bcd2bin(rtc_tm->tm_mday); in s3c_rtc_gettime()
163 rtc_tm->tm_mon = bcd2bin(rtc_tm->tm_mon); in s3c_rtc_gettime()
164 rtc_tm->tm_year = bcd2bin(rtc_tm->tm_year); in s3c_rtc_gettime()
168 rtc_tm->tm_year += 100; in s3c_rtc_gettime()
169 rtc_tm->tm_mon -= 1; in s3c_rtc_gettime()
171 dev_dbg(dev, "read time %ptR\n", rtc_tm); in s3c_rtc_gettime()