Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci On powerpc, recognize PCI Express RC root bridges.
details: https://anonhg.NetBSD.org/src/rev/830373e1e5b0
branches: trunk
changeset: 759500:830373e1e5b0
user: matt <matt%NetBSD.org@localhost>
date: Sat Dec 11 18:25:02 2010 +0000
description:
On powerpc, recognize PCI Express RC root bridges.
diffstat:
sys/dev/pci/ppb.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r af1f6fa03f7f -r 830373e1e5b0 sys/dev/pci/ppb.c
--- a/sys/dev/pci/ppb.c Sat Dec 11 18:22:24 2010 +0000
+++ b/sys/dev/pci/ppb.c Sat Dec 11 18:25:02 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ppb.c,v 1.42 2010/02/24 22:38:01 dyoung Exp $ */
+/* $NetBSD: ppb.c,v 1.43 2010/12/11 18:25:02 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.42 2010/02/24 22:38:01 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.43 2010/12/11 18:25:02 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;
}
Home |
Main Index |
Thread Index |
Old Index