Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/evbarm/awin If boot args contains "console=fb", use...



details:   https://anonhg.NetBSD.org/src/rev/fdb5e7979ce8
branches:  trunk
changeset: 803739:fdb5e7979ce8
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Mon Nov 10 17:56:08 2014 +0000

description:
If boot args contains "console=fb", use genfb for console device. Also set db_trap_callback so we can use VCONS_DRAW_INTR

diffstat:

 sys/arch/evbarm/awin/awin_machdep.c |  23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)

diffs (51 lines):

diff -r 359dfa84dfa6 -r fdb5e7979ce8 sys/arch/evbarm/awin/awin_machdep.c
--- a/sys/arch/evbarm/awin/awin_machdep.c       Mon Nov 10 17:55:25 2014 +0000
+++ b/sys/arch/evbarm/awin/awin_machdep.c       Mon Nov 10 17:56:08 2014 +0000
@@ -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 @@
 
 #include "com.h"
 #include "ukbd.h"
+#include "genfb.h"
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -755,6 +756,24 @@
 #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



Home | Main Index | Thread Index | Old Index