Back out the libretto related hacks I accidentally committed. They are

in CVS in case one wants them :-)
This commit is contained in:
christos 2003-10-27 04:10:43 +00:00
parent 1baeb1502a
commit 7f7c7b7d99
2 changed files with 6 additions and 83 deletions

View File

@ -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 @@ pciintr_irq_release(pciirq)
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);
}

View File

@ -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_get_intr_routing __P((struct pcibios_intr_routing *,
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 @@ pcibios_pir_init()
}
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 @@ pcibios_pir_init()
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 @@ pcibios_print_exclirq()
}
}
/* 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()