Commit 0fba3213 authored by Magnus Damm's avatar Magnus Damm Committed by Paul Mundt

sh: use sci_out() for early printk

Use sci_out() instead of ctrl_outw() for early printk setup code.
Signed-off-by: default avatarMagnus Damm <damm@igel.co.jp>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 0146ba78
...@@ -141,6 +141,7 @@ static void scif_sercon_init(char *s) ...@@ -141,6 +141,7 @@ static void scif_sercon_init(char *s)
*/ */
static void scif_sercon_init(char *s) static void scif_sercon_init(char *s)
{ {
struct uart_port *port = &scif_port;
unsigned baud = DEFAULT_BAUD; unsigned baud = DEFAULT_BAUD;
char *e; char *e;
...@@ -160,19 +161,20 @@ static void scif_sercon_init(char *s) ...@@ -160,19 +161,20 @@ static void scif_sercon_init(char *s)
baud = DEFAULT_BAUD; baud = DEFAULT_BAUD;
} }
ctrl_outw(0, scif_port.mapbase + 8); sci_out(port, SCSCR, 0); /* TE=0, RE=0 */
ctrl_outw(0, scif_port.mapbase); sci_out(port, SCSMR, 0);
/* Set baud rate */ /* Set baud rate */
ctrl_outb((CONFIG_SH_PCLK_FREQ + 16 * baud) / sci_out(port, SCBRR, (CONFIG_SH_PCLK_FREQ + 16 * baud) /
(32 * baud) - 1, scif_port.mapbase + 4); (32 * baud) - 1);
ctrl_outw(12, scif_port.mapbase + 24); sci_out(port, SCFCR, 12);
ctrl_outw(8, scif_port.mapbase + 24); sci_out(port, SCFCR, 8);
ctrl_outw(0, scif_port.mapbase + 32);
ctrl_outw(0x60, scif_port.mapbase + 16); sci_out(port, SCSPTR, 0);
ctrl_outw(0, scif_port.mapbase + 36); sci_out(port, SCxSR, 0x60);
ctrl_outw(0x30, scif_port.mapbase + 8); sci_out(port, SCLSR, 0);
sci_out(port, SCSCR, 0x30); /* TE=1, RE=1 */
} }
#endif /* defined(CONFIG_CPU_SUBTYPE_SH7720) */ #endif /* defined(CONFIG_CPU_SUBTYPE_SH7720) */
#endif /* !defined(CONFIG_SH_STANDARD_BIOS) */ #endif /* !defined(CONFIG_SH_STANDARD_BIOS) */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment