Module Name: src
Committed By: matt
Date: Fri Jan 7 02:27:15 UTC 2011
Modified Files:
src/sys/dev/pci [matt-nb5-pq3]: ppb.c
Log Message:
On powerpc systems, match powerpc processors which are really PCIe PPBs.
To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.39.22.1 src/sys/dev/pci/ppb.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/ppb.c
diff -u src/sys/dev/pci/ppb.c:1.39 src/sys/dev/pci/ppb.c:1.39.22.1
--- src/sys/dev/pci/ppb.c:1.39 Sat May 3 05:44:06 2008
+++ src/sys/dev/pci/ppb.c Fri Jan 7 02:27:15 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ppb.c,v 1.39 2008/05/03 05:44:06 cegger Exp $ */
+/* $NetBSD: ppb.c,v 1.39.22.1 2011/01/07 02:27:15 matt Exp $ */
/*
* Copyright (c) 1996, 1998 Christopher G. Demetriou. All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.39 2008/05/03 05:44:06 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.39.22.1 2011/01/07 02:27:15 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -68,6 +68,17 @@
PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_BRIDGE_PCI)
return 1;
+#ifdef __powerpc__
+ if (PCI_CLASS(pa->pa_class) == PCI_CLASS_PROCESSOR &&
+ PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_PROCESSOR_POWERPC) {
+ pcireg_t bhlc = pci_conf_read(pa->pa_pc, pa->pa_tag,
+ PCI_BHLC_REG);
+ if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_FREESCALE
+ && PCI_HDRTYPE(bhlc) == PCI_HDRTYPE_RC)
+ return 1;
+ }
+#endif
+
return 0;
}