Lines Matching refs:tm
87 static void to_rtc_time(unsigned long now, struct rtc_time *tm) in to_rtc_time() argument
89 to_tm(now, tm); in to_rtc_time()
90 tm->tm_year -= 1900; in to_rtc_time()
91 tm->tm_mon -= 1; in to_rtc_time()
97 static unsigned long from_rtc_time(struct rtc_time *tm) in from_rtc_time() argument
99 return mktime(tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday, in from_rtc_time()
100 tm->tm_hour, tm->tm_min, tm->tm_sec); in from_rtc_time()
122 #define cuda_get_rtc_time(tm) to_rtc_time(cuda_get_time(), (tm)) argument
124 static int cuda_set_rtc_time(struct rtc_time *tm) in cuda_set_rtc_time() argument
129 nowtime = from_rtc_time(tm) + RTC_OFFSET; in cuda_set_rtc_time()
144 #define cuda_get_rtc_time(tm) argument
145 #define cuda_set_rtc_time(tm) 0 argument
165 #define pmu_get_rtc_time(tm) to_rtc_time(pmu_get_time(), (tm)) argument
167 static int pmu_set_rtc_time(struct rtc_time *tm) in pmu_set_rtc_time() argument
172 nowtime = from_rtc_time(tm) + RTC_OFFSET; in pmu_set_rtc_time()
185 #define pmu_get_rtc_time(tm) argument
186 #define pmu_set_rtc_time(tm) 0 argument
192 struct rtc_time tm; in smu_get_time() local
194 if (smu_get_rtc_time(&tm, 1)) in smu_get_time()
196 return from_rtc_time(&tm); in smu_get_time()
201 #define smu_get_rtc_time(tm, spin) argument
202 #define smu_set_rtc_time(tm, spin) 0 argument
221 void pmac_get_rtc_time(struct rtc_time *tm) in pmac_get_rtc_time() argument
226 cuda_get_rtc_time(tm); in pmac_get_rtc_time()
229 pmu_get_rtc_time(tm); in pmac_get_rtc_time()
232 smu_get_rtc_time(tm, 1); in pmac_get_rtc_time()
239 int pmac_set_rtc_time(struct rtc_time *tm) in pmac_set_rtc_time() argument
243 return cuda_set_rtc_time(tm); in pmac_set_rtc_time()
245 return pmu_set_rtc_time(tm); in pmac_set_rtc_time()
247 return smu_set_rtc_time(tm, 1); in pmac_set_rtc_time()