Lines Matching refs:h_m_s_ms
21 static void opal_to_tm(u32 y_m_d, u64 h_m_s_ms, struct rtc_time *tm)
27 tm->tm_hour = bcd2bin((h_m_s_ms >> 56) & 0xff);
28 tm->tm_min = bcd2bin((h_m_s_ms >> 48) & 0xff);
29 tm->tm_sec = bcd2bin((h_m_s_ms >> 40) & 0xff);
34 static void tm_to_opal(struct rtc_time *tm, u32 *y_m_d, u64 *h_m_s_ms)
41 *h_m_s_ms |= ((u64)bin2bcd(tm->tm_hour)) << 56;
42 *h_m_s_ms |= ((u64)bin2bcd(tm->tm_min)) << 48;
43 *h_m_s_ms |= ((u64)bin2bcd(tm->tm_sec)) << 40;
51 u64 h_m_s_ms;
74 h_m_s_ms = be64_to_cpu(__h_m_s_ms);
75 opal_to_tm(y_m_d, h_m_s_ms, tm);
85 u64 h_m_s_ms = 0;
87 tm_to_opal(tm, &y_m_d, &h_m_s_ms);
90 rc = opal_rtc_write(y_m_d, h_m_s_ms);
119 u64 h_m_s_ms;
149 h_m_s_ms = ((u64)be32_to_cpu(__h_m) << 32);
152 if (y_m_d == 0 && h_m_s_ms == 0) {
157 pr_debug("Alarm set to %x %llx\n", y_m_d, h_m_s_ms);
160 opal_to_tm(y_m_d, h_m_s_ms, &alarm->time);
170 u64 h_m_s_ms = 0;
177 tm_to_opal(&alarm->time, &y_m_d, &h_m_s_ms);
178 pr_debug("Alarm set to %x %llx\n", y_m_d, h_m_s_ms);
194 (u32)((h_m_s_ms >> 32) & 0xffff0000));