}
if (rc != OPAL_SUCCESS)
return 0;
+ y_m_d = be32_to_cpu(y_m_d);
+ h_m_s_ms = be64_to_cpu(h_m_s_ms);
opal_to_tm(y_m_d, h_m_s_ms, &tm);
return mktime(tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
tm.tm_hour, tm.tm_min, tm.tm_sec);
}
if (rc != OPAL_SUCCESS)
return;
+ y_m_d = be32_to_cpu(y_m_d);
+ h_m_s_ms = be64_to_cpu(h_m_s_ms);
opal_to_tm(y_m_d, h_m_s_ms, tm);
}
h_m_s_ms |= ((u64)bin2bcd(tm->tm_min)) << 48;
h_m_s_ms |= ((u64)bin2bcd(tm->tm_sec)) << 40;
+ y_m_d = cpu_to_be32(y_m_d);
+ h_m_s_ms = cpu_to_be64(h_m_s_ms);
+
while (rc == OPAL_BUSY || rc == OPAL_BUSY_EVENT) {
rc = opal_rtc_write(y_m_d, h_m_s_ms);
if (rc == OPAL_BUSY_EVENT)