On most 68k Macs the SCC IRQ is an autovector interrupt and cannot be
masked. This can be a problem when pmac_zilog starts up.
For example, the serial debugging code in arch/m68k/kernel/head.S may be
used beforehand. It disables the SCC interrupts at the chip but doesn't
ack them. Then when a pmac_zilog port is opened and SCC chip interrupts
become enabled, the machine locks up with "unexpected interrupt" because
request_irq() hasn't happened yet.
Fix this by setting the SCC master interrupt enable bit only after the
handler is installed. This is achieved by extracting that operation out of
__pmz_startup() and placing it into a seperate routine.
A similar problem arises when the irq is freed. Fix this by resetting the
chip first (on m68k mac).
Signed-off-by: Finn Thain <fthain@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
---
This patch has been tested on a variety of m68k Macs but no PowerMacs.
I am re-sending this patch Cc linux-serial. It still needs a suitable ack
so that Geert can push it through his tree.