Lines Matching +full:- +full:hours

1 // SPDX-License-Identifier: GPL-2.0+
18 status = readl(&rtc->status); in rtc_get()
21 return -1; in rtc_get()
26 sec = readl(&rtc->second); in rtc_get()
27 min = readl(&rtc->minutes); in rtc_get()
28 hour = readl(&rtc->hours); in rtc_get()
29 mday = readl(&rtc->day); in rtc_get()
30 wday = readl(&rtc->dotw); in rtc_get()
31 mon_cent = readl(&rtc->month); in rtc_get()
32 year = readl(&rtc->year); in rtc_get()
39 tmp->tm_sec = bcd2bin(sec & 0x7F); in rtc_get()
40 tmp->tm_min = bcd2bin(min & 0x7F); in rtc_get()
41 tmp->tm_hour = bcd2bin(hour & 0x3F); in rtc_get()
42 tmp->tm_mday = bcd2bin(mday & 0x3F); in rtc_get()
43 tmp->tm_mon = bcd2bin(mon_cent & 0x1F); in rtc_get()
44 tmp->tm_year = bcd2bin(year) + 2000; in rtc_get()
45 tmp->tm_wday = bcd2bin(wday & 0x07); in rtc_get()
46 tmp->tm_yday = 0; in rtc_get()
47 tmp->tm_isdst = 0; in rtc_get()
49 debug("Get DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n", in rtc_get()
50 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_get()
51 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_get()
60 debug("Set DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n", in rtc_set()
61 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_set()
62 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_set()
63 writel(bin2bcd(tmp->tm_year % 100), &rtc->year); in rtc_set()
64 writel(bin2bcd(tmp->tm_mon), &rtc->month); in rtc_set()
66 writel(bin2bcd(tmp->tm_wday), &rtc->dotw); in rtc_set()
67 writel(bin2bcd(tmp->tm_mday), &rtc->day); in rtc_set()
68 writel(bin2bcd(tmp->tm_hour), &rtc->hours); in rtc_set()
69 writel(bin2bcd(tmp->tm_min), &rtc->minutes); in rtc_set()
70 writel(bin2bcd(tmp->tm_sec), &rtc->second); in rtc_set()
79 writel(0x01, &rtc->ctrl); in rtc_reset()