summaryrefslogtreecommitdiffstats
path: root/sys/pci/meteor.c
diff options
context:
space:
mode:
authorroger <roger@FreeBSD.org>1999-06-01 17:30:08 +0000
committerroger <roger@FreeBSD.org>1999-06-01 17:30:08 +0000
commiteb1a4be892a8369a6865ff3ca76a20d0a7954019 (patch)
tree560d7de2f9b901bd9d0580a1258cf5f2d3e0862e /sys/pci/meteor.c
parent1efee9b283477725d4a38202c1cc82b8c0726c52 (diff)
downloadFreeBSD-src-eb1a4be892a8369a6865ff3ca76a20d0a7954019.zip
FreeBSD-src-eb1a4be892a8369a6865ff3ca76a20d0a7954019.tar.gz
Updated to support new Meteor/PPB cards (PCI-PCI Bridge).
The driver now identifies the IBM PCI-PCI Bridge fitted to newer Matrox cards and initialises it. Sumitted by: Anton Berezin <tobez@plab.ku.dk> The Protein Laboratory, University of Copenhagen
Diffstat (limited to 'sys/pci/meteor.c')
-rw-r--r--sys/pci/meteor.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/sys/pci/meteor.c b/sys/pci/meteor.c
index 71f708f..1f7c5f1 100644
--- a/sys/pci/meteor.c
+++ b/sys/pci/meteor.c
@@ -1029,6 +1029,37 @@ met_attach(pcici_t tag, int unit)
return ;
}
+ /*
+ * Check for Meteor/PPB (PCI-PCI Bridge)
+ * Reprogram IBM Bridge if detected.
+ * New Meteor cards have an IBM PCI-PCI bridge, creating a secondary
+ * PCI bus. The SAA chip is connected to this secondary bus.
+ */
+
+ /* If we are not on PCI Bus 0, check for the Bridge */
+ if ( pci_get_bus_from_tag( tag ) != 0) {
+ pcici_t bridge_tag;
+
+ /* get tag of parent bridge */
+ bridge_tag = pci_get_parent_from_tag( tag );
+
+ /* Look for IBM 82351, 82352 or 82353 */
+ if (pci_conf_read(bridge_tag, PCI_ID_REG) == 0x00221014) {
+
+ if ( bootverbose)
+ printf("meteor%d: PPB device detected, reprogramming IBM bridge.\n", unit);
+
+ /* disable SERR */
+ pci_cfgwrite(bridge_tag, 0x05, 0x00, 1);
+ /* set LATENCY */
+ pci_cfgwrite(bridge_tag, 0x0d, 0x20, 1);
+ /* write posting enable, prefetch enabled --> GRAB direction */
+ pci_cfgwrite(bridge_tag, 0x42, 0x14, 1);
+ /* set PRTR Primary retry timer register */
+ pci_cfgwrite(bridge_tag, 0x4c, 0x10, 1);
+ }
+ }
+
mtr = &meteor[unit];
mtr->tag = tag;
pci_map_mem(tag, PCI_MAP_REG_START, (vm_offset_t *)&mtr->base,
OpenPOWER on IntegriCloud