提交 56931d73 编写于 作者: F Finn Thain 提交者: Geert Uytterhoeven

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: NFinn Thain <fthain@telegraphics.com.au>
Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
上级 a0b7b242
...@@ -2915,7 +2915,9 @@ func_start serial_init,%d0/%d1/%a0/%a1 ...@@ -2915,7 +2915,9 @@ func_start serial_init,%d0/%d1/%a0/%a1
#if defined(MAC_USE_SCC_A) || defined(MAC_USE_SCC_B) #if defined(MAC_USE_SCC_A) || defined(MAC_USE_SCC_B)
movel %pc@(L(mac_sccbase)),%a0 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 #9,%a0@(mac_scc_cha_a_ctrl_offset)
moveb #0xc0,%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 */ /* Wait for 5 PCLK cycles, which is about 68 CPU cycles */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册