Module Name: src
Committed By: jmcneill
Date: Mon Nov 10 17:56:08 UTC 2014
Modified Files:
src/sys/arch/evbarm/awin: awin_machdep.c
Log Message:
If boot args contains "console=fb", use genfb for console device. Also set
db_trap_callback so we can use VCONS_DRAW_INTR
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/evbarm/awin/awin_machdep.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/evbarm/awin/awin_machdep.c
diff -u src/sys/arch/evbarm/awin/awin_machdep.c:1.25 src/sys/arch/evbarm/awin/awin_machdep.c:1.26
--- src/sys/arch/evbarm/awin/awin_machdep.c:1.25 Fri Nov 7 11:42:28 2014
+++ src/sys/arch/evbarm/awin/awin_machdep.c Mon Nov 10 17:56:08 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_machdep.c,v 1.25 2014/11/07 11:42:28 jmcneill Exp $ */
+/* $NetBSD: awin_machdep.c,v 1.26 2014/11/10 17:56:08 jmcneill Exp $ */
/*
* Machine dependent functions for kernel setup for TI OSK5912 board.
@@ -125,7 +125,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: awin_machdep.c,v 1.25 2014/11/07 11:42:28 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awin_machdep.c,v 1.26 2014/11/10 17:56:08 jmcneill Exp $");
#include "opt_machdep.h"
#include "opt_ddb.h"
@@ -138,6 +138,7 @@ __KERNEL_RCSID(0, "$NetBSD: awin_machdep
#include "com.h"
#include "ukbd.h"
+#include "genfb.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -755,6 +756,24 @@ awin_device_register(device_t self, void
#endif
return;
}
+
+#if NGENFB > 0
+ if (device_is_a(self, "genfb")) {
+#ifdef DDB
+ db_trap_callback = awin_fb_ddb_trap_callback;
+#endif
+ char *ptr;
+ if (get_bootconf_option(boot_args, "console",
+ BOOTOPT_TYPE_STRING, &ptr) && strncmp(ptr, "fb", 2) == 0) {
+ prop_dictionary_set_bool(dict, "is_console", true);
+#if NUKBD > 0
+ ukbd_cnattach();
+#endif
+ } else {
+ prop_dictionary_set_bool(dict, "is_console", false);
+ }
+ }
+#endif
}
#ifdef AWIN_SYSCONFIG