]> git.sur5r.net Git - u-boot/commitdiff
serial: sh: Change definition of clock of SCIF
authorNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Tue, 20 Aug 2013 01:31:53 +0000 (10:31 +0900)
committerNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Thu, 17 Oct 2013 00:43:31 +0000 (09:43 +0900)
The former SH/SCIF driver had calculated baudrate based on CONFIG_SYS_CLK_FREQ.
The newest SH/SCIF needs calculation of the clock for SCIF.
This patch defines clock CONFIG_SH_SCIF_CLK_FREQ for SCIF and changes it to
CONFIG_SH_SCIF_CLK_FREQ from CONFIG_SYS_CLK_FREQ.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
CC: Albert Aribaud <albert.u.boot@aribaud.net>
drivers/serial/serial_sh.c

index ff2cdc58472c8c8c918e5037f79fc6da3f040949..67cc0dc8da6c382f326f7978eb305c81430d7fc4 100644 (file)
@@ -48,7 +48,9 @@ static struct uart_port sh_sci = {
 static void sh_serial_setbrg(void)
 {
        DECLARE_GLOBAL_DATA_PTR;
-       sci_out(&sh_sci, SCBRR, SCBRR_VALUE(gd->baudrate, CONFIG_SYS_CLK_FREQ));
+
+       sci_out(&sh_sci, SCBRR,
+               SCBRR_VALUE(gd->baudrate, CONFIG_SH_SCIF_CLK_FREQ));
 }
 
 static int sh_serial_init(void)