Skip to content

Commit 56931d7

Browse files
Finn Thaingeertu
authored andcommitted
m68k/mac: Make SCC reset work more reliably
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> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
1 parent a0b7b24 commit 56931d7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎arch/m68k/kernel/head.S‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2915,7 +2915,9 @@ func_start serial_init,%d0/%d1/%a0/%a1
29152915

29162916
#if defined(MAC_USE_SCC_A) || defined(MAC_USE_SCC_B)
29172917
movel %pc@(L(mac_sccbase)),%a0
2918-
/* Reset SCC device */
2918+
/* Reset SCC register pointer */
2919+
moveb %a0@(mac_scc_cha_a_ctrl_offset),%d0
2920+
/* Reset SCC device: write register pointer then register value */
29192921
moveb #9,%a0@(mac_scc_cha_a_ctrl_offset)
29202922
moveb #0xc0,%a0@(mac_scc_cha_a_ctrl_offset)
29212923
/* Wait for 5 PCLK cycles, which is about 68 CPU cycles */

0 commit comments

Comments
 (0)