Module Name:    src
Committed By:   matt
Date:           Sun Apr 20 22:45:27 UTC 2014

Modified Files:
        src/sys/arch/arm/samsung: sscom.c

Log Message:
Allow setting of console speed in init.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/samsung/sscom.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/samsung/sscom.c
diff -u src/sys/arch/arm/samsung/sscom.c:1.4 src/sys/arch/arm/samsung/sscom.c:1.5
--- src/sys/arch/arm/samsung/sscom.c:1.4	Fri Apr 18 11:37:17 2014
+++ src/sys/arch/arm/samsung/sscom.c	Sun Apr 20 22:45:27 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: sscom.c,v 1.4 2014/04/18 11:37:17 reinoud Exp $ */
+/*	$NetBSD: sscom.c,v 1.5 2014/04/20 22:45:27 matt Exp $ */
 
 /*
  * Copyright (c) 2002, 2003 Fujitsu Component Limited
@@ -98,7 +98,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sscom.c,v 1.4 2014/04/18 11:37:17 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sscom.c,v 1.5 2014/04/20 22:45:27 matt Exp $");
 
 #include "opt_sscom.h"
 #include "opt_ddb.h"
@@ -1866,11 +1866,9 @@ sscom_init(bus_space_tag_t iot, bus_spac
 	    UFCON_RXFIFO_RESET);
 	/* tx/rx fifo reset are auto-cleared */
 
-#if 0
 	rate = sscomspeed(rate, frequency);
-	bus_space_write_2(iot, ioh, SSCOM_UBRDIV, rate);
-#endif
-	bus_space_write_1(iot, ioh, SSCOM_ULCON, cflag2lcr(cflag));
+	bus_space_write_4(iot, ioh, SSCOM_UBRDIV, rate);
+	bus_space_write_4(iot, ioh, SSCOM_ULCON, cflag2lcr(cflag));
 
 	/* enable UART */
 	bus_space_write_4(iot, ioh, SSCOM_UCON, 
@@ -1900,8 +1898,8 @@ sscom_cnattach(bus_space_tag_t iot, bus_
 {
 	int res;
 
-	res = sscom_init(iot, ioh, config,
-		rate, frequency, cflag, &sscomconsioh);
+	res = sscom_init(iot, ioh, config, rate, frequency, cflag,
+	    &sscomconsioh);
 	if (res)
 		return res;
 

Reply via email to