Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/alpha Allow kernels without tsciic to build.



details:   https://anonhg.NetBSD.org/src/rev/af63a36f3b39
branches:  trunk
changeset: 326930:af63a36f3b39
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Feb 22 18:42:47 2014 +0000

description:
Allow kernels without tsciic to build.

diffstat:

 sys/arch/alpha/conf/files.alpha |   4 ++--
 sys/arch/alpha/pci/tsc.c        |  14 ++++++++++++--
 2 files changed, 14 insertions(+), 4 deletions(-)

diffs (82 lines):

diff -r d52cad26e82b -r af63a36f3b39 sys/arch/alpha/conf/files.alpha
--- a/sys/arch/alpha/conf/files.alpha   Sat Feb 22 17:48:08 2014 +0000
+++ b/sys/arch/alpha/conf/files.alpha   Sat Feb 22 18:42:47 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.alpha,v 1.186 2014/02/21 12:23:30 jdc Exp $
+# $NetBSD: files.alpha,v 1.187 2014/02/22 18:42:47 martin Exp $
 #
 # alpha-specific configuration info
 
@@ -277,7 +277,7 @@
 
 device tsciic: i2cbus, i2c_bitbang
 attach tsciic at tsc
-file   arch/alpha/pci/tsciic.c tsciic
+file   arch/alpha/pci/tsciic.c tsciic  needs-flag
 
 device ttwoga { hose = -1 }
 attach ttwoga at mainbus
diff -r d52cad26e82b -r af63a36f3b39 sys/arch/alpha/pci/tsc.c
--- a/sys/arch/alpha/pci/tsc.c  Sat Feb 22 17:48:08 2014 +0000
+++ b/sys/arch/alpha/pci/tsc.c  Sat Feb 22 18:42:47 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tsc.c,v 1.23 2014/02/21 12:23:30 jdc Exp $ */
+/* $NetBSD: tsc.c,v 1.24 2014/02/22 18:42:47 martin Exp $ */
 
 /*-
  * Copyright (c) 1999 by Ross Harvey.  All rights reserved.
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: tsc.c,v 1.23 2014/02/21 12:23:30 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tsc.c,v 1.24 2014/02/22 18:42:47 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -53,6 +53,8 @@
 #include <alpha/pci/tsreg.h>
 #include <alpha/pci/tsvar.h>
 
+#include "tsciic.h"
+
 #ifdef DEC_6600
 #include <alpha/pci/pci_6600.h>
 #endif
@@ -88,7 +90,9 @@
 CFATTACH_DECL_NEW(tsciic, sizeof(struct tsciic_softc), tsciicmatch,
     tsciicattach, NULL, NULL);
 
+#if NTSCIIC
 extern struct cfdriver tsciic_cd;
+#endif
 
 /* There can be only one */
 static int tscfound;
@@ -310,12 +314,16 @@
 static int
 tsciicmatch(device_t parent, cfdata_t match, void *aux)
 {
+#if NTSCIIC
        struct tsciic_attach_args *t = aux;
+#endif
 
        switch (cputype) {
        case ST_DEC_6600:
        case ST_DEC_TITAN:
+#if NTSCIIC
                return strcmp(t->tsciic_name, tsciic_cd.cd_name) == 0;
+#endif
        default:
                return 0;
        }
@@ -324,7 +332,9 @@
 static void
 tsciicattach(device_t parent, device_t self, void *aux)
 {
+#if NTSCIIC
        tsciic_init(self);
+#endif
 }
 
 void



Home | Main Index | Thread Index | Old Index