diff options
| author | sekiya <sekiya@NetBSD.org> | 2004-01-11 01:48:46 +0000 |
|---|---|---|
| committer | sekiya <sekiya@NetBSD.org> | 2004-01-11 01:48:46 +0000 |
| commit | 69911c67f22c445e53aa1e8d014bb7b930b786b3 (patch) | |
| tree | c6eab5af5dd7a93a7c601418de0ffe3ddd6d79ba /sys | |
| parent | 1fb9212a36de36e9a56fb790fa9ac4e65ace513f (diff) | |
Reinstate symbolic device names -- I completely forgot about their use.
Reminder courtesy soren@
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/arch/sgimips/gio/Makefile.giodevs | 4 | ||||
| -rw-r--r-- | sys/arch/sgimips/gio/devlist2h.awk | 21 | ||||
| -rw-r--r-- | sys/arch/sgimips/gio/gio.c | 6 | ||||
| -rw-r--r-- | sys/arch/sgimips/gio/giodevs | 30 | ||||
| -rw-r--r-- | sys/arch/sgimips/gio/giodevs.h | 38 | ||||
| -rw-r--r-- | sys/arch/sgimips/gio/giodevs_data.h | 28 |
6 files changed, 80 insertions, 47 deletions
diff --git a/sys/arch/sgimips/gio/Makefile.giodevs b/sys/arch/sgimips/gio/Makefile.giodevs index 98a3b058313..c1ae8c13b5d 100644 --- a/sys/arch/sgimips/gio/Makefile.giodevs +++ b/sys/arch/sgimips/gio/Makefile.giodevs @@ -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 --git a/sys/arch/sgimips/gio/devlist2h.awk b/sys/arch/sgimips/gio/devlist2h.awk index d36dfbfbcb5..3e06f373ab5 100644 --- a/sys/arch/sgimips/gio/devlist2h.awk +++ b/sys/arch/sgimips/gio/devlist2h.awk @@ -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 @@ function collectline(_f, _line) { } 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 @@ NF > 0 && $1 == "product" { 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 @@ END { 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 --git a/sys/arch/sgimips/gio/gio.c b/sys/arch/sgimips/gio/gio.c index 699ede44f4f..3a5c0588412 100644 --- a/sys/arch/sgimips/gio/gio.c +++ b/sys/arch/sgimips/gio/gio.c @@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: gio.c,v 1.13 2004/01/10 02:26:44 sekiya Exp $"); #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 --git a/sys/arch/sgimips/gio/giodevs b/sys/arch/sgimips/gio/giodevs index add2b972974..7795cab3c54 100644 --- a/sys/arch/sgimips/gio/giodevs +++ b/sys/arch/sgimips/gio/giodevs @@ -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 --git a/sys/arch/sgimips/gio/giodevs.h b/sys/arch/sgimips/gio/giodevs.h index a0d05644460..9baa96429bd 100644 --- a/sys/arch/sgimips/gio/giodevs.h +++ b/sys/arch/sgimips/gio/giodevs.h @@ -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 --git a/sys/arch/sgimips/gio/giodevs_data.h b/sys/arch/sgimips/gio/giodevs_data.h new file mode 100644 index 00000000000..0de2ae6be28 --- /dev/null +++ b/sys/arch/sgimips/gio/giodevs_data.h @@ -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 } +}; |
