diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2010-06-02 09:58:24 -0400 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2010-08-09 15:14:08 -0400 |
commit | d643e2d2cc1d1f37751a99a7c4cb30064cc68aac (patch) | |
tree | f1485b3c6b484112e3f32675c2c14b89a8f774ca | |
parent | 1b460102323a08874e942a330b896c30d50ab235 (diff) |
m68k/mac: Fix RTC on PMU machines
Copy RTC response bytes correctly on powerbooks and duos. Thanks to Diego
Cousinet who debugged this and provided me with the fix. Tested on
PowerBook 190 and Duo 280c.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reported-by: Diego Cousinet <diego@pvco.net>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
-rw-r--r-- | arch/m68k/mac/misc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/m68k/mac/misc.c b/arch/m68k/mac/misc.c index 0f118ca156d9..e023fc6b37e5 100644 --- a/arch/m68k/mac/misc.c +++ b/arch/m68k/mac/misc.c | |||
@@ -91,7 +91,7 @@ static void cuda_write_pram(int offset, __u8 data) | |||
91 | #define cuda_write_pram NULL | 91 | #define cuda_write_pram NULL |
92 | #endif | 92 | #endif |
93 | 93 | ||
94 | #if 0 /* def CONFIG_ADB_PMU68K */ | 94 | #ifdef CONFIG_ADB_PMU68K |
95 | static long pmu_read_time(void) | 95 | static long pmu_read_time(void) |
96 | { | 96 | { |
97 | struct adb_request req; | 97 | struct adb_request req; |
@@ -102,8 +102,8 @@ static long pmu_read_time(void) | |||
102 | while (!req.complete) | 102 | while (!req.complete) |
103 | pmu_poll(); | 103 | pmu_poll(); |
104 | 104 | ||
105 | time = (req.reply[0] << 24) | (req.reply[1] << 16) | 105 | time = (req.reply[1] << 24) | (req.reply[2] << 16) |
106 | | (req.reply[2] << 8) | req.reply[3]; | 106 | | (req.reply[3] << 8) | req.reply[4]; |
107 | return time - RTC_OFFSET; | 107 | return time - RTC_OFFSET; |
108 | } | 108 | } |
109 | 109 | ||