Source-Changes-HG archive

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

[src/netbsd-1-6]: src/sys Pull up revision 1.2 (requested by chris in ticket ...



details:   https://anonhg.NetBSD.org/src/rev/cb391bea09ec
branches:  netbsd-1-6
changeset: 529202:cb391bea09ec
user:      tron <tron%NetBSD.org@localhost>
date:      Fri Nov 01 11:12:30 2002 +0000

description:
Pull up revision 1.2 (requested by chris in ticket #120):
Substantial overhaul of podule IDs.  Unlike on PCI or USB, podule IDs are
assigned by RISCOS Ltd (and were assigned by Acorn) to be unique across all
manufacturers.  This means that associating each one with a manufacturer (and
checking the manufacturer when attaching) is bogus.  Thus, we don't do that
any more.
This should have the pleasant side-effect of getting APDL IDE interfaces
working, since they're just ICS ones with a different manufacturer ID.

diffstat:

 sys/arch/acorn26/podulebus/podulebusreg.h |   6 ++-
 sys/dev/podulebus/podulelist2h.awk        |  56 +++++++++++++-----------------
 2 files changed, 29 insertions(+), 33 deletions(-)

diffs (111 lines):

diff -r 7441e447b18b -r cb391bea09ec sys/arch/acorn26/podulebus/podulebusreg.h
--- a/sys/arch/acorn26/podulebus/podulebusreg.h Fri Nov 01 11:12:13 2002 +0000
+++ b/sys/arch/acorn26/podulebus/podulebusreg.h Fri Nov 01 11:12:30 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: podulebusreg.h,v 1.1 2002/03/24 15:47:23 bjh21 Exp $ */
+/* $NetBSD: podulebusreg.h,v 1.1.4.1 2002/11/01 11:12:30 tron Exp $ */
 
 /*
  * 2000 Ben Harris
@@ -12,6 +12,10 @@
 #define MAX_PODULES 4
 #define PODULE_GAP (0x4000 >> 2)
 
+/* Podule CMOS bytes */
+#define PODULE_CMOS_BASE       (112 + 0x40)
+#define PODULE_CMOS_PERSLOT    4
+
 /* Podule identity byte (ECId) flags */
 #define ECID_IRQING    0x01
 #define ECID_NOTPRESENT        0x02
diff -r 7441e447b18b -r cb391bea09ec sys/dev/podulebus/podulelist2h.awk
--- a/sys/dev/podulebus/podulelist2h.awk        Fri Nov 01 11:12:13 2002 +0000
+++ b/sys/dev/podulebus/podulelist2h.awk        Fri Nov 01 11:12:30 2002 +0000
@@ -1,5 +1,5 @@
 #! /usr/bin/awk -f
-#      $NetBSD: podulelist2h.awk,v 1.1 2001/03/17 19:05:19 bjh21 Exp $
+#      $NetBSD: podulelist2h.awk,v 1.1.20.1 2002/11/01 11:12:30 tron Exp $
 #      from: devlist2h.awk,v 1.2 1996/01/22 21:08:09 cgd Exp
 #
 # Copyright (c) 1996 Mark Brinicombe
@@ -107,13 +107,12 @@
 $1 == "podule" {
        npodules++
 
-       podules[npodules, 1] = $2;              # vendor name
-       podules[npodules, 2] = $3;              # podule id
-       podules[npodules, 3] = $4;              # id
-       printf("#define\tPODULE_%s_%s\t%s\t", podules[npodules, 1],
-           podules[npodules, 2], podules[npodules, 3]) > hfile
+       podules[npodules, 1] = $2;              # podule id
+       podules[npodules, 2] = $3;              # id
+       printf("#define\tPODULE_%s\t%s\t",
+           podules[npodules, 1], podules[npodules, 2]) > hfile
 
-       i=4; f = 5;
+       i=3; f = 4;
 
        # comments
        ocomment = oparen = 0
@@ -161,34 +160,27 @@
 
        printf("\n") > dfile
 
-       for (i = 1; i <= nvendors; i++) {
-               printf("static struct podule_description podules_%s[] = {\n", \
-                   tolower(vendors[i, 1])) > dfile
-               for (j = 1; j <= npodules; j++) {
-                       if (podules[j, 1] != vendors[i, 1]) continue
-                       printf("\t{ PODULE_%s_%s,",
-                           podules[j, 1], podules[j, 2]) \
-                           > dfile
-       
-                       printf("\t\"") > dfile
-                       k = 4;
-                       needspace = 0;
-                       while (podules[j, k] != "") {
-                               if (needspace)
-                                       printf(" ") > dfile
-                               printf("%s", podules[j, k]) > dfile
-                               needspace = 1
-                               k++
-                       }
-                       printf("\" },\n") > dfile
+       printf("static struct podule_description known_podules[] = {\n") > dfile
+       for (j = 1; j <= npodules; j++) {
+               printf("\t{ PODULE_%s,", podules[j, 1]) > dfile
+               printf("\t\"") > dfile
+               k = 3;
+               needspace = 0;
+               while (podules[j, k] != "") {
+                       if (needspace)
+                               printf(" ") > dfile
+                       printf("%s", podules[j, k]) > dfile
+                       needspace = 1
+                       k++
                }
-               printf("\t{ 0x0000, NULL }\n") > dfile
-               printf("};\n\n") > dfile
+               printf("\" },\n") > dfile
        }
+       printf("\t{ 0x0000, NULL }\n") > dfile
+       printf("};\n\n") > dfile
 
        printf("\n") > dfile
 
-       printf("struct podule_list known_podules[] = {\n") > dfile
+       printf("struct manufacturer_description known_manufacturers[] = {\n") > dfile
        for (i = 1; i <= nvendors; i++) {
                printf("\t{ MANUFACTURER_%s, \t", vendors[i, 1]) > dfile
                if (length(vendors[i, 1]) < 7)
@@ -203,8 +195,8 @@
                        needspace = 1
                        j++
                }
-               printf("\", \tpodules_%s },\n", tolower(vendors[i, 1])) > dfile
+               printf("\" },\n") > dfile
        }
-       printf("\t{ 0, NULL, NULL }\n") > dfile
+       printf("\t{ 0, NULL }\n") > dfile
        printf("};\n") > dfile
 }



Home | Main Index | Thread Index | Old Index