Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/atari Add VGA console probes.



details:   https://anonhg.NetBSD.org/src/rev/61c8c5c9303e
branches:  trunk
changeset: 510406:61c8c5c9303e
user:      leo <leo%NetBSD.org@localhost>
date:      Mon May 28 08:12:47 2001 +0000

description:
Add VGA console probes.

diffstat:

 sys/arch/atari/atari/conf.c  |   7 ++++++-
 sys/arch/atari/pci/pci_vga.c |  35 ++++++++++++++++++++++++++++++++++-
 2 files changed, 40 insertions(+), 2 deletions(-)

diffs (97 lines):

diff -r d716146728bd -r 61c8c5c9303e sys/arch/atari/atari/conf.c
--- a/sys/arch/atari/atari/conf.c       Mon May 28 07:59:53 2001 +0000
+++ b/sys/arch/atari/atari/conf.c       Mon May 28 08:12:47 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: conf.c,v 1.47 2001/04/10 19:36:20 leo Exp $    */
+/*     $NetBSD: conf.c,v 1.48 2001/05/28 08:12:47 leo Exp $    */
 
 /*
  * Copyright (c) 1991 The Regents of the University of California.
@@ -142,6 +142,7 @@
 #include "ss.h"
 #include "tun.h"
 #include "uk.h"
+#include "vga_pci.h"
 #include "view.h"
 #include "zs.h"
 #include "leo.h"
@@ -383,6 +384,7 @@
 cons_decl(ser);
 #define        itecnpollc      nullcnpollc
 cons_decl(ite);
+cons_decl(vga)
 
 struct consdev constab[] = {
 #if NSER > 0
@@ -391,5 +393,8 @@
 #if NITE > 0
        cons_init(ite),
 #endif
+#if NVGA_PCI > 0
+       { dev_init(1,vga,cnprobe), dev_init(1,vga,cninit) },
+#endif
        { 0 },
 };
diff -r d716146728bd -r 61c8c5c9303e sys/arch/atari/pci/pci_vga.c
--- a/sys/arch/atari/pci/pci_vga.c      Mon May 28 07:59:53 2001 +0000
+++ b/sys/arch/atari/pci/pci_vga.c      Mon May 28 08:12:47 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_vga.c,v 1.3 2001/05/28 07:22:37 leo Exp $  */
+/*     $NetBSD: pci_vga.c,v 1.4 2001/05/28 08:12:48 leo Exp $  */
 
 /*
  * Copyright (c) 1999 Leo Weppelman.  All rights reserved.
@@ -40,6 +40,14 @@
 
 #include <atari/dev/font.h>
 
+#if NVGA_PCI > 0
+#include <dev/cons.h>
+#include <dev/ic/mc6845reg.h>
+#include <dev/ic/pcdisplayvar.h>
+#include <dev/ic/vgareg.h>
+#include <dev/ic/vgavar.h>
+#endif
+
 static void loadfont(volatile u_char *, u_char *fb);
 
 /* XXX: Shouldn't these be in font.h???? */
@@ -51,6 +59,8 @@
        {0x0, 0x0, 0x0}, {0x30, 0x30, 0x30}, { 0x3f,  0x3f,  0x3f}
 };
 
+static bus_space_tag_t vga_iot, vga_memt;
+static int             tags_valid = 0;
 
 #define                VGA_REG_SIZE    (8*1024)
 #define                VGA_FB_SIZE     (32*1024)
@@ -187,6 +197,29 @@
        return (rv);
 }
 
+#if NVGA_PCI > 0
+void vgacnprobe(struct consdev *);
+void vgacninit(struct consdev *);
+
+void
+vgacnprobe(cp)
+       struct consdev *cp;
+{
+       if (tags_valid)
+               cp->cn_pri = CN_NORMAL;
+}
+
+void
+vgacninit(cp)
+       struct consdev *cp;
+{
+       if (tags_valid) {
+               /* XXX: Are those arguments correct? Leo */
+               vga_cnattach(vga_iot, vga_memt, 8, 0);
+       }
+}
+#endif /* NVGA_PCI */
+
 /*
  * Generic VGA. Load the configured kernel font into the videomemory and
  * place the card into textmode.



Home | Main Index | Thread Index | Old Index