For SCC initialization we cannot assume that the control register is in 
the correct state to accept a register pointer. So first read from the 
control register in order to "sync" up.

Signed-off-by: Finn Thain <[email protected]>

---

This patch fixes a boot failure (presumably caused by unhandled SCC 
interrupt) on PowerBook 180 with CONFIG_EARLY_PRINTK and with the 
bootloader not configured to wake up the serial ports. AFAIK this happens 
only on PowerBooks. Even with this fix, Penguin still has to wake the 
serial ports or else they don't function on PowerBooks like this one.

diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S
--- a/arch/m68k/kernel/head.S
+++ b/arch/m68k/kernel/head.S
@@ -2909,7 +2909,9 @@ func_start        serial_init,%d0/%d1/%a0/%a1
 
 #if defined(MAC_USE_SCC_A) || defined(MAC_USE_SCC_B)
        movel   %pc@(L(mac_sccbase)),%a0
-       /* Reset SCC device */
+       /* Reset SCC register pointer */
+       moveb   %a0@(mac_scc_cha_a_ctrl_offset),%d0
+       /* Reset SCC device: write register pointer then register value */
        moveb   #9,%a0@(mac_scc_cha_a_ctrl_offset)
        moveb   #0xc0,%a0@(mac_scc_cha_a_ctrl_offset)
        /* Wait for 5 PCLK cycles, which is about 68 CPU cycles */
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to