Commit 74f6d57e authored by David Woodhouse's avatar David Woodhouse Committed by Linus Torvalds

[PATCH] ppc32: Fix UART initialisation on WindRiver SBC8560.

The UART tristates its IRQ output when the OUT2 bit in the MCR isn't
set. For reasons not known to civilised man, the hardware engineers
stopped it from floating by pulling it _high_ instead of low, so if
anybody requests that IRQ before OUT2 is turned on, we die in an IRQ
storm. The serial8250 driver does precisely that thing, with precisely
that effect.

ALPHA_KLUDGE_MCR was designed to fix exactly this kind of problem, so we
use it here as intended. Ideally ALPHA_KLUDGE_MCR would go away and be
replaced with something like UPF_FORCE_OUT2 and UPF_FORCE_OUT1 flags,
but now is not the time to get me started on a cleanup of everything
about serial8250 that offends me.
parent 44b60529
......@@ -130,6 +130,13 @@ struct rs_multiport_struct {
* reason (mips != alpha!)
*/
#define ALPHA_KLUDGE_MCR (UART_MCR_OUT2 | UART_MCR_OUT1)
#elif defined(CONFIG_SBC8560)
/*
* WindRiver did something similarly broken on their SBC8560 board. The
* UART tristates its IRQ output while OUT2 is clear, but they pulled
* the interrupt line _up_ instead of down, so if we register the IRQ
* while the UART is in that state, we die in an IRQ storm. */
#define ALPHA_KLUDGE_MCR (UART_MCR_OUT2)
#else
#define ALPHA_KLUDGE_MCR 0
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment