Commit 01f6543a authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'm68k-for-v4.19-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k

Pull m68k fix from Geert Uytterhoeven:
 "Just a single fix for a bug introduced during the merge window: fix
  wrong date and time on PMU-based Macs"

* tag 'm68k-for-v4.19-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  m68k/mac: Use correct PMU response format
parents 754cf4b2 0986b16a
...@@ -98,11 +98,10 @@ static time64_t pmu_read_time(void) ...@@ -98,11 +98,10 @@ static time64_t pmu_read_time(void)
if (pmu_request(&req, NULL, 1, PMU_READ_RTC) < 0) if (pmu_request(&req, NULL, 1, PMU_READ_RTC) < 0)
return 0; return 0;
while (!req.complete) pmu_wait_complete(&req);
pmu_poll();
time = (u32)((req.reply[1] << 24) | (req.reply[2] << 16) | time = (u32)((req.reply[0] << 24) | (req.reply[1] << 16) |
(req.reply[3] << 8) | req.reply[4]); (req.reply[2] << 8) | req.reply[3]);
return time - RTC_OFFSET; return time - RTC_OFFSET;
} }
...@@ -116,8 +115,7 @@ static void pmu_write_time(time64_t time) ...@@ -116,8 +115,7 @@ static void pmu_write_time(time64_t time)
(data >> 24) & 0xFF, (data >> 16) & 0xFF, (data >> 24) & 0xFF, (data >> 16) & 0xFF,
(data >> 8) & 0xFF, data & 0xFF) < 0) (data >> 8) & 0xFF, data & 0xFF) < 0)
return; return;
while (!req.complete) pmu_wait_complete(&req);
pmu_poll();
} }
static __u8 pmu_read_pram(int offset) static __u8 pmu_read_pram(int offset)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment