]>
Commit | Line | Data |
---|---|---|
a65d4bac | 1 | From foo@baz Sat Jul 28 10:25:26 CEST 2018 |
4692c206 | 2 | From: Jonathan Neuschäfer <j.neuschaefer@gmx.net> |
a65d4bac GKH |
3 | Date: Thu, 10 May 2018 23:59:19 +0200 |
4 | Subject: powerpc/embedded6xx/hlwd-pic: Prevent interrupts from being handled by Starlet | |
5 | ||
4692c206 | 6 | From: Jonathan Neuschäfer <j.neuschaefer@gmx.net> |
a65d4bac GKH |
7 | |
8 | [ Upstream commit 9dcb3df4281876731e4e8bff7940514d72375154 ] | |
9 | ||
10 | The interrupt controller inside the Wii's Hollywood chip is connected to | |
11 | two masters, the "Broadway" PowerPC and the "Starlet" ARM926, each with | |
12 | their own interrupt status and mask registers. | |
13 | ||
14 | When booting the Wii with mini[1], interrupts from the SD card | |
15 | controller (IRQ 7) are handled by the ARM, because mini provides SD | |
16 | access over IPC. Linux however can't currently use or disable this IPC | |
17 | service, so both sides try to handle IRQ 7 without coordination. | |
18 | ||
19 | Let's instead make sure that all interrupts that are unmasked on the PPC | |
20 | side are masked on the ARM side; this will also make sure that Linux can | |
21 | properly talk to the SD card controller (and potentially other devices). | |
22 | ||
23 | If access to a device through IPC is desired in the future, interrupts | |
24 | from that device should not be handled by Linux directly. | |
25 | ||
26 | [1]: https://github.com/lewurm/mini | |
27 | ||
28 | Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> | |
29 | Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> | |
30 | Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> | |
31 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
32 | --- | |
33 | arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 5 +++++ | |
34 | 1 file changed, 5 insertions(+) | |
35 | ||
36 | --- a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c | |
37 | +++ b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c | |
38 | @@ -35,6 +35,8 @@ | |
39 | */ | |
40 | #define HW_BROADWAY_ICR 0x00 | |
41 | #define HW_BROADWAY_IMR 0x04 | |
42 | +#define HW_STARLET_ICR 0x08 | |
43 | +#define HW_STARLET_IMR 0x0c | |
44 | ||
45 | ||
46 | /* | |
47 | @@ -74,6 +76,9 @@ static void hlwd_pic_unmask(struct irq_d | |
48 | void __iomem *io_base = irq_data_get_irq_chip_data(d); | |
49 | ||
50 | setbits32(io_base + HW_BROADWAY_IMR, 1 << irq); | |
51 | + | |
52 | + /* Make sure the ARM (aka. Starlet) doesn't handle this interrupt. */ | |
53 | + clrbits32(io_base + HW_STARLET_IMR, 1 << irq); | |
54 | } | |
55 | ||
56 |