Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic don't try to become console if we get is_console=...
details: https://anonhg.NetBSD.org/src/rev/5e6b83c85f08
branches: trunk
changeset: 783854:5e6b83c85f08
user: macallan <macallan%NetBSD.org@localhost>
date: Thu Jan 10 17:38:10 2013 +0000
description:
don't try to become console if we get is_console=false as device property
diffstat:
sys/dev/ic/com.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diffs (48 lines):
diff -r d985446b8463 -r 5e6b83c85f08 sys/dev/ic/com.c
--- a/sys/dev/ic/com.c Thu Jan 10 17:36:35 2013 +0000
+++ b/sys/dev/ic/com.c Thu Jan 10 17:38:10 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: com.c,v 1.306 2012/05/21 20:51:46 skrll Exp $ */
+/* $NetBSD: com.c,v 1.307 2013/01/10 17:38:10 macallan Exp $ */
/*-
* Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.306 2012/05/21 20:51:46 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.307 2013/01/10 17:38:10 macallan Exp $");
#include "opt_com.h"
#include "opt_ddb.h"
@@ -379,9 +379,14 @@
u_int8_t lcr;
#endif
const char *fifo_msg = NULL;
+ prop_dictionary_t dict;
+ bool is_console = true;
aprint_naive("\n");
+ dict = device_properties(sc->sc_dev);
+ prop_dictionary_get_bool(dict, "is_console", &is_console);
+
callout_init(&sc->sc_diag_callout, 0);
mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_HIGH);
@@ -402,9 +407,13 @@
(u_long)comcons_info.regs.cr_iobase);
}
+
/* Make sure the console is always "hardwired". */
delay(10000); /* wait for output to finish */
- SET(sc->sc_hwflags, COM_HW_CONSOLE);
+ if (is_console) {
+ SET(sc->sc_hwflags, COM_HW_CONSOLE);
+ }
+
SET(sc->sc_swflags, TIOCFLAG_SOFTCAR);
}
Home |
Main Index |
Thread Index |
Old Index