Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x68k/dev Reset ZS chip properly in zscninit() so th...
details: https://anonhg.NetBSD.org/src/rev/f1012b41c5b5
branches: trunk
changeset: 764709:f1012b41c5b5
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sun May 01 16:19:13 2011 +0000
description:
Reset ZS chip properly in zscninit() so that zscngetc() works
even before zsc is attached during configure.
(i.e. make userconf(4) work on serial console)
diffstat:
sys/arch/x68k/dev/zs.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r ee49536cd60b -r f1012b41c5b5 sys/arch/x68k/dev/zs.c
--- a/sys/arch/x68k/dev/zs.c Sun May 01 14:48:11 2011 +0000
+++ b/sys/arch/x68k/dev/zs.c Sun May 01 16:19:13 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: zs.c,v 1.40 2008/12/31 09:50:21 isaki Exp $ */
+/* $NetBSD: zs.c,v 1.41 2011/05/01 16:19:13 tsutsui Exp $ */
/*-
* Copyright (c) 1998 Minoura Makoto
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.40 2008/12/31 09:50:21 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.41 2011/05/01 16:19:13 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -580,9 +580,11 @@
zscn_cs.cs_brg_clk = PCLK / 16;
memcpy(zscn_cs.cs_preg, zs_init_reg, 16);
zscn_cs.cs_preg[4] = ZSWR4_CLK_X16 | ZSWR4_ONESB; /* XXX */
- zscn_cs.cs_preg[9] = 0;
+ zscn_cs.cs_preg[5] |= ZSWR5_DTR | ZSWR5_RTS;
zs_set_speed(&zscn_cs, ZSCN_SPEED);
s = splzs();
+ zs_write_reg(&zscn_cs, 9, 0);
+ zs_write_reg(&zscn_cs, 9, ZSWR9_HARD_RESET);
zs_loadchannelregs(&zscn_cs);
splx(s);
conschan = cnchan;
Home |
Main Index |
Thread Index |
Old Index