Patchwork [U-Boot,5/6] serial: sh: Change The definition of clock of SCIF

login
register
mail settings
Submitter Nobuhiro Iwamatsu
Date Aug. 22, 2013, 1:57 a.m.
Message ID <1377136635-27875-5-git-send-email-nobuhiro.iwamatsu.yj@renesas.com>
Download mbox | patch
Permalink /patch/268925/
State Accepted
Delegated to: Nobuhiro Iwamatsu
Headers show

Comments

Nobuhiro Iwamatsu - Aug. 22, 2013, 1:57 a.m.
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>
---
 drivers/serial/serial_sh.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch

diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index ff2cdc5..67cc0dc 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -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)