]>
Commit | Line | Data |
---|---|---|
7be860c4 GKH |
1 | From foo@baz Mon Sep 17 12:15:09 CEST 2018 |
2 | From: Finn Thain <fthain@telegraphics.com.au> | |
3 | Date: Mon, 2 Jul 2018 04:21:18 -0400 | |
4 | Subject: macintosh/via-pmu: Add missing mmio accessors | |
5 | ||
6 | From: Finn Thain <fthain@telegraphics.com.au> | |
7 | ||
8 | [ Upstream commit 576d5290d678a651b9f36050fc1717e0573aca13 ] | |
9 | ||
10 | Add missing in_8() accessors to init_pmu() and pmu_sr_intr(). | |
11 | ||
12 | This fixes several sparse warnings: | |
13 | drivers/macintosh/via-pmu.c:536:29: warning: dereference of noderef expression | |
14 | drivers/macintosh/via-pmu.c:537:33: warning: dereference of noderef expression | |
15 | drivers/macintosh/via-pmu.c:1455:17: warning: dereference of noderef expression | |
16 | drivers/macintosh/via-pmu.c:1456:69: warning: dereference of noderef expression | |
17 | ||
18 | Tested-by: Stan Johnson <userm57@yahoo.com> | |
19 | Signed-off-by: Finn Thain <fthain@telegraphics.com.au> | |
20 | Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> | |
21 | Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> | |
22 | Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> | |
23 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
24 | --- | |
25 | drivers/macintosh/via-pmu.c | 9 +++++---- | |
26 | 1 file changed, 5 insertions(+), 4 deletions(-) | |
27 | ||
28 | --- a/drivers/macintosh/via-pmu.c | |
29 | +++ b/drivers/macintosh/via-pmu.c | |
30 | @@ -530,8 +530,9 @@ init_pmu(void) | |
31 | int timeout; | |
32 | struct adb_request req; | |
33 | ||
34 | - out_8(&via[B], via[B] | TREQ); /* negate TREQ */ | |
35 | - out_8(&via[DIRB], (via[DIRB] | TREQ) & ~TACK); /* TACK in, TREQ out */ | |
36 | + /* Negate TREQ. Set TACK to input and TREQ to output. */ | |
37 | + out_8(&via[B], in_8(&via[B]) | TREQ); | |
38 | + out_8(&via[DIRB], (in_8(&via[DIRB]) | TREQ) & ~TACK); | |
39 | ||
40 | pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, pmu_intr_mask); | |
41 | timeout = 100000; | |
42 | @@ -1453,8 +1454,8 @@ pmu_sr_intr(void) | |
43 | struct adb_request *req; | |
44 | int bite = 0; | |
45 | ||
46 | - if (via[B] & TREQ) { | |
47 | - printk(KERN_ERR "PMU: spurious SR intr (%x)\n", via[B]); | |
48 | + if (in_8(&via[B]) & TREQ) { | |
49 | + printk(KERN_ERR "PMU: spurious SR intr (%x)\n", in_8(&via[B])); | |
50 | out_8(&via[IFR], SR_INT); | |
51 | return NULL; | |
52 | } |