Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386/pci Back out the libretto related hacks I acci...



details:   https://anonhg.NetBSD.org/src/rev/c1afe6c38604
branches:  trunk
changeset: 554344:c1afe6c38604
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Oct 27 04:10:43 2003 +0000

description:
Back out the libretto related hacks I accidentally committed. They are
in CVS in case one wants them :-)

diffstat:

 sys/arch/i386/pci/pci_intr_fixup.c |  40 +++---------------------------
 sys/arch/i386/pci/pcibios.c        |  49 +------------------------------------
 2 files changed, 6 insertions(+), 83 deletions(-)

diffs (157 lines):

diff -r 39c7e61ed28f -r c1afe6c38604 sys/arch/i386/pci/pci_intr_fixup.c
--- a/sys/arch/i386/pci/pci_intr_fixup.c        Mon Oct 27 03:58:17 2003 +0000
+++ b/sys/arch/i386/pci/pci_intr_fixup.c        Mon Oct 27 04:10:43 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_intr_fixup.c,v 1.26 2003/10/25 18:40:58 christos Exp $     */
+/*     $NetBSD: pci_intr_fixup.c,v 1.27 2003/10/27 04:10:43 christos Exp $     */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_intr_fixup.c,v 1.26 2003/10/25 18:40:58 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_intr_fixup.c,v 1.27 2003/10/27 04:10:43 christos Exp $");
 
 #include "opt_pcibios.h"
 
@@ -574,45 +574,13 @@
        u_int16_t *pciirq;
 {
        int i, bit;
-       u_int16_t bios_pciirq;
-       int reg;
 
-#ifdef PCIINTR_DEBUG
-       printf("pciintr_irq_release: fixup pciirq level/edge map 0x%04x\n",
-           *pciirq);
-#endif
-
-       /* Get bios level/edge setting. */
-       bios_pciirq = 0;
-       for (i = 0, bit = 1; i < 16; i++, bit <<= 1) {
-               (void)pciintr_icu_get_trigger(pciintr_icu_tag,
-                   pciintr_icu_handle, i, &reg);
-               if (reg == IST_LEVEL)
-                       bios_pciirq |= bit;
-       }
-
-#ifdef PCIINTR_DEBUG
-       printf("pciintr_irq_release: bios  pciirq level/edge map 0x%04x\n",
-           bios_pciirq);
-#endif /* PCIINTR_DEBUG */
-
-       /* fixup final level/edge setting. */
-       *pciirq |= bios_pciirq;
        for (i = 0, bit = 1; i < 16; i++, bit <<= 1) {
                if ((*pciirq & bit) == 0)
-                       reg = IST_EDGE;
-               else
-                       reg = IST_LEVEL;
-               (void) pciintr_icu_set_trigger(pciintr_icu_tag,
-                           pciintr_icu_handle, i, reg);
-
+                       (void) pciintr_icu_set_trigger(pciintr_icu_tag,
+                           pciintr_icu_handle, i, IST_EDGE);
        }
 
-#ifdef PCIINTR_DEBUG
-       printf("pciintr_irq_release: final pciirq level/edge map 0x%04x\n",
-           *pciirq);
-#endif /* PCIINTR_DEBUG */
-
        return (0);
 }
 
diff -r 39c7e61ed28f -r c1afe6c38604 sys/arch/i386/pci/pcibios.c
--- a/sys/arch/i386/pci/pcibios.c       Mon Oct 27 03:58:17 2003 +0000
+++ b/sys/arch/i386/pci/pcibios.c       Mon Oct 27 04:10:43 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pcibios.c,v 1.13 2003/10/25 18:40:58 christos Exp $    */
+/*     $NetBSD: pcibios.c,v 1.14 2003/10/27 04:10:43 christos Exp $    */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcibios.c,v 1.13 2003/10/25 18:40:58 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcibios.c,v 1.14 2003/10/27 04:10:43 christos Exp $");
 
 #include "opt_pcibios.h"
 
@@ -119,19 +119,6 @@
 int    pcibios_return_code __P((u_int16_t, const char *));
 
 void   pcibios_print_exclirq __P((void));
-
-/* for Libretto L2/L3 hack */
-void   pcibios_fixup_pir_table __P((void));
-void   pcibios_fixup_pir_table_mask __P((struct pcibios_linkmap *));
-
-struct pcibios_linkmap pir_mask[] = {
-       { 2,    0x0040 },
-       { 7,    0x0080 },
-       { 8,    0x0020 },
-       { 0,    0x0000 }
-};
-
-
 #ifdef PCIINTR_DEBUG
 void   pcibios_print_pir_table __P((void));
 #endif
@@ -314,9 +301,6 @@
                }
                printf("\n");
                pcibios_print_exclirq();
-
-               /* for Libretto L2/L3 hack */
-               pcibios_fixup_pir_table();
 #ifdef PCIINTR_DEBUG
                pcibios_print_pir_table();
 #endif
@@ -349,9 +333,6 @@
        printf("PCI BIOS has %d Interrupt Routing table entries\n",
            pcibios_pir_table_nentries);
        pcibios_print_exclirq();
-
-       /* for Libretto L2/L3 hack */
-       pcibios_fixup_pir_table();
 #ifdef PCIINTR_DEBUG
        pcibios_print_pir_table();
 #endif
@@ -497,32 +478,6 @@
        }
 }
 
-/* for Libretto L2/L3 hack */
-void 
-pcibios_fixup_pir_table()
-{
-       struct pcibios_linkmap *m;
-
-       for (m = pir_mask; m->link != 0; m++)
-               pcibios_fixup_pir_table_mask(m);
-}
-
-void 
-pcibios_fixup_pir_table_mask(mask)
-       struct pcibios_linkmap *mask;
-{
-       int i, j;
-
-       for (i = 0; i < pcibios_pir_table_nentries; i++) {
-               for (j = 0; j < 4; j++) {
-                       if (pcibios_pir_table[i].linkmap[j].link == mask->link) {
-                               pcibios_pir_table[i].linkmap[j].bitmap
-                                   &= mask->bitmap; 
-                       }
-               }
-       }
-}
-
 #ifdef PCIINTR_DEBUG
 void
 pcibios_print_pir_table()



Home | Main Index | Thread Index | Old Index