public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
* [PATCH] m68k/mac: Make SCC reset work more reliably
@ 2014-01-12 13:56 Finn Thain
  2014-01-13 15:47 ` Geert Uytterhoeven
  2014-01-19 10:56 ` Geert Uytterhoeven
  0 siblings, 2 replies; 7+ messages in thread
From: Finn Thain @ 2014-01-12 13:56 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k


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 <fthain@telegraphics.com.au>

---

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 */

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-01-19 10:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-12 13:56 [PATCH] m68k/mac: Make SCC reset work more reliably Finn Thain
2014-01-13 15:47 ` Geert Uytterhoeven
2014-01-14  8:31   ` Finn Thain
2014-01-14  8:52     ` Geert Uytterhoeven
2014-01-14 21:15       ` Finn Thain
2014-01-16 11:18         ` Thorsten Glaser
2014-01-19 10:56 ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox