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)
This commit is contained in:
parent
d17d98adaf
commit
cc81f439dd
|
@ -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 @@ zscninit(struct consdev *cn)
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue