From: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Date: 2018-05-10 21:59:39
This series makes it possible to use the SD card on the Wii. The WLAN
now also works on the SDIO level, but fails to connect to a network for
some reason.
Patch 1 seems quite obvious, although I don't know why the code was
broken in this particular way.
Patch 2 might not be the right solution for the problem at hand, but it
works and should only cause problems when both processors in the system
(PPC and ARM) try to use the same interrupt, if at all.
Jonathan Neuschäfer (2):
powerpc: flipper-pic: Don't match all IRQ domains
powerpc: hlwd-pic: Prevent interrupts from being handled by Starlet
arch/powerpc/platforms/embedded6xx/flipper-pic.c | 8 --------
arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 5 +++++
2 files changed, 5 insertions(+), 8 deletions(-)
--
2.17.0
From: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Date: 2018-05-10 21:59:46
On the Wii, there is a secondary IRQ controller (hlwd-pic), so
flipper-pic's match operation should not be hardcoded to return 1.
In fact, the default matching logic is sufficient, and we can completely
omit flipper_pic_match.
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---
Note: This shouldn't break Linux on the GameCube, but I've only tested
on the Wii. Some confirmation that I didn't break interrupt handling on
the GC would be nice. (If someone still runs mainline on the GC.)
---
arch/powerpc/platforms/embedded6xx/flipper-pic.c | 8 --------
1 file changed, 8 deletions(-)
From: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Date: 2018-05-10 21:59:59
The interrupt controller inside the Wii's Hollywood chip is connected to
two masters, the "Broadway" PowerPC and the "Starlet" ARM926, each with
their own interrupt status and mask registers.
When booting the Wii with mini[1], interrupts from the SD card
controller (IRQ 7) are handled by the ARM, because mini provides SD
access over IPC. Linux however can't currently use or disable this IPC
service, so both sides try to handle IRQ 7 without coordination.
Let's instead make sure that all interrupts that are unmasked on the PPC
side are masked on the ARM side; this will also make sure that Linux can
properly talk to the SD card controller (and potentially other devices).
If access to a device through IPC is desired in the future, interrupts
from that device should not be handled by Linux directly.
[1]: https://github.com/lewurm/mini
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---
arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 5 +++++
1 file changed, 5 insertions(+)
@@ -74,6 +76,9 @@ static void hlwd_pic_unmask(struct irq_data *d)void__iomem*io_base=irq_data_get_irq_chip_data(d);setbits32(io_base+HW_BROADWAY_IMR,1<<irq);++/* Make sure the ARM (aka. Starlet) doesn't handle this interrupt. */+clrbits32(io_base+HW_STARLET_IMR,1<<irq);}
From: Michael Ellerman <hidden> Date: 2018-05-21 10:03:07
On Thu, 2018-05-10 at 21:59:18 UTC, =?utf-8?q?Jonathan_Neusch=C3=A4fer?= wrote:
On the Wii, there is a secondary IRQ controller (hlwd-pic), so
flipper-pic's match operation should not be hardcoded to return 1.
In fact, the default matching logic is sufficient, and we can completely
omit flipper_pic_match.
Signed-off-by: Jonathan Neusch��fer <j.neuschaefer@gmx.net>