summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMagnus Damm <magnus.damm@gmail.com>2008-04-23 12:00:54 (GMT)
committerPaul Mundt <lethal@linux-sh.org>2008-05-08 10:51:52 (GMT)
commit0fba32136579648a5782a41e93d4a79547456a89 (patch)
tree2bca0099c15e07687ad2ae87d7e733f411205ff2 /arch
parent0146ba78b9339c27ed12545f9bdc208604354bb3 (diff)
downloadlinux-fsl-qoriq-0fba32136579648a5782a41e93d4a79547456a89.tar.xz
sh: use sci_out() for early printk
Use sci_out() instead of ctrl_outw() for early printk setup code. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/kernel/early_printk.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/arch/sh/kernel/early_printk.c b/arch/sh/kernel/early_printk.c
index 957f2561..18ca249 100644
--- a/arch/sh/kernel/early_printk.c
+++ b/arch/sh/kernel/early_printk.c
@@ -141,6 +141,7 @@ static void scif_sercon_init(char *s)
*/
static void scif_sercon_init(char *s)
{
+ struct uart_port *port = &scif_port;
unsigned baud = DEFAULT_BAUD;
char *e;
@@ -160,19 +161,20 @@ static void scif_sercon_init(char *s)
baud = DEFAULT_BAUD;
}
- ctrl_outw(0, scif_port.mapbase + 8);
- ctrl_outw(0, scif_port.mapbase);
+ sci_out(port, SCSCR, 0); /* TE=0, RE=0 */
+ sci_out(port, SCSMR, 0);
/* Set baud rate */
- ctrl_outb((CONFIG_SH_PCLK_FREQ + 16 * baud) /
- (32 * baud) - 1, scif_port.mapbase + 4);
-
- ctrl_outw(12, scif_port.mapbase + 24);
- ctrl_outw(8, scif_port.mapbase + 24);
- ctrl_outw(0, scif_port.mapbase + 32);
- ctrl_outw(0x60, scif_port.mapbase + 16);
- ctrl_outw(0, scif_port.mapbase + 36);
- ctrl_outw(0x30, scif_port.mapbase + 8);
+ sci_out(port, SCBRR, (CONFIG_SH_PCLK_FREQ + 16 * baud) /
+ (32 * baud) - 1);
+
+ 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, SCSCR, 0x30); /* TE=1, RE=1 */
}
#endif /* defined(CONFIG_CPU_SUBTYPE_SH7720) */
#endif /* !defined(CONFIG_SH_STANDARD_BIOS) */