Module Name: src Committed By: tsutsui Date: Sun May 1 16:19:13 UTC 2011
Modified Files: src/sys/arch/x68k/dev: zs.c Log Message: 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) To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/arch/x68k/dev/zs.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/x68k/dev/zs.c diff -u src/sys/arch/x68k/dev/zs.c:1.40 src/sys/arch/x68k/dev/zs.c:1.41 --- src/sys/arch/x68k/dev/zs.c:1.40 Wed Dec 31 09:50:21 2008 +++ src/sys/arch/x68k/dev/zs.c Sun May 1 16:19:13 2011 @@ -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;