Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sgimips/gio Reinstate symbolic device names -- I co...
details: https://anonhg.NetBSD.org/src/rev/a32354161eb2
branches: trunk
changeset: 557511:a32354161eb2
user: sekiya <sekiya%NetBSD.org@localhost>
date: Sun Jan 11 01:48:46 2004 +0000
description:
Reinstate symbolic device names -- I completely forgot about their use.
Reminder courtesy soren@
diffstat:
sys/arch/sgimips/gio/Makefile.giodevs | 4 +-
sys/arch/sgimips/gio/devlist2h.awk | 21 +++++++++++++++---
sys/arch/sgimips/gio/gio.c | 6 ++--
sys/arch/sgimips/gio/giodevs | 30 +++++++++++++-------------
sys/arch/sgimips/gio/giodevs.h | 38 +++++++++++++---------------------
sys/arch/sgimips/gio/giodevs_data.h | 28 +++++++++++++++++++++++++
6 files changed, 80 insertions(+), 47 deletions(-)
diffs (213 lines):
diff -r a2a9ec9d5ac1 -r a32354161eb2 sys/arch/sgimips/gio/Makefile.giodevs
--- a/sys/arch/sgimips/gio/Makefile.giodevs Sun Jan 11 00:10:54 2004 +0000
+++ b/sys/arch/sgimips/gio/Makefile.giodevs Sun Jan 11 01:48:46 2004 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile.giodevs,v 1.2 2004/01/10 02:26:44 sekiya Exp $
+# $NetBSD: Makefile.giodevs,v 1.3 2004/01/11 01:48:46 sekiya Exp $
AWK?= awk
giodevs.h: giodevs devlist2h.awk
- /bin/rm -f giodevs.h
+ /bin/rm -f giodevs.h giodevs_data.h
${AWK} -f devlist2h.awk giodevs
diff -r a2a9ec9d5ac1 -r a32354161eb2 sys/arch/sgimips/gio/devlist2h.awk
--- a/sys/arch/sgimips/gio/devlist2h.awk Sun Jan 11 00:10:54 2004 +0000
+++ b/sys/arch/sgimips/gio/devlist2h.awk Sun Jan 11 01:48:46 2004 +0000
@@ -1,5 +1,5 @@
#! /usr/bin/awk -f
-# $NetBSD: devlist2h.awk,v 1.1 2004/01/10 02:26:44 sekiya Exp $
+# $NetBSD: devlist2h.awk,v 1.2 2004/01/11 01:48:46 sekiya Exp $
#
# Copyright (c) 1998 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -92,13 +92,20 @@
}
BEGIN {
nproducts = nvendors = blanklines = 0
- dfile="giodevs.h"
+ dfile="giodevs_data.h"
+ hfile="giodevs.h"
line=""
}
NR == 1 {
VERSION = $0
gsub("\\$", "", VERSION)
+ printf("/*\t$NetBSD" "$\t*/\n\n") > hfile
+ printf("/*\n") > hfile
+ printf(" * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \
+ > hfile
+ printf(" */\n") > hfile
+
printf("/*\t$NetBSD" "$\t*/\n\n") > dfile
printf("/*\n") > dfile
printf(" * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \
@@ -111,7 +118,8 @@
nproducts++
products[nproducts, 1] = $2;
- products[nproducts, 2] = collectline(3, line)
+ products[nproducts, 2] = $3
+ products[nproducts, 3] = collectline(4, line)
next
}
@@ -131,11 +139,16 @@
printf("\tchar *product;\n") > dfile
printf("};\n") > dfile
printf("\nstruct gio_knowndev gio_knowndevs[] = {\n") > dfile
+
+ printf("\n") > hfile
for (i = 1; i <= nproducts; i++) {
+ printf("#define %s\t%s\t/* %s */\n", products[i, 1], products[i,2], products[i, 3]) > hfile
+
printf("\t{ %s, \"%s\" },\n",
- products[i, 1], products[i, 2]) > dfile
+ products[i, 2], products[i, 3]) > dfile
}
printf("\t{ 0, NULL }\n") > dfile
printf("};\n") > dfile
close(dfile)
+ close(hfile)
}
diff -r a2a9ec9d5ac1 -r a32354161eb2 sys/arch/sgimips/gio/gio.c
--- a/sys/arch/sgimips/gio/gio.c Sun Jan 11 00:10:54 2004 +0000
+++ b/sys/arch/sgimips/gio/gio.c Sun Jan 11 01:48:46 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gio.c,v 1.13 2004/01/10 02:26:44 sekiya Exp $ */
+/* $NetBSD: gio.c,v 1.14 2004/01/11 01:48:46 sekiya Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gio.c,v 1.13 2004/01/10 02:26:44 sekiya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gio.c,v 1.14 2004/01/11 01:48:46 sekiya Exp $");
#include "opt_ddb.h"
@@ -45,7 +45,7 @@
#include <sgimips/gio/gioreg.h>
#include <sgimips/gio/giovar.h>
-#include <sgimips/gio/giodevs.h>
+#include <sgimips/gio/giodevs_data.h>
#include "locators.h"
#include "newport.h"
diff -r a2a9ec9d5ac1 -r a32354161eb2 sys/arch/sgimips/gio/giodevs
--- a/sys/arch/sgimips/gio/giodevs Sun Jan 11 00:10:54 2004 +0000
+++ b/sys/arch/sgimips/gio/giodevs Sun Jan 11 01:48:46 2004 +0000
@@ -1,15 +1,15 @@
-product 0x01 XPI low cost FDDI
-product 0x02 GTR TokenRing
-product 0x04 Synchronous ISDN
-product 0x06 Canon Interface
-product 0x08 JPEG (Double Wide)
-product 0x09 JPEG (Single Wide)
-product 0x0a XPI mez. FDDI device 0
-product 0x0b XPI mez. FDDI device 1
-product 0x0e E-Plex 8-port Ethernet
-product 0x30 Lyon Lamb IVAS
-product 0x36 Phobos G130 10/100 Ethernet
-product 0x85 ATM board
-product 0x87 16 bit SCSI Card
-product 0x8c SMPTE 259M Video
-product 0x8d Babblefish Compression
+product XPI 0x01 XPI low cost FDDI
+product GTR 0x02 GTR TokenRing
+product ISDN 0x04 Synchronous ISDN
+product CANON 0x06 Canon Interface
+product JPEG_D 0x08 JPEG (Double Wide)
+product JPEG_S 0x09 JPEG (Single Wide)
+product XPI_M0 0x0a XPI mez. FDDI device 0
+product XPI_M1 0x0b XPI mez. FDDI device 1
+product EP 0x0e E-Plex 8-port Ethernet
+product IVAS 0x30 Lyon Lamb IVAS
+product PHOBOS_G130 0x36 Phobos G130 10/100 Ethernet
+product ATM 0x85 ATM board
+product SCSI 0x87 16 bit SCSI Card
+product SMPTE 0x8c SMPTE 259M Video
+product BABBLE 0x8d Babblefish Compression
diff -r a2a9ec9d5ac1 -r a32354161eb2 sys/arch/sgimips/gio/giodevs.h
--- a/sys/arch/sgimips/gio/giodevs.h Sun Jan 11 00:10:54 2004 +0000
+++ b/sys/arch/sgimips/gio/giodevs.h Sun Jan 11 01:48:46 2004 +0000
@@ -1,28 +1,20 @@
-/* $NetBSD: giodevs.h,v 1.1 2004/01/10 02:26:44 sekiya Exp $ */
+/* $NetBSD: giodevs.h,v 1.2 2004/01/11 01:48:46 sekiya Exp $ */
/*
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
*/
-struct gio_knowndev {
- int productid;
- char *product;
-};
-
-struct gio_knowndev gio_knowndevs[] = {
- { 0x02, "GTR TokenRing" },
- { 0x04, "Synchronous ISDN" },
- { 0x06, "Canon Interface" },
- { 0x08, "JPEG (Double Wide)" },
- { 0x09, "JPEG (Single Wide)" },
- { 0x0a, "XPI mez. FDDI device 0" },
- { 0x0b, "XPI mez. FDDI device 1" },
- { 0x0e, "E-Plex 8-port Ethernet" },
- { 0x30, "Lyon Lamb IVAS" },
- { 0x36, "Phobos G130 10/100 Ethernet" },
- { 0x85, "ATM board" },
- { 0x87, "16 bit SCSI Card" },
- { 0x8c, "SMPTE 259M Video" },
- { 0x8d, "Babblefish Compression" },
- { 0, NULL }
-};
+#define GTR 0x02 /* GTR TokenRing */
+#define ISDN 0x04 /* Synchronous ISDN */
+#define CANON 0x06 /* Canon Interface */
+#define JPEG_D 0x08 /* JPEG (Double Wide) */
+#define JPEG_S 0x09 /* JPEG (Single Wide) */
+#define XPI_M0 0x0a /* XPI mez. FDDI device 0 */
+#define XPI_M1 0x0b /* XPI mez. FDDI device 1 */
+#define EP 0x0e /* E-Plex 8-port Ethernet */
+#define IVAS 0x30 /* Lyon Lamb IVAS */
+#define PHOBOS_G130 0x36 /* Phobos G130 10/100 Ethernet */
+#define ATM 0x85 /* ATM board */
+#define SCSI 0x87 /* 16 bit SCSI Card */
+#define SMPTE 0x8c /* SMPTE 259M Video */
+#define BABBLE 0x8d /* Babblefish Compression */
diff -r a2a9ec9d5ac1 -r a32354161eb2 sys/arch/sgimips/gio/giodevs_data.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/sgimips/gio/giodevs_data.h Sun Jan 11 01:48:46 2004 +0000
@@ -0,0 +1,28 @@
+/* $NetBSD: giodevs_data.h,v 1.1 2004/01/11 01:48:46 sekiya Exp $ */
+
+/*
+ * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
+ */
+
+struct gio_knowndev {
+ int productid;
+ char *product;
+};
+
+struct gio_knowndev gio_knowndevs[] = {
+ { 0x02, "GTR TokenRing" },
+ { 0x04, "Synchronous ISDN" },
+ { 0x06, "Canon Interface" },
+ { 0x08, "JPEG (Double Wide)" },
+ { 0x09, "JPEG (Single Wide)" },
+ { 0x0a, "XPI mez. FDDI device 0" },
+ { 0x0b, "XPI mez. FDDI device 1" },
+ { 0x0e, "E-Plex 8-port Ethernet" },
+ { 0x30, "Lyon Lamb IVAS" },
+ { 0x36, "Phobos G130 10/100 Ethernet" },
+ { 0x85, "ATM board" },
+ { 0x87, "16 bit SCSI Card" },
+ { 0x8c, "SMPTE 259M Video" },
+ { 0x8d, "Babblefish Compression" },
+ { 0, NULL }
+};
Home |
Main Index |
Thread Index |
Old Index