Skip to content

Commit

Permalink
sh: reset hardware from early printk
Browse files Browse the repository at this point in the history
Reset the transmitter and receiver when setting up early printk.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Magnus Damm authored and Paul Mundt committed May 8, 2008
1 parent 4a65e38 commit 191d443
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/sh/kernel/early_printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,19 +167,19 @@ static void scif_sercon_init(char *s)
} while (!(status & SCxSR_TEND(port)));

sci_out(port, SCSCR, 0); /* TE=0, RE=0 */
sci_out(port, SCFCR, SCFCR_RFRST | SCFCR_TFRST);
sci_out(port, SCSMR, 0);

/* Set baud rate */
sci_out(port, SCBRR, (CONFIG_SH_PCLK_FREQ + 16 * baud) /
(32 * baud) - 1);
udelay((1000000+(baud-1)) / baud); /* Wait one bit interval */

sci_out(port, SCFCR, 12);
sci_out(port, SCFCR, 8);

sci_out(port, SCSPTR, 0);
sci_out(port, SCxSR, 0x60);
sci_out(port, SCLSR, 0);

sci_out(port, SCFCR, 0);
sci_out(port, SCSCR, 0x30); /* TE=1, RE=1 */
}
#endif /* defined(CONFIG_CPU_SUBTYPE_SH7720) */
Expand Down

0 comments on commit 191d443

Please sign in to comment.